Skip to content
Merged
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: 5 additions & 5 deletions sycl/test-e2e/MemorySanitizer/track-origins/check_host_usm.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1.out
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out
// RUN: %{run} %t3.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM

#include <sycl/detail/core.hpp>
Expand All @@ -25,7 +25,7 @@ int main() {
// CHECK: kernel <{{.*MyKernel}}>
// CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-6]]
// CHECK: ORIGIN: Host USM allocation
// CHECK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]]
// CHECK-ORIGIN-STACK: #{{.*}} {{.*check_host_usm.cpp}}:[[@LINE-11]]
// CHECK-HOSTUSM-NOT: use-of-uninitialized-value

sycl::free(array, Q);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
// RUN: %{run} %t1.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK-HOSTUSM

#include <sycl/detail/core.hpp>
Expand All @@ -22,7 +24,7 @@ int main() {
// CHECK: kernel <{{.*MyKernel}}>
// CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-6]]
// CHECK: ORIGIN: Host USM allocation
// CHECK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]]
// CHECK-ORIGIN-STACK: #{{.*}} {{.*check_host_usm_initialized_on_host.cpp}}:[[@LINE-12]]
// CHECK-HOSTUSM-NOT: use-of-uninitialized-value

sycl::free(array, Q);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
// RUN: %{run} %t1.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
// RUN: %{run} %t1.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -DINIT_SOURCE -O2 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes CHECK-INIT

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>
Expand Down Expand Up @@ -36,7 +38,7 @@ void no_overlap() {
// CHECK: kernel <{{.*MyKernel3}}>
// CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-6]]
// CHECK: ORIGIN: Host USM allocation
// CHECK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]]
// CHECK-ORIGIN-STACK: #{{.*}} {{.*check_kernel_memmove_no_overlap.cpp}}:[[@LINE-24]]
// CHECK-INIT-NOT: use-of-uninitialized-value

sycl::free(array1, Q);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t0.out
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t0.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t1.out
// RUN: %{run} %t1.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>
Expand Down Expand Up @@ -30,7 +32,7 @@ void overlap() {
// CHECK: kernel <{{.*MyKernel2}}>
// CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-6]]
// CHECK: ORIGIN: Shared USM allocation
// CHECK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]]
// CHECK-ORIGIN-STACK: #{{.*}} {{.*check_kernel_memmove_overlap.cpp}}:[[@LINE-20]]

sycl::free(array, Q);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// REQUIRES: linux, cpu || (gpu && level_zero)
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O0 -g -o %t1.out
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-ORIGIN-STACK
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O1 -g -o %t2.out
// RUN: %{run} %t2.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t2.out 2>&1 | FileCheck %s
// RUN: %{build} %device_msan_flags -Xarch_device -fsanitize-memory-track-origins=1 -O2 -g -o %t3.out
// RUN: %{run} %t3.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:1 %{run} %t3.out 2>&1 | FileCheck %s
// RUN: env UR_LAYER_MSAN_OPTIONS=msan_check_host_and_shared_usm:0 %{run} %t3.out 2>&1 | FileCheck %s --check-prefixes CHECK-SHAREDUSM

#include <sycl/detail/core.hpp>
Expand All @@ -25,7 +25,7 @@ int main() {
// CHECK: kernel <{{.*MyKernel}}>
// CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-6]]
// CHECK: ORIGIN: Shared USM allocation
// CHECK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]]
// CHECK-ORIGIN-STACK: #{{.*}} {{.*check_shared_usm.cpp}}:[[@LINE-11]]
// CHECK-SHAREDUSM-NOT: use-of-uninitialized-value

sycl::free(array, Q);
Expand Down
Loading