From 6d963d95708aa63f708392e64e8d88c9af73e44b Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Thu, 21 Nov 2024 10:55:19 +0000 Subject: [PATCH 1/3] [SYCL][CUDA][HIP] Update images enable variable This patch adds a variable to enable image support for HIP, and updates the one for CUDA to use the UR naming. SYCL images support is similar for CUDA and HIP, so it makes sense to treat them the same, and any future work on this will focus on bindless images rather than SYCL images. --- sycl/test-e2e/format.py | 5 ++++- sycl/test-e2e/lit.cfg.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/format.py b/sycl/test-e2e/format.py index e6d0da2c39b7b..cb4ac86008db2 100644 --- a/sycl/test-e2e/format.py +++ b/sycl/test-e2e/format.py @@ -212,7 +212,10 @@ def get_extra_env(sycl_devices): ) if "cuda:gpu" in sycl_devices: - extra_env.append("SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT=1") + extra_env.append("UR_CUDA_ENABLE_IMAGE_SUPPORT=1") + + if "hip:gpu" in sycl_devices: + extra_env.append("UR_HIP_ENABLE_IMAGE_SUPPORT=1") return extra_env diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index 76a70bea76f6e..63f165a9609f8 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -663,7 +663,9 @@ def open_check_file(file_name): env = copy.copy(llvm_config.config.environment) env["ONEAPI_DEVICE_SELECTOR"] = sycl_device if sycl_device.startswith("cuda:"): - env["SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT"] = "1" + env["UR_CUDA_ENABLE_IMAGE_SUPPORT"] = "1" + if sycl_device.startswith("hip:"): + env["UR_HIP_ENABLE_IMAGE_SUPPORT"] = "1" # When using the ONEAPI_DEVICE_SELECTOR environment variable, sycl-ls # prints warnings that might derail a user thinking something is wrong # with their test run. It's just us filtering here, so silence them unless From 131c543175ede202c346b2a481a0516dcfc8bcc5 Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Thu, 21 Nov 2024 10:59:16 +0000 Subject: [PATCH 2/3] wip: use fork UR tag for testing --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 2 +- sycl/cmake/modules/UnifiedRuntimeTag.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 72841724fa01d..21e5c7c689704 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,7 +116,7 @@ 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/npmiller/unified-runtime.git") include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") diff --git a/sycl/cmake/modules/UnifiedRuntimeTag.cmake b/sycl/cmake/modules/UnifiedRuntimeTag.cmake index ed4da536baf31..3c06e97ba3536 100644 --- a/sycl/cmake/modules/UnifiedRuntimeTag.cmake +++ b/sycl/cmake/modules/UnifiedRuntimeTag.cmake @@ -1,7 +1,7 @@ -# commit 098deca1f9f3b9f3f0563ee823ac424d8db30668 -# Merge: 58e4d76c2ace 73ba29bfe9df -# Author: Martin Grant -# Date: Wed Dec 11 17:23:43 2024 +0000 -# Merge pull request #2299 from cppchedy/chedy/fix-mipmap-leak -# [CUDA][Bindless] Fix memory leak in interop mapping -set(UNIFIED_RUNTIME_TAG 098deca1f9f3b9f3f0563ee823ac424d8db30668) +# commit 9937d029c7fdcbf101e89f8515f640c145e059c5 +# Merge: 9ac6d5d9 10b0e101 +# Author: Callum Fare +# Date: Wed Nov 20 14:49:17 2024 +0000 +# Merge pull request #2258 from aarongreig/aaron/tryUseExtensionSubgroupInfo +# Use extension version of clGetKernelSubGroupInfo when necessary. +set(UNIFIED_RUNTIME_TAG 1b373f83c71eb39d440ca2c1ed82faf3bfa9b720) From 2950a2f67fbacd00f4cb950e4c1e75a95db291d6 Mon Sep 17 00:00:00 2001 From: Martin Morrison-Grant Date: Thu, 12 Dec 2024 11:06:40 +0000 Subject: [PATCH 3/3] [UR] Update tag to 06f48f6 for https://github.com/oneapi-src/unified-runtime/pull/2356. --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 2 +- sycl/cmake/modules/UnifiedRuntimeTag.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 21e5c7c689704..72841724fa01d 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,7 +116,7 @@ if(SYCL_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/npmiller/unified-runtime.git") + set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/UnifiedRuntimeTag.cmake) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") diff --git a/sycl/cmake/modules/UnifiedRuntimeTag.cmake b/sycl/cmake/modules/UnifiedRuntimeTag.cmake index 3c06e97ba3536..5a6980c6f219b 100644 --- a/sycl/cmake/modules/UnifiedRuntimeTag.cmake +++ b/sycl/cmake/modules/UnifiedRuntimeTag.cmake @@ -1,7 +1,7 @@ -# commit 9937d029c7fdcbf101e89f8515f640c145e059c5 -# Merge: 9ac6d5d9 10b0e101 -# Author: Callum Fare -# Date: Wed Nov 20 14:49:17 2024 +0000 -# Merge pull request #2258 from aarongreig/aaron/tryUseExtensionSubgroupInfo -# Use extension version of clGetKernelSubGroupInfo when necessary. -set(UNIFIED_RUNTIME_TAG 1b373f83c71eb39d440ca2c1ed82faf3bfa9b720) +# commit 06f48f674445532d8c04be431474901b82c3c449 +# Merge: 098deca1f9f3 1b373f83c71e +# Author: Martin Grant +# Date: Thu Dec 12 11:04:15 2024 +0000 +# Merge pull request #2356 from npmiller/hip-images +# [HIP] Disable SYCL images by default +set(UNIFIED_RUNTIME_TAG 06f48f674445532d8c04be431474901b82c3c449)