Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 342b895

Browse files
authored
[SYCL] Enable indirect access tracking for multi-threaded assertion tests (#538)
Memory pooling is being disabled by default: intel/llvm#4799 This makes necessary to enable indirect access tracking feature for multi-threaded assertion tests. Memory pooling was resulting in deferred memory release that's why this issue was not reproducing before.
1 parent 8d98508 commit 342b895

4 files changed

+28
-4
lines changed

SYCL/Assert/assert_in_simultaneous_kernels.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
66
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
7-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
7+
//
8+
// Since this is a multi-threaded application enable memory tracking and
9+
// deferred release feature in the Level Zero plugin to avoid releasing memory
10+
// too early. This is necessary because currently SYCL RT sets indirect access
11+
// flag for all kernels and the Level Zero runtime doesn't support deferred
12+
// release yet.
13+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
814
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
915
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
1016
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneous_kernels_win.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %threads_lib
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
44
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
5-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
5+
//
6+
// Since this is a multi-threaded application enable memory tracking and
7+
// deferred release feature in the Level Zero plugin to avoid releasing memory
8+
// too early. This is necessary because currently SYCL RT sets indirect access
9+
// flag for all kernels and the Level Zero runtime doesn't support deferred
10+
// release yet.
11+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
612
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
713
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
814
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneously_multiple_tus.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -I %S/Inputs %s %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6+
//
7+
// Since this is a multi-threaded application enable memory tracking and
8+
// deferred release feature in the Level Zero plugin to avoid releasing memory
9+
// too early. This is necessary because currently SYCL RT sets indirect access
10+
// flag for all kernels and the Level Zero runtime doesn't support deferred
11+
// release yet.
12+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
713
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
814
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
915
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

SYCL/Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
// RUN: %clangxx -DSYCL_ENABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple -DDEFINE_NDEBUG_INFILE2 -I %S/Inputs %S/assert_in_simultaneously_multiple_tus.cpp %S/Inputs/kernels_in_file2.cpp -o %t.out %threads_lib
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
55
// RUN: %CPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
6-
// RUN: %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
6+
//
7+
// Since this is a multi-threaded application enable memory tracking and
8+
// deferred release feature in the Level Zero plugin to avoid releasing memory
9+
// too early. This is necessary because currently SYCL RT sets indirect access
10+
// flag for all kernels and the Level Zero runtime doesn't support deferred
11+
// release yet.
12+
// RUN: env SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1 %GPU_RUN_PLACEHOLDER %t.out &> %t.txt || true
713
// RUN: %GPU_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt
814
// RUN: %ACC_RUN_PLACEHOLDER %t.out &> %t.txt || true
915
// RUN: %ACC_RUN_PLACEHOLDER FileCheck %s --input-file %t.txt

0 commit comments

Comments
 (0)