From b5d35b06fc518ee79256ce19133dbc5ef6ada258 Mon Sep 17 00:00:00 2001 From: Georgi Mirazchiyski Date: Thu, 12 Sep 2024 14:12:44 +0100 Subject: [PATCH 1/4] [SYCL] Enable checking the result of max_num_work_groups query with exceeded launch limits on more backends (hip and opencl) --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 4 ++-- sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 1c245a91ca59d..a57f18f631b46 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,14 +116,14 @@ if(SYCL_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") + set(UNIFIED_RUNTIME_REPO "https://github.com/GeorgeWeb/unified-runtime.git") # commit 897bcfb10a7e13b8e413278550e845322f6bd560 (HEAD, origin/main, origin/HEAD) # Merge: 18514924 71cdf253 # Author: Omar Ahmed # Date: Thu Sep 19 14:35:55 2024 +0100 # Merge pull request #2022 from nrspruit/add_3_channel_image_support # [L0] Add 3-channel image support - set(UNIFIED_RUNTIME_TAG 897bcfb10a7e13b8e413278550e845322f6bd560) + set(UNIFIED_RUNTIME_TAG 73ca4832abd86cd43405b2f53517d36d2b246bee) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need diff --git a/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp b/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp index 4b79c13d831c2..232c0586df249 100644 --- a/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp +++ b/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp @@ -161,9 +161,9 @@ int test_max_num_work_groups(sycl::queue &q, const sycl::device &dev) { // It cannot be possible to launch a kernel successfully with a configuration // that exceeds the available resources as in the above defined workGroupSize. // workGroupSize is larger than maxWorkGroupSize, hence maxWGs must equal 0. - // Note: Level-Zero currently always returns a non-zero value. While other - // backends (i.e., OpenCL, HIP) always return 1 in their implementations. - if (dev.get_backend() == sycl::backend::ext_oneapi_cuda) { + // Note: Level-Zero currently always returns a non-zero value. + // TODO: Remove the backend condition once the Level-Zero API issue is fixed. + if (dev.get_backend() != sycl::backend::ext_oneapi_level_zero) { assert(maxWGs == 0 && "max_num_work_groups query failed"); } From e9ba152ac15109fbd6249a19ac69bc86c8e0daeb Mon Sep 17 00:00:00 2001 From: Georgi Mirazchiyski Date: Fri, 27 Sep 2024 16:19:43 +0100 Subject: [PATCH 2/4] Update assert message --- sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp b/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp index 232c0586df249..fe8246bb2f56d 100644 --- a/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp +++ b/sycl/test-e2e/Basic/launch_queries/max_num_work_groups.cpp @@ -164,7 +164,10 @@ int test_max_num_work_groups(sycl::queue &q, const sycl::device &dev) { // Note: Level-Zero currently always returns a non-zero value. // TODO: Remove the backend condition once the Level-Zero API issue is fixed. if (dev.get_backend() != sycl::backend::ext_oneapi_level_zero) { - assert(maxWGs == 0 && "max_num_work_groups query failed"); + assert(maxWGs == 0 && + "max_num_work_groups query failed.\n" + "It should return 0 possible groups when the requested resources " + "by the lanuch config exceed those available in the hardware."); } // As we ensured that the 'max_num_work_groups' query correctly From 6759b8ef16aba70b99046cc3deeb3d2b8d7a074e Mon Sep 17 00:00:00 2001 From: Georgi Mirazchiyski Date: Fri, 27 Sep 2024 16:23:03 +0100 Subject: [PATCH 3/4] Update fetch UR commit tag --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index a57f18f631b46..38ed76e04054e 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,6 +116,8 @@ if(SYCL_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() + # TODO: Update 'UNIFIED_RUNTIME_REPO' and 'UNIFIED_RUNTIME_TAG' after the + # corresponding UR commit is merged in the main oneapi-src/unified-runtime. set(UNIFIED_RUNTIME_REPO "https://github.com/GeorgeWeb/unified-runtime.git") # commit 897bcfb10a7e13b8e413278550e845322f6bd560 (HEAD, origin/main, origin/HEAD) # Merge: 18514924 71cdf253 @@ -123,7 +125,7 @@ if(SYCL_UR_USE_FETCH_CONTENT) # Date: Thu Sep 19 14:35:55 2024 +0100 # Merge pull request #2022 from nrspruit/add_3_channel_image_support # [L0] Add 3-channel image support - set(UNIFIED_RUNTIME_TAG 73ca4832abd86cd43405b2f53517d36d2b246bee) + set(UNIFIED_RUNTIME_TAG ed6fbadf7490cade5dc51c68ba3faf928e7a24cc) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need From c90cb434864307ed511c9a4be9b8b722436427f0 Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Mon, 7 Oct 2024 12:31:19 +0100 Subject: [PATCH 4/4] Update UR tag. --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 64ffe1dee7228..894c5d76a4cc1 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -117,13 +117,14 @@ if(SYCL_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit b79ebe4e98789144bcdf3832088eb6e6b5ae6967 - # Merge: 7b4bc761 fbb6e862 - # Author: Kenneth Benzie (Benie) - # Date: Fri Oct 4 16:39:59 2024 +0100 - # Merge pull request #2018 from wenju-he/L0-bindless-image-device-query - # [L0] Fix device query of bindless image support - set(UNIFIED_RUNTIME_TAG b79ebe4e98789144bcdf3832088eb6e6b5ae6967) + # commit df6da35d6e67f2383db28dd49ab08c5c0ef541d2 + # Merge: 67590533 55bd5636 + # Author: aarongreig + # Date: Mon Oct 7 12:28:07 2024 +0100 + # Merge pull request #2038 from GeorgeWeb/georgi/unsupported-max-coop-wgsize + # [UR][hip][opencl] Mark urKernelSuggestMaxCooperativeGroupCountExp as unsupported + # instead of returning misleading default value + set(UNIFIED_RUNTIME_TAG df6da35d6e67f2383db28dd49ab08c5c0ef541d2) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need