From 0c13307a6d175019dfb32798159f040c9aa6facc Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Fri, 9 Feb 2024 15:08:20 +0000 Subject: [PATCH 1/4] Pull in UR changes: spec motivated refactors. --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++-------- sycl/plugins/unified_runtime/pi2ur.hpp | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 94769a36373d..180a200e6f2f 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 8438b8a1de1ddc6e05e3bc012fb6be74d2e830e4 - # Merge: 6076b0622452 847b3ace28b8 - # Author: Fábio - # Date: Mon May 6 18:00:46 2024 +0100 - # Merge branch 'main' into fabio/command-buffer-refactor - # [EXP][Command-Buffer] Remove duplicated code from headers - set(UNIFIED_RUNTIME_TAG 8438b8a1de1ddc6e05e3bc012fb6be74d2e830e4) + set(UNIFIED_RUNTIME_REPO "https://github.com/aarongreig/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG aaron/specMotivatedRefactors) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 889518aa76db..3efd9d62b269 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -124,7 +124,7 @@ static pi_result ur2piResult(ur_result_t urResult) { return PI_ERROR_INVALID_BINARY; case UR_RESULT_ERROR_INVALID_GLOBAL_NAME: return PI_ERROR_INVALID_VALUE; - case UR_RESULT_ERROR_INVALID_FUNCTION_NAME: + case UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE: return PI_ERROR_FUNCTION_ADDRESS_IS_NOT_AVAILABLE; case UR_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION: return PI_ERROR_INVALID_WORK_DIMENSION; From 56998913ba7d4fe0d9346423cf056cd3dc8fc3f2 Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Mon, 24 Jun 2024 16:42:26 +0100 Subject: [PATCH 2/4] Update to rebased UR tag --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index b1ef3f71ae17..678f8a707a16 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -99,14 +99,14 @@ 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") + set(UNIFIED_RUNTIME_REPO "https://github.com/aarongreig/unified-runtime.git") # commit 1e9b1b493fe30e6236bf611ae6d82366c9376f6c # Merge: a011f092 d8500a36 # Author: Kenneth Benzie (Benie) # Date: Fri Jun 21 10:22:52 2024 +0100 # Merge pull request #805 from aarongreig/aaron/kernelSetArgIndirectionFix # Correct level of indirection used in KernelSetArgPointer calls. - set(UNIFIED_RUNTIME_TAG 1e9b1b493fe30e6236bf611ae6d82366c9376f6c) + set(UNIFIED_RUNTIME_TAG aaron/specMotivatedRefactors) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 81fe23ee25d2ebf3c6d8a6ab1c4e3ea77a38460c Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Wed, 26 Jun 2024 15:53:24 +0100 Subject: [PATCH 3/4] Add missing pi2ur update. --- sycl/plugins/unified_runtime/CMakeLists.txt | 16 ++-------------- sycl/plugins/unified_runtime/pi2ur.hpp | 14 ++------------ 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 95a39dde3c6a..678f8a707a16 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -110,13 +110,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} - # commit f040b1fea9313561c01ccdb81ea3ca52c1c62061 - # Merge: 08acafb6 b3f36b96 - # Author: Callum Fare - # Date: Tue Jun 25 11:19:54 2024 +0100 - # Merge pull request #1778 from nrspruit/fix_multi_driver_exp_handle - # [L0] Fix Handle used in calls to L0 Driver zex apis given multi drivers - f040b1fea9313561c01ccdb81ea3ca52c1c62061 + ${UNIFIED_RUNTIME_TAG} ) fetch_adapter_source(opencl @@ -126,13 +120,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(cuda ${UNIFIED_RUNTIME_REPO} - # commit 08acafb6b36c9ff12753922365df150f677655e7 - # Merge: 1e9b1b49 8e5a33b6 - # Author: Callum Fare - # Date: Mon Jun 24 10:56:12 2024 +0100 - # Merge pull request #1714 from cppchedy/chedy/fix-copy-in-bytes-bug - # [CUDA][Bindless][Exp] Fix subregion copies - 08acafb6b36c9ff12753922365df150f677655e7 + ${UNIFIED_RUNTIME_TAG} ) fetch_adapter_source(hip diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index ef28c47792df..53a7fe6dcea6 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -2423,18 +2423,8 @@ inline pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName, break; } case PI_KERNEL_INFO_NUM_ARGS: { - size_t NumArgs = 0; - HANDLE_ERRORS(urKernelGetInfo(UrKernel, UR_KERNEL_INFO_NUM_ARGS, - sizeof(NumArgs), &NumArgs, nullptr)); - if (ParamValueSizeRet) { - *ParamValueSizeRet = sizeof(uint32_t); - } - if (ParamValue) { - if (ParamValueSize != sizeof(uint32_t)) - return PI_ERROR_INVALID_BUFFER_SIZE; - *static_cast(ParamValue) = static_cast(NumArgs); - } - return PI_SUCCESS; + UrParamName = UR_KERNEL_INFO_NUM_ARGS; + break; } case PI_KERNEL_INFO_REFERENCE_COUNT: { UrParamName = UR_KERNEL_INFO_REFERENCE_COUNT; From 3620957003e67101ec14977973971f49ebf2b712 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 4 Jul 2024 10:39:11 +0100 Subject: [PATCH 4/4] [UR] Bump main tag to 0cbacd8a --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index bae1164d24b1..a06ecdd12e1e 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -99,8 +99,14 @@ 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/aarongreig/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG aaron/specMotivatedRefactors) + set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") + # commit 0cbacd8a0844acb64091ecbb0c7d6a7df1b6160e + # Merge: 022df8ac 2f121cd8 + # Author: Kenneth Benzie (Benie) + # Date: Thu Jul 4 10:37:58 2024 +0100 + # Merge pull request #1212 from aarongreig/aaron/specMotivatedRefactors + # Batch adapter changes: spec motivated refactors + set(UNIFIED_RUNTIME_TAG 0cbacd8a0844acb64091ecbb0c7d6a7df1b6160e) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO}