Skip to content

Commit 9220695

Browse files
authored
[SYCL] Add e2e test for device memory sanitizer (#18152)
Signed-off-by: jinge90 <ge.jin@intel.com>
1 parent 1276ca3 commit 9220695

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// REQUIRES: linux, opencl-aot, cpu
2+
3+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O0 -g %S/check_divide.cpp -o %t.out
4+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp
5+
6+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O1 -g %S/check_divide.cpp -o %t.out
7+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp
8+
9+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O2 -g %S/check_divide.cpp -o %t.out
10+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// REQUIRES: linux, gpu && level_zero
2+
// REQUIRES: arch-intel_gpu_pvc
3+
4+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O0 -g %S/check_divide.cpp -o %t.out
5+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp
6+
7+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O1 -g %S/check_divide.cpp -o %t.out
8+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp
9+
10+
// RUN: %{run-aux} %{build} %device_msan_aot_flags -O2 -g %S/check_divide.cpp -o %t.out
11+
// RUN: %{run} not %t.out 2>&1 | FileCheck %S/check_divide.cpp

sycl/test-e2e/MemorySanitizer/lit.local.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ else:
55
# TRACKER for PVC + igc-dev: https://github.com/intel/llvm/issues/16401
66
config.unsupported_features += ['igc-dev']
77

8+
config.substitutions.append(
9+
("%device_msan_aot_flags", "-Xarch_device -fsanitize=memory %if cpu %{ -fsycl-targets=spir64_x86_64 %} %if gpu %{ -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen '-devices pvc' %}")
10+
)
11+
812
# MemorySanitizer is not currently supported for non-spir triples
913
config.unsupported_features += ['target-nvidia', 'target-amd']
1014

0 commit comments

Comments
 (0)