Skip to content

[SYCL] Add e2e test for device memory sanitizer #18152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: sycl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sycl/test-e2e/MemorySanitizer/cpu_aot.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// REQUIRES: linux, opencl-aot, cpu

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O0 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O1 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O2 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp
11 changes: 11 additions & 0 deletions sycl/test-e2e/MemorySanitizer/gpu_aot.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// REQUIRES: linux, gpu && level_zero
// REQUIRES: arch-intel_gpu_pvc

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O0 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O1 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp

// RUN: %{run-aux} %{build} %device_msan_aot_flags -O2 -g %S/check_divide.cpp -o %t.out
// RUN: %{run} %t.out 2>&1 | FileCheck %S/check_divide.cpp
4 changes: 4 additions & 0 deletions sycl/test-e2e/MemorySanitizer/lit.local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ else:
# TRACKER for PVC + igc-dev: https://github.com/intel/llvm/issues/16401
config.unsupported_features += ['igc-dev']

config.substitutions.append(
("%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' %}")
)

# MemorySanitizer is not currently supported for non-spir triples
config.unsupported_features += ['target-nvidia', 'target-amd']

Expand Down
Loading