rocm-gfx803
rocm-gfx803 copied to clipboard
How to set AMD GPU targets when compiling tensorflow-rocm?
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
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: https://github.com/xuhuisheng/rocm-gfx803/issues/27#issuecomment-1722525240