Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set AMD GPU targets when compiling tensorflow-rocm? #33

Closed
wtongze opened this issue Jul 24, 2023 · 1 comment
Closed

How to set AMD GPU targets when compiling tensorflow-rocm? #33

wtongze opened this issue Jul 24, 2023 · 1 comment

Comments

@wtongze
Copy link

wtongze commented Jul 24, 2023

Hi there,
I have a RX590 (gfx803). I'm currently trying to build the tensorflow-rocm (r2.12-rocm-enhanced) with ROCm 5.4.3 on Ubuntu 22.04 in order to use the newer version of tensorflow.

My question is how do you change the AMD GPU targets when compiling tensorflow-rocm to include gfx803? I have tried to set the following environment variables, but it seems like none of these works when I test the output whl file.

export AMDGPU_TARGETS=gfx803
export TF_ROCM_AMDGPU_TARGETS=gfx803
export GPU_DEVICE_TARGETS=gfx803
printf 'gfx803\n' | tee -a "/opt/rocm/bin/target.lst"

./build_rocm_python3

When I test the output whl file, it will give me the following error:

2023-07-24 11:06:52.592658: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2011] Ignoring visible gpu device (device: 0, name: Radeon RX 590 Series, pci bus id: 0000:07:00.0) with AMDGPU version : gfx803. The supported AMDGPU versions are gfx1030, gfx900, gfx906, gfx908, gfx90a.

Thanks

@viebrix
Copy link

viebrix commented Sep 20, 2023

Those exports should do it:

sudo -i
sudo echo ROC_ENABLE_PRE_VEGA=1 >> /etc/environment
sudo echo HSA_OVERRIDE_GFX_VERSION=8.0.3 >> /etc/environment

But I would try with rocm 5.5:
#27 (comment)

@wtongze wtongze closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants