I'm using group broadcast on a NVIDIA gpu using sycl and trying to port the code to AMD gpu. It gets compiled but fail to link:
lld: error: undefined hidden symbol: __spirv_GroupBroadcast(unsigned int, float, unsigned int)
I created this small snippet of code that trigger the problem.
example_broadcast.cpp
compile on NVIDIA:
clang++ example_broadcast.cpp -O3 -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-unnamed-lambda
compile on AMD:
clang++ example_broadcast.cpp -fsycl -fsycl-targets=amdgcn-amd-amdhsa -fsycl-unnamed-lambda -Xsycl-target-backend --offload-arch=gfx908
The code compiles and executes correctly on nvidia, while on amd it fails at linking.
Nvidia Machine
- OS:Linux Ubuntu 20.04LTS
- Target device and vendor: Nvidia A100
- DPC++ version: f058fe0
Amd Machine
- OS:Linux Ubuntu 20.04LTS
- Target device and vendor: Amd MI100
- DPC++ version: f058fe0
I have the same problem with groupAny and groupAll, but I do not have example code now.