Skip to content

[SPIR-V] ThreadSanitizer tests crashes when SYCL is running with the LLVM SPIR-V backend in PVC #160602

@YixingZhang007

Description

@YixingZhang007

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
# |            ^
# | <stdin>:1:1: note: scanning from here
# | ==== DeviceSanitizer: TSAN
# | ^
# | 
# | Input file: <stdin>
# | 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

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPIR-VSPIR-V language support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions