From 49f856c9689eb80e8b4294b59d42f8acd239317a Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Wed, 30 Nov 2022 15:44:25 -0800 Subject: [PATCH 1/2] [SYCL][Level Zero] Don't expect ZE_MEMORY_ADVICE_SET_READ_MOSTLY for read-only USM There are issues in the underlying Level Zero RT causing stability problems. This partially reverts https://github.com/intel/llvm-test-suite/pull/1409 and is needed for https://github.com/intel/llvm/pull/7601. --- SYCL/USM/shared_read_only.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SYCL/USM/shared_read_only.cpp b/SYCL/USM/shared_read_only.cpp index 0a16f9d195..4d98359494 100644 --- a/SYCL/USM/shared_read_only.cpp +++ b/SYCL/USM/shared_read_only.cpp @@ -11,7 +11,9 @@ int main() { auto *p2 = sycl::malloc_shared(42, q); // CHECK: zeMemAllocShared - // CHECK: {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_READ_MOSTLY}} + // TODO: The following has issues in underlying Level Zero RT and thus isn't + // used: + // {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_READ_MOSTLY}} // CHECK: {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION*}} // CHECK: zeMemAllocShared // CHECK-NOT: MemAdvise From 9fd8bc0f814cc31c4dfbd055fb2a214c74b4c933 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 1 Dec 2022 11:47:55 -0800 Subject: [PATCH 2/2] Adjust comments - read-only guarantee doesn't have L0 API yet. --- SYCL/USM/shared_read_only.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SYCL/USM/shared_read_only.cpp b/SYCL/USM/shared_read_only.cpp index 4d98359494..a6daadc0de 100644 --- a/SYCL/USM/shared_read_only.cpp +++ b/SYCL/USM/shared_read_only.cpp @@ -11,9 +11,7 @@ int main() { auto *p2 = sycl::malloc_shared(42, q); // CHECK: zeMemAllocShared - // TODO: The following has issues in underlying Level Zero RT and thus isn't - // used: - // {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_READ_MOSTLY}} + // TODO: Level Zero doesn't have API to communicate read-only guarantee yet. // CHECK: {{zeCommandListAppendMemAdvise.*ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION*}} // CHECK: zeMemAllocShared // CHECK-NOT: MemAdvise