llvm
llvm copied to clipboard
SYCL-CTS test_vector_swizzles doesn't compile for NVPTX target.
Describe the bug
I'm building SYCL-CTS using DPC++ with NVPTX target support and building of the test_vector_swizzles fails with following error:
ptxas fatal : Unresolved extern function '_Z18__spirv_AtomicIAddPyN5__spv5Scope4FlagENS0_19MemorySemanticsMask4FlagEy'
NOTE: Might be related to https://github.com/intel/llvm/issues/5647 and https://github.com/intel/llvm/issues/5215.
To Reproduce Please describe the steps to reproduce the behavior:
git clone --recurse-submodules https://github.com/KhronosGroup/SYCL-CTS.git
cd SYCL-CTS
cmake -S . -B build -DSYCL_IMPLEMENTATION=DPCPP -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES=ci/dpcpp.filter -DSYCL_CTS_ENABLE_DOUBLE_TESTS=OFF -DSYCL_CTS_ENABLE_HALF_TESTS=OFF -DSYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS=OFF -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF -DDPCPP_INSTALL_DIR=<compiler-install-dir> -DDPCPP_TARGET_TRIPLES=nvptx64-nvidia-cuda
cmake --build ./build
Environment (please complete the following information):
- OS: Linux
- Target device and vendor: GeForce RTX 2060 0.0 [CUDA 11.0]
- DPC++ version: clang version 15.0.0 (https://github.com/intel/llvm.git ab0502149aa3eb107a1b7cce6ca496c9bc7341a1) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /iusers/aabader/llvm/build/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 Found CUDA installation: /usr/local/cuda, version 11.0
I see that this issue also impacts test_optional_kernel_features.
The test passes on the same machine with DPC++ built from https://github.com/intel/llvm/commit/bfc7e984592314b6fc6c715f2fe8edf72b1cc6f6.
test_optional_kernel_features still fails.
@AerialMantis, if you won't be able to reproduce this problem with the recent DPC++, please, close the ticket.
That's very strange as I haven't updated CUDA version, so my theory is that patches from llvm.org and spir-v translator remove uses of atomic add instructions.
Thanks @bader, that's interesting, @jchlanda has just picked up this task, so he will be looking into it, if we're not able to reproduce it, we'll consider it resolved as you suggest.
I've just checked with the top of llvm/sycl f963 and top of CTS da7b and the swizzle tests build just fine.
@jchlanda, are you able to build test_optional_kernel_features?
Huh, so test_optional_kernel_features fails with the same missing symbol, I'll re-open the ticket.
ptxas fatal : Unresolved extern function '_Z18__spirv_AtomicIAddPyN5__spv5Scope4FlagENS0_19MemorySemanticsMask4FlagEy'
This will be fixed when https://github.com/intel/llvm/pull/7220 gets merged.
This will be fixed when #7220 gets merged.
@jchlanda, please, link this pull request to close the issue when PR is merged.
https://github.com/intel/llvm/pull/7220 was fixed in https://github.com/intel/llvm/pull/7723