From 345b352d1bedf5d592a999cf94b5dd65943c85fd Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Wed, 1 May 2024 11:35:19 -0700 Subject: [PATCH 01/35] Bump UR tag to test USM alloc change --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 12edff0fe90e2..3f60e608b9bdb 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -94,14 +94,8 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 1906ce76c9c2d2112584cc0679c25f00c4935e73 - # Merge: 3e3d8748 7f9b30f6 - # Author: Kenneth Benzie (Benie) - # Date: Tue Apr 30 11:25:19 2024 +0100 - # Merge pull request #1452 from jinge90/omp_device_global_intercept - # [ASAN] Intercept urProgramLink in sanitizer layer - set(UNIFIED_RUNTIME_TAG 1906ce76c9c2d2112584cc0679c25f00c4935e73) + set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG b604f08177ad7c13153ac862fe34b0848abf60b3) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 76e8429ed2dfc6c05dec74ce443b4ab0890a0d5c Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Wed, 1 May 2024 15:06:11 -0400 Subject: [PATCH 02/35] Update CMakeLists.txt --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 3f60e608b9bdb..139d404be71f1 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG b604f08177ad7c13153ac862fe34b0848abf60b3) + set(UNIFIED_RUNTIME_TAG 6a94375a3a6cae6782560fabb82b12c3d37f2db8) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 36f93a37d268c373103bf399eb489888dffdd705 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Wed, 1 May 2024 12:31:44 -0700 Subject: [PATCH 03/35] Add E2E test --- .../alloc_with_invalid_alignment.cpp | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sycl/test/regression/alloc_with_invalid_alignment.cpp diff --git a/sycl/test/regression/alloc_with_invalid_alignment.cpp b/sycl/test/regression/alloc_with_invalid_alignment.cpp new file mode 100644 index 0000000000000..bdb35acd2dca3 --- /dev/null +++ b/sycl/test/regression/alloc_with_invalid_alignment.cpp @@ -0,0 +1,73 @@ +// REQUIRES: level_zero +// RUN: %{build} -o %t.out +// RUN: %{run} %t.out + +//==----- alloc_with_invalid_alignment.cpp - SYCL USM allocation test-----==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--------------------------------------------------------------------===// + +#include + +using namespace sycl; +using namespace ext::oneapi::experimental; +using namespace ext::intel::experimental; +using alloc = usm::alloc; + +template void testAlign(sycl::queue &q, unsigned align) { + const sycl::context &Ctx = q.get_context(); + auto dev = q.get_device(); + + constexpr int N = 10; + assert(align > 0 || (align & (align - 1)) == 0); + auto ADevice = [&](size_t align, auto... args) { + return aligned_alloc_device(align, N, args...); + }; + auto AHost = [&](size_t align, auto... args) { + return aligned_alloc_host(align, N, args...); + }; + auto AShared = [&](size_t align, auto... args) { + return aligned_alloc_shared(align, N, args...); + }; + auto AAnnotated = [&](size_t align, auto... args) { + return aligned_alloc(align, N, args...); + }; + + // Test cases that are expected to return null + auto check_null = [&q](auto AllocFn, int Line, int Case) { + decltype(AllocFn()) Ptr = AllocFn(); + if (Ptr != nullptr) { + free(Ptr, q); + std::cout << "Failed at line " << Line << ", case " << Case << std::endl; + assert(false && "The return is not null!"); + } + }; + + auto CheckNullAll = [&](auto Funcs, int Line = __builtin_LINE()) { + std::apply( + [&](auto... Fs) { + int Case = 0; + (void)std::initializer_list{ + (check_null(Fs, Line, Case++), 0)...}; + }, + Funcs); + }; + CheckNullAll(std::tuple{ + // Case: aligned_alloc_xxx with no alignment property, and the alignment + // argument is not a power of 2, the result is nullptr + [&]() { return ADevice(3, q); }, [&]() { return ADevice(5, dev, Ctx); }, + [&]() { return AHost(7, q); }, [&]() { return AHost(9, Ctx); }, + [&]() { return AShared(114, q); }, + [&]() { return AShared(1023, dev, Ctx); }, + [&]() { return AAnnotated(15, q, alloc::device); }, + [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }}); +} + +int main() { + sycl::queue q; + testAlign(q, 4); + return 0; +} From ede574a567771d876f0eb97e14908e8135454142 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Wed, 1 May 2024 12:33:09 -0700 Subject: [PATCH 04/35] Add E2E test --- .../Regression}/alloc_with_invalid_alignment.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sycl/{test/regression => test-e2e/Regression}/alloc_with_invalid_alignment.cpp (100%) diff --git a/sycl/test/regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp similarity index 100% rename from sycl/test/regression/alloc_with_invalid_alignment.cpp rename to sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp From 442295d3ade2ef7519867dacff0f54d5b10293cf Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Wed, 1 May 2024 12:38:17 -0700 Subject: [PATCH 05/35] Update test --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index bdb35acd2dca3..8bf253e13b133 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -12,6 +12,10 @@ #include +// Purpose of this test is to verify that when SYCL is backed by L0, the aligned +// allocation USM functions will return null pointers when called with alignment +// values that are positive and not powers of 2 as per the SYCL and L0 spec. + using namespace sycl; using namespace ext::oneapi::experimental; using namespace ext::intel::experimental; From b99ca2374fb22c43a15474e55908e191d6adf196 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Wed, 1 May 2024 16:25:31 -0400 Subject: [PATCH 06/35] Update CMakeLists.txt --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 139d404be71f1..6129d3aaa8b9b 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 6a94375a3a6cae6782560fabb82b12c3d37f2db8) + set(UNIFIED_RUNTIME_TAG e256f5499df38659584cf5eece5bd84b93d6b119) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From d2e4aaa4472a99b60e3c1c6a8a74336ef56affbd Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 2 May 2024 13:30:52 -0400 Subject: [PATCH 07/35] Update alloc_with_invalid_alignment.cpp --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index 8bf253e13b133..d115c3f4961b6 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -2,14 +2,6 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -//==----- alloc_with_invalid_alignment.cpp - SYCL USM allocation test-----==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===--------------------------------------------------------------------===// - #include // Purpose of this test is to verify that when SYCL is backed by L0, the aligned From 1e362b99f4c6a5180340045db94a6419df4105fb Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 2 May 2024 13:32:36 -0400 Subject: [PATCH 08/35] Update alloc_with_invalid_alignment.cpp --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index d115c3f4961b6..daa7bf6633f79 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -38,7 +38,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (Ptr != nullptr) { free(Ptr, q); std::cout << "Failed at line " << Line << ", case " << Case << std::endl; - assert(false && "The return is not null!"); + assert(false && "Allocation function has returned a non-null pointer."); } }; From cb82ced5dece8a05eb9bf28562a9e70d099f53c0 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 2 May 2024 14:07:08 -0400 Subject: [PATCH 09/35] Update CMakeLists.txt --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 6129d3aaa8b9b..ba8f3770ef4f4 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG e256f5499df38659584cf5eece5bd84b93d6b119) + set(UNIFIED_RUNTIME_TAG 47e59a876b157603c9d0fb3f09c4790e601434ff) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From b49a6ab8d87b3c1851f4641e4d0a0674ff1a881a Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 2 May 2024 15:58:08 -0400 Subject: [PATCH 10/35] Update alloc_with_invalid_alignment.cpp --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index daa7bf6633f79..142e1d3727e79 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -4,9 +4,8 @@ #include -// Purpose of this test is to verify that when SYCL is backed by L0, the aligned -// allocation USM functions will return null pointers when called with alignment -// values that are positive and not powers of 2 as per the SYCL and L0 spec. +// This test verifies that for L0 backend, aligned USM alloc functions return +// null_ptr when called with alignment values that are not a power-of-2. using namespace sycl; using namespace ext::oneapi::experimental; From 50f16a3cb623f17ebb784fb4de048b2f5a4f311e Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 2 May 2024 16:00:05 -0400 Subject: [PATCH 11/35] Update CMakeLists.txt --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index ba8f3770ef4f4..f147b17d11fd8 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 47e59a876b157603c9d0fb3f09c4790e601434ff) + set(UNIFIED_RUNTIME_TAG 74e18f16c0576ba8e20e0017113791335cbfa81c) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From e53b0252f0f6848a1dddfa27df862384e7918e07 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Thu, 2 May 2024 14:09:24 -0700 Subject: [PATCH 12/35] Format tests --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index 142e1d3727e79..df5095534db3d 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -4,7 +4,7 @@ #include -// This test verifies that for L0 backend, aligned USM alloc functions return +// This test verifies that for L0 backend, aligned USM alloc functions return // null_ptr when called with alignment values that are not a power-of-2. using namespace sycl; From 5b6d96b14a741c4f5b68678614e3813ded554ad2 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Fri, 3 May 2024 13:22:31 -0700 Subject: [PATCH 13/35] Simplify testing logic --- .../alloc_with_invalid_alignment.cpp | 77 +++++++------------ 1 file changed, 28 insertions(+), 49 deletions(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index df5095534db3d..85e2ec2b9e1cb 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -2,67 +2,46 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +#include +#include #include // This test verifies that for L0 backend, aligned USM alloc functions return // null_ptr when called with alignment values that are not a power-of-2. using namespace sycl; -using namespace ext::oneapi::experimental; -using namespace ext::intel::experimental; -using alloc = usm::alloc; -template void testAlign(sycl::queue &q, unsigned align) { - const sycl::context &Ctx = q.get_context(); - auto dev = q.get_device(); +const size_t numBytes = 10; - constexpr int N = 10; - assert(align > 0 || (align & (align - 1)) == 0); - auto ADevice = [&](size_t align, auto... args) { - return aligned_alloc_device(align, N, args...); - }; - auto AHost = [&](size_t align, auto... args) { - return aligned_alloc_host(align, N, args...); - }; - auto AShared = [&](size_t align, auto... args) { - return aligned_alloc_shared(align, N, args...); - }; - auto AAnnotated = [&](size_t align, auto... args) { - return aligned_alloc(align, N, args...); - }; +int allocate_device(size_t alignment) { + sycl::queue q; + assert(!aligned_alloc_device(alignment, numBytes, q)); + return 0; +} - // Test cases that are expected to return null - auto check_null = [&q](auto AllocFn, int Line, int Case) { - decltype(AllocFn()) Ptr = AllocFn(); - if (Ptr != nullptr) { - free(Ptr, q); - std::cout << "Failed at line " << Line << ", case " << Case << std::endl; - assert(false && "Allocation function has returned a non-null pointer."); - } - }; +int allocate_shared(size_t alignment) { + sycl::queue q; + assert(!aligned_alloc_shared(alignment, numBytes, q)); + return 0; +} - auto CheckNullAll = [&](auto Funcs, int Line = __builtin_LINE()) { - std::apply( - [&](auto... Fs) { - int Case = 0; - (void)std::initializer_list{ - (check_null(Fs, Line, Case++), 0)...}; - }, - Funcs); - }; - CheckNullAll(std::tuple{ - // Case: aligned_alloc_xxx with no alignment property, and the alignment - // argument is not a power of 2, the result is nullptr - [&]() { return ADevice(3, q); }, [&]() { return ADevice(5, dev, Ctx); }, - [&]() { return AHost(7, q); }, [&]() { return AHost(9, Ctx); }, - [&]() { return AShared(114, q); }, - [&]() { return AShared(1023, dev, Ctx); }, - [&]() { return AAnnotated(15, q, alloc::device); }, - [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }}); +int allocate_host(size_t alignment) { + sycl::queue q; + assert(!aligned_alloc_host(alignment, numBytes, q)); + return 0; } int main() { - sycl::queue q; - testAlign(q, 4); + constexpr size_t alignmentCount = 20; + size_t alignments[alignmentCount] = {3, 5, 6, 7, 9, 10, 12, + 15, 17, 18, 24, 30, 31, 33, + 63, 65, 100, 1023, 2049, 2050}; + int allocations[alignmentCount]; + std::transform(alignments, alignments + alignmentCount - 1, allocations, + allocate_device); + std::transform(alignments, alignments + alignmentCount - 1, allocations, + allocate_shared); + std::transform(alignments, alignments + alignmentCount - 1, allocations, + allocate_host); return 0; } From 1d54c0cfea04e7bcd4b442fc985bd5dfe5d8cb88 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Fri, 3 May 2024 13:26:57 -0700 Subject: [PATCH 14/35] Update L0 tag to new changes --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 4ef9eb67dabe1..f147b17d11fd8 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -98,14 +98,8 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) set(UNIFIED_RUNTIME_TAG 74e18f16c0576ba8e20e0017113791335cbfa81c) fetch_adapter_source(level_zero - "https://github.com/oneapi-src/unified-runtime.git" - # commit f3c551963d0612bfac252bc5c82796289939ebeb - # Merge: ebf873fb 987c422c - # Author: Kenneth Benzie (Benie) - # Date: Thu May 2 15:26:34 2024 +0100 - # Merge pull request #1526 from nrspruit/event_signal_optional - # [L0] Enable Batching out of order commands without signal events - f3c551963d0612bfac252bc5c82796289939ebeb + ${UNIFIED_RUNTIME_REPO} + ${UNIFIED_RUNTIME_TAG} ) fetch_adapter_source(opencl From e78a532a6c5fe80d92ee818bb080ef2e64801c85 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Fri, 3 May 2024 13:35:06 -0700 Subject: [PATCH 15/35] Use for_each instead of transform in E2E test --- .../alloc_with_invalid_alignment.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index 85e2ec2b9e1cb..ba6d699b04c0c 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -13,22 +13,19 @@ using namespace sycl; const size_t numBytes = 10; -int allocate_device(size_t alignment) { +void allocate_device(size_t alignment) { sycl::queue q; assert(!aligned_alloc_device(alignment, numBytes, q)); - return 0; } -int allocate_shared(size_t alignment) { +void allocate_shared(size_t alignment) { sycl::queue q; assert(!aligned_alloc_shared(alignment, numBytes, q)); - return 0; } -int allocate_host(size_t alignment) { +void allocate_host(size_t alignment) { sycl::queue q; assert(!aligned_alloc_host(alignment, numBytes, q)); - return 0; } int main() { @@ -36,12 +33,8 @@ int main() { size_t alignments[alignmentCount] = {3, 5, 6, 7, 9, 10, 12, 15, 17, 18, 24, 30, 31, 33, 63, 65, 100, 1023, 2049, 2050}; - int allocations[alignmentCount]; - std::transform(alignments, alignments + alignmentCount - 1, allocations, - allocate_device); - std::transform(alignments, alignments + alignmentCount - 1, allocations, - allocate_shared); - std::transform(alignments, alignments + alignmentCount - 1, allocations, - allocate_host); + std::for_each(alignments, alignments + alignmentCount - 1, allocate_device); + std::for_each(alignments, alignments + alignmentCount - 1, allocate_shared); + std::for_each(alignments, alignments + alignmentCount - 1, allocate_host); return 0; } From fb75fd00c3ee1998f0b017e8a48f6cb99e154c3e Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Thu, 23 May 2024 12:12:11 -0400 Subject: [PATCH 16/35] Update sycl/plugins/unified_runtime/CMakeLists.txt Co-authored-by: Kenneth Benzie (Benie) --- sycl/plugins/unified_runtime/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index f147b17d11fd8..409e6c1c71726 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -94,8 +94,15 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 74e18f16c0576ba8e20e0017113791335cbfa81c) + set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") + # commit 79b6d698aecd40e44e5872fba15701e10597f694 + # Author: Kenneth Benzie (Benie) + # Date: Tue May 14 14:22:11 2024 +0100 + # [HIP] Implement kernel set spec constant query + # Handle the `UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS` device + # query to report the feature is not supported. This also causes the + # `urKernelSetSpecializationConstants` tests to be skipped. + set(79b6d698aecd40e44e5872fba15701e10597f694) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From dfcd4275bdaacebfb4a14dfb6b5f4290e1fc674c Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Fri, 24 May 2024 12:32:31 -0400 Subject: [PATCH 17/35] Update alloc_with_invalid_alignment.cpp --- sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp index ba6d699b04c0c..cb0e63f15217c 100644 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp @@ -4,7 +4,8 @@ #include #include -#include +#include +#include // This test verifies that for L0 backend, aligned USM alloc functions return // null_ptr when called with alignment values that are not a power-of-2. From f01ea949c6401ce452da1e2915654b5645b39254 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Fri, 24 May 2024 17:55:06 -0400 Subject: [PATCH 18/35] Update align.cpp --- sycl/test-e2e/USM/align.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 4f105a079d3e6..fb3b97bc3ee47 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -1,14 +1,9 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// UNSUPPORTED: gpu // E2E tests for annotated USM allocation functions with alignment arguments -// that are not powers of 2. Note this test does not work on gpu because some -// tests expect non-templated aligned_alloc_xxx functions to return nullptr, -// e.g. when the alignment argument is not a power of 2, while they fail to do -// so when run on gpu. This maybe because the gpu runtime has different -// behavior. Therefore, GPU is unsupported until issue #12638 gets resolved. +// that are not powers of 2. #include #include From c26e0837212bc5df5029e4cd233c14cdf62c7034 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Fri, 24 May 2024 17:59:56 -0400 Subject: [PATCH 19/35] Delete sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp --- .../alloc_with_invalid_alignment.cpp | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp diff --git a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp b/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp deleted file mode 100644 index cb0e63f15217c..0000000000000 --- a/sycl/test-e2e/Regression/alloc_with_invalid_alignment.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// REQUIRES: level_zero -// RUN: %{build} -o %t.out -// RUN: %{run} %t.out - -#include -#include -#include -#include - -// This test verifies that for L0 backend, aligned USM alloc functions return -// null_ptr when called with alignment values that are not a power-of-2. - -using namespace sycl; - -const size_t numBytes = 10; - -void allocate_device(size_t alignment) { - sycl::queue q; - assert(!aligned_alloc_device(alignment, numBytes, q)); -} - -void allocate_shared(size_t alignment) { - sycl::queue q; - assert(!aligned_alloc_shared(alignment, numBytes, q)); -} - -void allocate_host(size_t alignment) { - sycl::queue q; - assert(!aligned_alloc_host(alignment, numBytes, q)); -} - -int main() { - constexpr size_t alignmentCount = 20; - size_t alignments[alignmentCount] = {3, 5, 6, 7, 9, 10, 12, - 15, 17, 18, 24, 30, 31, 33, - 63, 65, 100, 1023, 2049, 2050}; - std::for_each(alignments, alignments + alignmentCount - 1, allocate_device); - std::for_each(alignments, alignments + alignmentCount - 1, allocate_shared); - std::for_each(alignments, alignments + alignmentCount - 1, allocate_host); - return 0; -} From a15250beade6c388ef1740f7c88d8174e5a0daff Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Fri, 24 May 2024 18:06:11 -0400 Subject: [PATCH 20/35] Update align.cpp --- sycl/test-e2e/USM/align.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index fb3b97bc3ee47..5181bd861cb53 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -1,7 +1,6 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out - // E2E tests for annotated USM allocation functions with alignment arguments // that are not powers of 2. From 50f30027762c26cb91b347172757d8e2d43b805b Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Fri, 24 May 2024 19:43:06 -0700 Subject: [PATCH 21/35] Verify that device supports shared allocations --- sycl/test-e2e/USM/align.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 5181bd861cb53..0660a310e5f0a 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -29,7 +29,10 @@ template void testAlign(sycl::queue &q, unsigned align) { return aligned_alloc_host(align, N, args...); }; auto AShared = [&](size_t align, auto... args) { - return aligned_alloc_shared(align, N, args...); + if (dev.has(aspect::usm_shared_allocations)) { + return aligned_alloc_shared(align, N, args...); + } + return (void*)nullptr; }; auto AAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); @@ -42,7 +45,10 @@ template void testAlign(sycl::queue &q, unsigned align) { return aligned_alloc_host(align, N, args...); }; auto ATShared = [&](size_t align, auto... args) { - return aligned_alloc_shared(align, N, args...); + if (dev.has(aspect::usm_shared_allocations)) { + return aligned_alloc_shared(align, N, args...); + } + return (T*)nullptr; }; auto ATAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); From 5daf4e8d88783b9a1f3e4a7a734556e797d03c95 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Fri, 24 May 2024 20:10:50 -0700 Subject: [PATCH 22/35] Fix clang-format check. --- sycl/test-e2e/USM/align.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 0660a310e5f0a..818fbb4ac29a2 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -32,7 +32,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return (void*)nullptr; + return (void *)nullptr; }; auto AAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); @@ -48,7 +48,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return (T*)nullptr; + return (T *)nullptr; }; auto ATAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); From de5be276526f0a84e34f66ef6315c1c8d8622c87 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Mon, 27 May 2024 10:09:58 -0400 Subject: [PATCH 23/35] Update sycl/test-e2e/USM/align.cpp Co-authored-by: ldrumm --- sycl/test-e2e/USM/align.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 818fbb4ac29a2..b93b542d4a44f 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -32,7 +32,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return (void *)nullptr; + return nullptr; }; auto AAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); From d02831948b15e38124fdfc903479bac48c8309e7 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Mon, 27 May 2024 10:10:06 -0400 Subject: [PATCH 24/35] Update sycl/test-e2e/USM/align.cpp Co-authored-by: ldrumm --- sycl/test-e2e/USM/align.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index b93b542d4a44f..31b53d5b99e5d 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -48,7 +48,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return (T *)nullptr; + return nullptr; }; auto ATAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); From cbfe27d5d8564c7960720e3175676c8a3fb051b0 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 09:47:10 -0700 Subject: [PATCH 25/35] Revert back removal of casts of nullptr to pointer types --- sycl/test-e2e/USM/align.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 31b53d5b99e5d..818fbb4ac29a2 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -32,7 +32,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return nullptr; + return (void *)nullptr; }; auto AAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); @@ -48,7 +48,7 @@ template void testAlign(sycl::queue &q, unsigned align) { if (dev.has(aspect::usm_shared_allocations)) { return aligned_alloc_shared(align, N, args...); } - return nullptr; + return (T *)nullptr; }; auto ATAnnotated = [&](size_t align, auto... args) { return aligned_alloc(align, N, args...); From 1e1076f10538587bd51d4b7eb0cccd6588a219e8 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 10:21:36 -0700 Subject: [PATCH 26/35] Change UR tag to point to local fork --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index a8fbd568bf5fd..8cd597b4b81db 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -94,14 +94,8 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 396fb20498c315a526c961d7cb645b42795acd2c - # Merge: 719bb9cd e2ffea69 - # Author: Kenneth Benzie (Benie) - # Date: Thu May 23 10:53:03 2024 +0100 - # Merge pull request #1501 from RossBrunton/ross/kerneltests - # [Testing] Spec clarifications and testing updates for kernel - set(UNIFIED_RUNTIME_TAG 396fb20498c315a526c961d7cb645b42795acd2c) + set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG b2c37dfd3ddcd3233a1ae886ec69b26af691657f) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 24ead39452d92caf574020fc13bb93bce4d2a576 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 12:35:37 -0700 Subject: [PATCH 27/35] Simplify and expand scope of alignment allocation test on various backends --- sycl/test-e2e/USM/align.cpp | 82 +++++++++++++------------------------ 1 file changed, 28 insertions(+), 54 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 818fbb4ac29a2..6de86e16ad3ea 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -1,8 +1,11 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// E2E tests for annotated USM allocation functions with alignment arguments -// that are not powers of 2. +// E2E tests for aligned USM allocation functions with different alignment +// arguments. Depending on the backend the alignment may or may not be supported +// but either way, according to the SYCL spec, we should see a nullptr if it is +// not supported or we should verify that the pointer returned is indeed +// aligned if it is supported. #include #include @@ -23,75 +26,46 @@ template void testAlign(sycl::queue &q, unsigned align) { assert(align > 0 || (align & (align - 1)) == 0); auto ADevice = [&](size_t align, auto... args) { - return aligned_alloc_device(align, N, args...); + auto ptr = aligned_alloc_device(align, N, args...); + assert(!ptr || !(reinterpret_cast(ptr) % align)); + return 0; }; auto AHost = [&](size_t align, auto... args) { - return aligned_alloc_host(align, N, args...); + auto ptr = aligned_alloc_host(align, N, args...); + assert(!ptr || !(reinterpret_cast(ptr) % align)); + return 0; }; auto AShared = [&](size_t align, auto... args) { + void *ptr = nullptr; if (dev.has(aspect::usm_shared_allocations)) { - return aligned_alloc_shared(align, N, args...); + ptr = aligned_alloc_shared(align, N, args...); } - return (void *)nullptr; + assert(!ptr || !(reinterpret_cast(ptr) % align)); + return 0; }; auto AAnnotated = [&](size_t align, auto... args) { - return aligned_alloc(align, N, args...); + auto ptr = aligned_alloc(align, N, args...); + assert(!ptr || !(reinterpret_cast(ptr) % align)); + return 0; }; - auto ATDevice = [&](size_t align, auto... args) { - return aligned_alloc_device(align, N, args...); - }; - auto ATHost = [&](size_t align, auto... args) { - return aligned_alloc_host(align, N, args...); - }; - auto ATShared = [&](size_t align, auto... args) { - if (dev.has(aspect::usm_shared_allocations)) { - return aligned_alloc_shared(align, N, args...); - } - return (T *)nullptr; - }; - auto ATAnnotated = [&](size_t align, auto... args) { - return aligned_alloc(align, N, args...); - }; - - // Test cases that are expected to return null - auto check_null = [&q](auto AllocFn, int Line, int Case) { - decltype(AllocFn()) Ptr = AllocFn(); - if (Ptr != nullptr) { - free(Ptr, q); - std::cout << "Failed at line " << Line << ", case " << Case << std::endl; - assert(false && "The return is not null!"); - } - }; - - auto CheckNullAll = [&](auto Funcs, int Line = __builtin_LINE()) { - std::apply( - [&](auto... Fs) { - int Case = 0; - (void)std::initializer_list{ - (check_null(Fs, Line, Case++), 0)...}; - }, - Funcs); + auto CheckNullOrAlignedAll = [&](auto Funcs) { + std::apply([&](auto... Fs) { (void)std::initializer_list{Fs()...}; }, + Funcs); }; - CheckNullAll(std::tuple{ - // Case: aligned_alloc_xxx with no alignment property, and the alignment - // argument is not a power of 2, the result is nullptr + CheckNullOrAlignedAll(std::tuple{ [&]() { return ADevice(3, q); }, [&]() { return ADevice(5, dev, Ctx); }, [&]() { return AHost(7, q); }, [&]() { return AHost(9, Ctx); }, [&]() { return AShared(114, q); }, [&]() { return AShared(1023, dev, Ctx); }, [&]() { return AAnnotated(15, q, alloc::device); }, - [&]() { return AAnnotated(17, dev, Ctx, alloc::host); } - // Case: aligned_alloc_xxx with no alignment property, and the - // alignment argument is not a power of 2, the result is nullptr - , - [&]() { return ATDevice(3, q); }, [&]() { return ATDevice(5, dev, Ctx); }, - [&]() { return ATHost(7, q); }, [&]() { return ATHost(9, Ctx); }, - [&]() { return ATShared(1919, q); }, - [&]() { return ATShared(11, dev, Ctx); }, - [&]() { return ATAnnotated(15, q, alloc::device); }, - [&]() { return ATAnnotated(17, dev, Ctx, alloc::host); }}); + [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }, + [&]() { return ADevice(1 << 10, q); }, + [&]() { return AHost(1 << 12, q); }, + [&]() { return AShared(1 << 13, q); }, + [&]() { return ADevice(1 << 16, q); }, + [&]() { return ADevice(1 << 20, q); }}); } int main() { From a6efd3f6e5f6dd54753aeff565e9c3cb74a9260f Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 12:39:10 -0700 Subject: [PATCH 28/35] Simplify and expand scope of aligned allocation test on various backends --- sycl/test-e2e/USM/align.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 6de86e16ad3ea..9e5801e128700 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -61,6 +61,8 @@ template void testAlign(sycl::queue &q, unsigned align) { [&]() { return AShared(1023, dev, Ctx); }, [&]() { return AAnnotated(15, q, alloc::device); }, [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }, + [&]() { return ADevice(1 << 0, q); }, + [&]() { return AShared(1 << 1, q); }, [&]() { return ADevice(1 << 10, q); }, [&]() { return AHost(1 << 12, q); }, [&]() { return AShared(1 << 13, q); }, From 1b98c47fd89b6f33d638df2777d01b033792bd3c Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 14:22:05 -0700 Subject: [PATCH 29/35] Update UR tag to latest commit in fork --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 8cd597b4b81db..4bb45a5624957 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG b2c37dfd3ddcd3233a1ae886ec69b26af691657f) + set(UNIFIED_RUNTIME_TAG 293565236c0ed775b03e253e4b7189b8acdd1851) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From c934e7af7d14600784e56ed5b4a3d020b9611f65 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 14:41:37 -0700 Subject: [PATCH 30/35] Change UR tag to point to latest changes on fork --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 4bb45a5624957..b772bdedf3aa2 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 293565236c0ed775b03e253e4b7189b8acdd1851) + set(UNIFIED_RUNTIME_TAG e3f526cce70aa29628145c0e8ffe01211d2dbc9e) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 5a1aceb3089bca5b3e0c0e0bb84968087c71fade Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Mon, 27 May 2024 21:37:48 -0700 Subject: [PATCH 31/35] Change UR tag to include latest changes in fork --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index b772bdedf3aa2..d3f031aeec0d3 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG e3f526cce70aa29628145c0e8ffe01211d2dbc9e) + set(UNIFIED_RUNTIME_TAG 1530cf9d44512e55b326231b8d6118f90224755c) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From b0bf6d6f827415ec5a303c583cb2e02f8e15ac7e Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Tue, 28 May 2024 02:41:05 -0400 Subject: [PATCH 32/35] Update align.cpp --- sycl/test-e2e/USM/align.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 9e5801e128700..0ff44d4a67c12 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -o %t.out +// RUN: %{build} -DNDEBUG -o %t.out // RUN: %{run} %t.out // E2E tests for aligned USM allocation functions with different alignment From 46c64420f528215c9ce014a902520eb65dd87cb4 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Tue, 28 May 2024 08:58:15 -0400 Subject: [PATCH 33/35] Update align.cpp --- sycl/test-e2e/USM/align.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 0ff44d4a67c12..28322df5a64e9 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -1,4 +1,4 @@ -// RUN: %{build} -DNDEBUG -o %t.out +// RUN: %{build} -o %t.out // RUN: %{run} %t.out // E2E tests for aligned USM allocation functions with different alignment @@ -66,8 +66,7 @@ template void testAlign(sycl::queue &q, unsigned align) { [&]() { return ADevice(1 << 10, q); }, [&]() { return AHost(1 << 12, q); }, [&]() { return AShared(1 << 13, q); }, - [&]() { return ADevice(1 << 16, q); }, - [&]() { return ADevice(1 << 20, q); }}); + [&]() { return ADevice(1 << 16, q); }}); } int main() { From 3ebbecdf5d8c786dbc981d793f86b14ba55dc2b1 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi <113361374+lbushi25@users.noreply.github.com> Date: Tue, 28 May 2024 11:25:09 -0400 Subject: [PATCH 34/35] Update align.cpp --- sycl/test-e2e/USM/align.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sycl/test-e2e/USM/align.cpp b/sycl/test-e2e/USM/align.cpp index 28322df5a64e9..37272f581d3ce 100755 --- a/sycl/test-e2e/USM/align.cpp +++ b/sycl/test-e2e/USM/align.cpp @@ -60,13 +60,7 @@ template void testAlign(sycl::queue &q, unsigned align) { [&]() { return AShared(114, q); }, [&]() { return AShared(1023, dev, Ctx); }, [&]() { return AAnnotated(15, q, alloc::device); }, - [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }, - [&]() { return ADevice(1 << 0, q); }, - [&]() { return AShared(1 << 1, q); }, - [&]() { return ADevice(1 << 10, q); }, - [&]() { return AHost(1 << 12, q); }, - [&]() { return AShared(1 << 13, q); }, - [&]() { return ADevice(1 << 16, q); }}); + [&]() { return AAnnotated(17, dev, Ctx, alloc::host); }}); } int main() { From 2ce41d093739598347660f9717e911a45335b30d Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Wed, 29 May 2024 10:04:06 -0700 Subject: [PATCH 35/35] Update UR tag --- sycl/plugins/unified_runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index d3f031aeec0d3..902de021d3ebb 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -95,7 +95,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/lbushi25/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 1530cf9d44512e55b326231b8d6118f90224755c) + set(UNIFIED_RUNTIME_TAG 8a90ad7e15deb9fd78027b2c30fe7bce01c649c6) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO}