[SPIR-V] ThreadSanitizer tests crashes when SYCL is running with the LLVM SPIR-V backend in PVC
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The following 9 SYCL E2E tests in `ThreadSanitizer` fail when they are running with LLVM SPIR-V backend on PVC machine.
```
ThreadSanitizer/aot/gpu.cpp
ThreadSanitizer/check_buffer.cpp
ThreadSanitizer/check_device_global.cpp
ThreadSanitizer/check_device_usm.cpp
ThreadSanitizer/check_host_usm.cpp
ThreadSanitizer/check_shared_usm.cpp
ThreadSanitizer/check_sub_buffer.cpp
ThreadSanitizer/group_local_memory.cpp
ThreadSanitizer/local_accessor.cpp
```
The following command used to run the tests.
`build/bin/llvm-lit --param sycl_devices=level_zero:gpu --param dpcpp_compiler=$(which clang++) -v --param spirv-backend=True sycl/test-e2e/ThreadSanitizer`
An example of the failure is as below. This failure is given by running `ThreadSanitizer/check_device_global.cpp` with SPIR-V Backend, and the other tests fail with the same issue as well.
```
/iusers/yixingzh/offload_fp64_conv_fail/llvm/build/bin/clang++ -Werror -fsycl -fsycl-targets=spir64 -fsycl-use-spirv-backend-for-spirv-gen -Wno-unused-command-line-argument /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp -Xarch_device -fsanitize=thread -O0 -g -o /iusers/yixingzh/offload_fp64_conv_fail/llvm/build/tools/sycl/test-e2e/ThreadSanitizer/Output/check_device_global.cpp.tmp1.out
# executed command: /iusers/yixingzh/offload_fp64_conv_fail/llvm/build/bin/clang++ -Werror -fsycl -fsycl-targets=spir64 -fsycl-use-spirv-backend-for-spirv-gen -Wno-unused-command-line-argument /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp -Xarch_device -fsanitize=thread -O0 -g -o /iusers/yixingzh/offload_fp64_conv_fail/llvm/build/tools/sycl/test-e2e/ThreadSanitizer/Output/check_device_global.cpp.tmp1.out
env ONEAPI_DEVICE_SELECTOR=level_zero:gpu /iusers/yixingzh/offload_fp64_conv_fail/llvm/build/tools/sycl/test-e2e/ThreadSanitizer/Output/check_device_global.cpp.tmp1.out 2>&1 | /rdrive/ref/lit/tools/Linux/FileCheck /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp
# executed command: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu /iusers/yixingzh/offload_fp64_conv_fail/llvm/build/tools/sycl/test-e2e/ThreadSanitizer/Output/check_device_global.cpp.tmp1.out
# note: command had no output on stdout or stderr
# executed command: /rdrive/ref/lit/tools/Linux/FileCheck /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp
# .---command stderr------------
# | /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp:31:12: error: CHECK: expected string not found in input
# | // CHECK: WARNING: DeviceSanitizer: data race
# | ^
# | :1:1: note: scanning from here
# | ==== DeviceSanitizer: TSAN
# | ^
# |
# | Input file:
# | Check file: /iusers/yixingzh/offload_fp64_conv_fail/llvm/sycl/test-e2e/ThreadSanitizer/check_device_global.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ==== DeviceSanitizer: TSAN
# | check:31 X~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
Contributor guide
Assessment
This issue has not been assessed yet.