From ed2b572536054433e3c0ede89a0cbbcecb21190f Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Thu, 11 Jan 2024 16:46:46 +0000 Subject: [PATCH 01/30] [SYCL][Bindless] Add image_mem_handle to image_mem_handle devices copies. --- .../sycl_ext_oneapi_bindless_images.asciidoc | 28 +++++- sycl/include/sycl/handler.hpp | 12 +++ sycl/include/sycl/queue.hpp | 68 +++++++++++++ sycl/plugins/unified_runtime/CMakeLists.txt | 11 +-- sycl/source/detail/memory_manager.cpp | 4 +- sycl/source/handler.cpp | 36 +++++++ .../bindless_images/device_to_device_copy.cpp | 99 +++++++++++++++++++ 7 files changed, 248 insertions(+), 10 deletions(-) create mode 100644 sycl/test-e2e/bindless_images/device_to_device_copy.cpp diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc index d37670db4641c..bbababd363c75 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -749,6 +749,12 @@ public: size_t DeviceRowPitch, sycl::range<3> HostExtent, sycl::range<3> CopyExtent); + + // Simple device to device copy + void ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc); }; class queue { @@ -874,6 +880,22 @@ public: size_t DeviceRowPitch, sycl::range<3> HostExtent, sycl::range<3> CopyExtent); + + // Simple device to device copy + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc); + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc, + event DepEvent); + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc, + const std::vector &DepEvents); }; } ``` @@ -881,7 +903,9 @@ public: To enable the copying of images an `ext_oneapi_copy` function is proposed as a method of the queue and handler. It can be used to copy image memory, whether allocated through USM or using an `image_mem_handle`, from host to -device, or device to host. For the `ext_oneapi_copy` variants that do not take +device, or device to host. Device to device copies are currently supported only +through `image_mem_handle` allocations. +For the `ext_oneapi_copy` variants that do not take offsets and extents, the image descriptor passed to the `ext_oneapi_copy` API is used to determine the pixel size, dimensions, and extent in memory of the image to copy. If performing sub-region copy, the size of the memory region is @@ -2060,4 +2084,6 @@ These features still need to be handled: wording around what types are allowed to be read or written. - Allow `read_image` and `read_mipmap` to return a user-defined type. +|5.1|2024-01-17| - Added overload for `ext_oneapi_copy` enabling device to device + copies using `image_mem_handle`. |====================== diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 382be028af841..ebf2400139bed 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -3227,6 +3227,18 @@ class __SYCL_EXPORT handler { const ext::oneapi::experimental::image_descriptor &DeviceImgDesc, size_t DeviceRowPitch); + /// Copies data from device to device memory, where \p Src and \p Dest + /// are opaque image memory handles. + /// An exception is thrown if either \p Src or \p Dest is incomplete + /// + /// \param Src is an opaque image memory handle to the source memory. + /// \param Dest is an opaque image memory handle to the destination memory. + /// \param ImageDesc is the source image descriptor + void + ext_oneapi_copy(ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc); + /// Copies data from one memory region to another, where \p Src and \p Dest /// are USM pointers. Allows for a sub-region copy, where \p SrcOffset , /// \p DestOffset , and \p Extent are used to determine the sub-region. diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 23008e75b80fb..bc6dbdcdee87d 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -1917,6 +1917,74 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { CodeLoc); } + /// Copies data from device to device memory, where \p Src and \p Dest + /// are opaque image memory handles. + /// An exception is thrown if either \p Src or \p Dest is incomplete + /// + /// \param Src is an opaque image memory handle to the source memory. + /// \param Dest is an opaque image memory handle to the destination memory. + /// \param ImageDesc is the source image descriptor + /// \param DepEvent is an events that specifies the kernel dependency. + /// \return an event representing the copy operation. + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc, + event DepEvent, + const detail::code_location &CodeLoc = detail::code_location::current()) { + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { + CGH.depends_on(DepEvent); + CGH.ext_oneapi_copy(Src, Dest, ImageDesc); + }, + CodeLoc); + } + + /// Copies data from device to device memory, where \p Src and \p Dest + /// are opaque image memory handles. + /// An exception is thrown if either \p Src or \p Dest is incomplete + /// + /// \param Src is an opaque image memory handle to the source memory. + /// \param Dest is an opaque image memory handle to the destination memory. + /// \param ImageDesc is the source image descriptor + /// \param DepEvents is a vector of events that specifies the kernel + /// dependencies. + /// \return an event representing the copy operation. + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc, + const std::vector &DepEvents, + const detail::code_location &CodeLoc = detail::code_location::current()) { + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { + CGH.depends_on(DepEvents); + CGH.ext_oneapi_copy(Src, Dest, ImageDesc); + }, + CodeLoc); + } + + /// Copies data from device to device memory, where \p Src and \p Dest + /// are opaque image memory handles. + /// An exception is thrown if either \p Src or \p Dest is incomplete + /// + /// \param Src is an opaque image memory handle to the source memory. + /// \param Dest is an opaque image memory handle to the destination memory. + /// \param ImageDesc is the source image descriptor + /// \return an event representing the copy operation. + event ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc, + const detail::code_location &CodeLoc = detail::code_location::current()) { + detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); + return submit( + [&](handler &CGH) { CGH.ext_oneapi_copy(Src, Dest, ImageDesc); }, + CodeLoc); + } + /// Copies data from one memory region to another, where \p Src and \p Dest /// are USM pointers. Allows for a sub-region copy, where \p SrcOffset , /// \p DestOffset , and \p Extent are used to determine the sub-region. diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 8d7f2f32b4158..73d0fb826c5b4 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -56,14 +56,9 @@ endif() if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 79c28d0f0713f58358d5080653d95803fd131749 - # Merge: 25e0b603 45d76b78 - # Author: aarongreig - # Date: Fri Jan 12 16:14:44 2024 +0000 - # Merge pull request #1186 from hdelan/device-global-hip - # [HIP] Add support for global variable read write - set(UNIFIED_RUNTIME_TAG 79c28d0f0713f58358d5080653d95803fd131749) + set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG 0942022ba947f1832056ffa9e317dc1384c382e0) + if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}") diff --git a/sycl/source/detail/memory_manager.cpp b/sycl/source/detail/memory_manager.cpp index 0daa53587ed4d..3ca426daafd6c 100644 --- a/sycl/source/detail/memory_manager.cpp +++ b/sycl/source/detail/memory_manager.cpp @@ -1755,7 +1755,9 @@ void MemoryManager::copy_image_bindless( assert((Flags == (sycl::detail::pi::PiImageCopyFlags) ext::oneapi::experimental::image_copy_flags::HtoD || Flags == (sycl::detail::pi::PiImageCopyFlags) - ext::oneapi::experimental::image_copy_flags::DtoH) && + ext::oneapi::experimental::image_copy_flags::DtoH || + Flags == (sycl::detail::pi::PiImageCopyFlags) + ext::oneapi::experimental::image_copy_flags::DtoD) && "Invalid flags passed to copy_image_bindless."); if (!Dst || !Src) throw sycl::exception( diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 02ffef951d1b5..3c3c02a5a11e2 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -1058,6 +1058,42 @@ void handler::ext_oneapi_copy( setType(detail::CG::CopyImage); } +void handler::ext_oneapi_copy( + ext::oneapi::experimental::image_mem_handle Src, + ext::oneapi::experimental::image_mem_handle Dest, + const ext::oneapi::experimental::image_descriptor &ImageDesc) { + throwIfGraphAssociated< + ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: + sycl_ext_oneapi_bindless_images>(); + MSrcPtr = Src.raw_handle; + MDstPtr = Dest.raw_handle; + + sycl::detail::pi::PiMemImageDesc PiDesc = {}; + PiDesc.image_width = ImageDesc.width; + PiDesc.image_height = ImageDesc.height; + PiDesc.image_depth = ImageDesc.depth; + PiDesc.image_type = + ImageDesc.depth > 0 + ? PI_MEM_TYPE_IMAGE3D + : (ImageDesc.height > 0 ? PI_MEM_TYPE_IMAGE2D : PI_MEM_TYPE_IMAGE1D); + + sycl::detail::pi::PiMemImageFormat PiFormat; + PiFormat.image_channel_data_type = + sycl::_V1::detail::convertChannelType(ImageDesc.channel_type); + PiFormat.image_channel_order = + sycl::_V1::detail::convertChannelOrder(ImageDesc.channel_order); + + MImpl->MSrcOffset = {0, 0, 0}; + MImpl->MDestOffset = {0, 0, 0}; + MImpl->MCopyExtent = {ImageDesc.width, ImageDesc.height, ImageDesc.depth}; + MImpl->MHostExtent = {ImageDesc.width, ImageDesc.height, ImageDesc.depth}; + MImpl->MImageDesc = PiDesc; + MImpl->MImageFormat = PiFormat; + MImpl->MImageCopyFlags = + sycl::detail::pi::PiImageCopyFlags::PI_IMAGE_COPY_DEVICE_TO_DEVICE; + setType(detail::CG::CopyImage); +} + void handler::ext_oneapi_copy( ext::oneapi::experimental::image_mem_handle Src, sycl::range<3> SrcOffset, const ext::oneapi::experimental::image_descriptor &SrcImgDesc, void *Dest, diff --git a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp new file mode 100644 index 0000000000000..c0a99abf662b1 --- /dev/null +++ b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp @@ -0,0 +1,99 @@ +// REQUIRES: linux +// REQUIRES: cuda + +// RUN: %{build} -o %t.out +// RUN: %{run} %t.out + +#include +#include + +// Uncomment to print additional test information +#define VERBOSE_PRINT + +namespace syclexp = sycl::ext::oneapi::experimental; + +void copy_image_mem_handle_to_image_mem_handle( + syclexp::image_descriptor &desc, const std::vector &testData, + sycl::device dev, sycl::queue q, std::vector &out) { + syclexp::image_mem imgMemSrc(desc, dev, q.get_context()); + syclexp::image_mem imgMemDst(desc, dev, q.get_context()); + + q.ext_oneapi_copy((void *)testData.data(), imgMemSrc.get_handle(), desc); + q.wait_and_throw(); + + q.ext_oneapi_copy(imgMemSrc.get_handle(), imgMemDst.get_handle(), desc); + q.wait_and_throw(); + + q.ext_oneapi_copy(imgMemDst.get_handle(), (void *)out.data(), desc); + q.wait_and_throw(); +} + +bool check_test(const std::vector &out, + const std::vector &expected) { + assert(out.size() == expected.size()); + bool validated = true; + for (int i = 0; i < out.size(); i++) { + bool mismatch = false; + if (out[i] != expected[i]) { + mismatch = true; + validated = false; + } + + if (mismatch) { +#ifdef VERBOSE_PRINT + std::cout << "Result mismatch! Expected: " << expected[i] + << ", Actual: " << out[i] << std::endl; +#else + break; +#endif + } + } + return validated; +} + +template +bool run_copy_test_with(sycl::device &dev, sycl::queue &q, + sycl::range dims) { + std::vector dataSequence(dims.size()); + std::vector out(dims.size()); + + std::vector expected(dims.size()); + + std::iota(dataSequence.begin(), dataSequence.end(), 0); + std::iota(expected.begin(), expected.end(), 0); + + syclexp::image_descriptor desc(dims, channelOrder, channelType); + + copy_image_mem_handle_to_image_mem_handle(desc, dataSequence, dev, q, out); + + return check_test(out, expected); +} + +int main() { + + sycl::device dev; + sycl::queue q(dev); + auto ctxt = q.get_context(); + + bool validated = + run_copy_test_with(dev, q, {4}); + + validated &= + run_copy_test_with(dev, q, {4, 4}); + + validated &= + run_copy_test_with(dev, q, {4, 4, 4}); + + if (!validated) { + std::cout << "Tests failed"; + return 1; + } + + std::cout << "Tests passed"; + + return 0; +} From d121d494db68b5bd486c5ff578813fc3d91bd3d1 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 24 Jan 2024 10:47:33 +0000 Subject: [PATCH 02/30] add missing linux symbols --- sycl/test/abi/sycl_symbols_linux.dump | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 2a7138718c22f..ccaf5a887de65 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -4111,6 +4111,7 @@ _ZN4sycl3_V17handler12addReductionERKSt10shared_ptrIKvE _ZN4sycl3_V17handler13getKernelNameB5cxx11Ev _ZN4sycl3_V17handler15ext_oneapi_copyENS0_3ext6oneapi12experimental16image_mem_handleENS0_5rangeILi3EEERKNS4_16image_descriptorEPvS7_S7_S7_ _ZN4sycl3_V17handler15ext_oneapi_copyENS0_3ext6oneapi12experimental16image_mem_handleEPvRKNS4_16image_descriptorE +_ZN4sycl3_V17handler15ext_oneapi_copyENS0_3ext6oneapi12experimental16image_mem_handleES5_RKNS4_16image_descriptorE _ZN4sycl3_V17handler15ext_oneapi_copyEPvNS0_3ext6oneapi12experimental16image_mem_handleERKNS5_16image_descriptorE _ZN4sycl3_V17handler15ext_oneapi_copyEPvNS0_5rangeILi3EEES2_S4_RKNS0_3ext6oneapi12experimental16image_descriptorEmS4_S4_ _ZN4sycl3_V17handler15ext_oneapi_copyEPvNS0_5rangeILi3EEES4_NS0_3ext6oneapi12experimental16image_mem_handleES4_RKNS7_16image_descriptorES4_ From 4c429f835f2f8e2a038e72024a2a0a15e97fa8c9 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 24 Jan 2024 15:36:13 +0000 Subject: [PATCH 03/30] add windows symbols --- sycl/test/abi/sycl_symbols_windows.dump | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index c397ffe390705..0bd4a4de045e0 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -1007,6 +1007,7 @@ ?ext_codeplay_supports_fusion@queue@_V1@sycl@@QEBA_NXZ ?ext_intel_read_host_pipe@handler@_V1@sycl@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAX_K_N@Z ?ext_intel_write_host_pipe@handler@_V1@sycl@@AEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAX_K_N@Z +?ext_oneapi_advise_usm_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEBX_KW4_pi_mem_advice@@V?$vector@IV?$allocator@I@std@@@6@PEAI@Z ?ext_oneapi_architecture_is@device@_V1@sycl@@QEAA_NW4architecture@experimental@oneapi@ext@23@@Z ?ext_oneapi_barrier@handler@_V1@sycl@@QEAAXAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@@Z ?ext_oneapi_barrier@handler@_V1@sycl@@QEAAXXZ @@ -1015,6 +1016,7 @@ ?ext_oneapi_copy@handler@_V1@sycl@@QEAAXPEAXUimage_mem_handle@experimental@oneapi@ext@23@AEBUimage_descriptor@56723@@Z ?ext_oneapi_copy@handler@_V1@sycl@@QEAAXPEAXV?$range@$02@23@01AEBUimage_descriptor@experimental@oneapi@ext@23@_K11@Z ?ext_oneapi_copy@handler@_V1@sycl@@QEAAXPEAXV?$range@$02@23@1Uimage_mem_handle@experimental@oneapi@ext@23@1AEBUimage_descriptor@67823@1@Z +?ext_oneapi_copy@handler@_V1@sycl@@QEAAXUimage_mem_handle@experimental@oneapi@ext@23@0AEBUimage_descriptor@56723@@Z ?ext_oneapi_copy@handler@_V1@sycl@@QEAAXUimage_mem_handle@experimental@oneapi@ext@23@PEAXAEBUimage_descriptor@56723@@Z ?ext_oneapi_copy@handler@_V1@sycl@@QEAAXUimage_mem_handle@experimental@oneapi@ext@23@V?$range@$02@23@AEBUimage_descriptor@56723@PEAX111@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@PEAX0AEBUimage_descriptor@experimental@oneapi@ext@23@_KAEBUcode_location@detail@23@@Z @@ -1029,6 +1031,9 @@ ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@PEAXV?$range@$02@23@1Uimage_mem_handle@experimental@oneapi@ext@23@1AEBUimage_descriptor@78923@1AEBUcode_location@detail@23@@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@PEAXV?$range@$02@23@1Uimage_mem_handle@experimental@oneapi@ext@23@1AEBUimage_descriptor@78923@1AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@PEAXV?$range@$02@23@1Uimage_mem_handle@experimental@oneapi@ext@23@1AEBUimage_descriptor@78923@1V423@AEBUcode_location@detail@23@@Z +?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@0AEBUimage_descriptor@67823@AEBUcode_location@detail@23@@Z +?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@0AEBUimage_descriptor@67823@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z +?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@0AEBUimage_descriptor@67823@V423@AEBUcode_location@detail@23@@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@PEAXAEBUimage_descriptor@67823@AEBUcode_location@detail@23@@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@PEAXAEBUimage_descriptor@67823@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z ?ext_oneapi_copy@queue@_V1@sycl@@QEAA?AVevent@23@Uimage_mem_handle@experimental@oneapi@ext@23@PEAXAEBUimage_descriptor@67823@V423@AEBUcode_location@detail@23@@Z @@ -1039,8 +1044,6 @@ ?ext_oneapi_copyD2H_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEAVSYCLMemObjI@234@PEAXIV?$range@$02@34@4V?$id@$02@34@IPEADI45IV?$vector@IV?$allocator@I@std@@@6@PEAI@Z ?ext_oneapi_copyH2D_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEAVSYCLMemObjI@234@PEADIV?$range@$02@34@V?$id@$02@34@IPEAXI445IV?$vector@IV?$allocator@I@std@@@6@PEAI@Z ?ext_oneapi_copy_usm_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEBXPEAU_pi_ext_command_buffer@@_KPEAXV?$vector@IV?$allocator@I@std@@@6@PEAI@Z -?ext_oneapi_prefetch_usm_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEAX_KV?$vector@IV?$allocator@I@std@@@6@PEAI@Z -?ext_oneapi_advise_usm_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEBX_KW4_pi_mem_advice@@V?$vector@IV?$allocator@I@std@@@6@PEAI@Z ?ext_oneapi_disable_peer_access@device@_V1@sycl@@QEAAXAEBV123@@Z ?ext_oneapi_empty@queue@_V1@sycl@@QEBA_NXZ ?ext_oneapi_enable_peer_access@device@_V1@sycl@@QEAAXAEBV123@@Z @@ -1074,6 +1077,7 @@ ?ext_oneapi_owner_before@?$OwnerLessBase@Vqueue@_V1@sycl@@@detail@_V1@sycl@@QEBA_NAEBVqueue@34@@Z ?ext_oneapi_owner_before@?$OwnerLessBase@Vstream@_V1@sycl@@@detail@_V1@sycl@@QEBA_NAEBV?$weak_object_base@Vstream@_V1@sycl@@@2oneapi@ext@34@@Z ?ext_oneapi_owner_before@?$OwnerLessBase@Vstream@_V1@sycl@@@detail@_V1@sycl@@QEBA_NAEBVstream@34@@Z +?ext_oneapi_prefetch_usm_cmd_buffer@MemoryManager@detail@_V1@sycl@@SAXV?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@std@@PEAU_pi_ext_command_buffer@@PEAX_KV?$vector@IV?$allocator@I@std@@@6@PEAI@Z ?ext_oneapi_set_external_event@queue@_V1@sycl@@QEAAXAEBVevent@23@@Z ?ext_oneapi_signal_external_semaphore@handler@_V1@sycl@@QEAAXUinterop_semaphore_handle@experimental@oneapi@ext@23@@Z ?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@AEBUcode_location@detail@23@@Z From 666caf395bdba9e9e81444e5ce698491214e599d Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 24 Jan 2024 22:53:26 +0000 Subject: [PATCH 04/30] update UR commit --- 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 d2c16c37e1975..5a80be0c5ccf1 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 0942022ba947f1832056ffa9e317dc1384c382e0) + set(UNIFIED_RUNTIME_TAG 2ce83d7c19bd0fafa101478eeb4a81dbd7d48ca9) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From c630290c7a2e918295656847294f42c8cdd6076e Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 2 Feb 2024 16:11:42 +0000 Subject: [PATCH 05/30] update UR --- 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 8ccb2df778c8c..6b5246e28bab4 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 2ce83d7c19bd0fafa101478eeb4a81dbd7d48ca9) + set(UNIFIED_RUNTIME_TAG 77484921af99d3b9dc0b3b06ed8ffc70c259f531) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 4aee726e8b22c4764fb6c85c5cba52c48d081830 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 7 Feb 2024 14:13:45 +0000 Subject: [PATCH 06/30] 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 4aaea65260e07..9a8a4956398da 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 77484921af99d3b9dc0b3b06ed8ffc70c259f531) + set(UNIFIED_RUNTIME_TAG a4a78a09890e6c305f476bf446e2ed2b1fc7ff86) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 7d531234a1daf94094562688b3bbc770cfb0b98d Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Thu, 8 Feb 2024 11:16:02 +0000 Subject: [PATCH 07/30] 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 9a8a4956398da..9beff3f1534d3 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG a4a78a09890e6c305f476bf446e2ed2b1fc7ff86) + set(UNIFIED_RUNTIME_TAG f3730afe28b49eda3bc93f26ef3b049bcdc1ecf7) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From d2c3f3c83cd665a97731a78fe64c6a0ad9c9acf3 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Mon, 12 Feb 2024 11:24:26 +0000 Subject: [PATCH 08/30] 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 acccefd5112eb..0b279d9f80e1a 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG d54fba421efb863cc3fc511b4515d74491830ddd) + set(UNIFIED_RUNTIME_TAG 71e47d3576c983bdef5ae909b588b6c3754d1ec4) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 046dda4cde09ac80074f84ecd66027e048b4b975 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Tue, 13 Feb 2024 12:24:27 +0000 Subject: [PATCH 09/30] 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 0b279d9f80e1a..8e93c63ea36f8 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 71e47d3576c983bdef5ae909b588b6c3754d1ec4) + set(UNIFIED_RUNTIME_TAG ba3ab176cc924a3e4169d5ceda488d17574e416b) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 077ed5c8f48b38da7c26d9d63411787e78504410 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 14 Feb 2024 15:26:03 +0000 Subject: [PATCH 10/30] 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 4afbe4c8190ce..64f0d50fe7967 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG ba3ab176cc924a3e4169d5ceda488d17574e416b) + set(UNIFIED_RUNTIME_TAG 2ae14b1bdcfcc76d9037b86804ad30358a07c478) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From adf9fb1033e906cefea3af9d3a18f2c527d34e63 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Thu, 15 Feb 2024 13:03:09 +0000 Subject: [PATCH 11/30] 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 64f0d50fe7967..33a72e81abfb0 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 2ae14b1bdcfcc76d9037b86804ad30358a07c478) + set(UNIFIED_RUNTIME_TAG fff3045edfc7d98cd68b740d2c553adbab604498) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From bffce26d19682f88e5f84aab0df8fb71bb212451 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 23 Feb 2024 15:25:20 +0000 Subject: [PATCH 12/30] 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 33a72e81abfb0..c96cacb3d356f 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG fff3045edfc7d98cd68b740d2c553adbab604498) + set(UNIFIED_RUNTIME_TAG 28df2c251174900d9464a9be206f5661e243afb4) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 64705bf3ccb8fa6fcdd1fdf1d3612166f0a646b4 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 1 Mar 2024 14:01:25 +0000 Subject: [PATCH 13/30] update UR --- 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 c96cacb3d356f..33f66d90c06fb 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 28df2c251174900d9464a9be206f5661e243afb4) + set(UNIFIED_RUNTIME_TAG aa04d5d16d08dadb04c84a56faeb299a01d2b64f) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From cb918373e35c20fcc6f86fcabb7ba6cb5a0a0b9f Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 1 Mar 2024 16:30:18 +0000 Subject: [PATCH 14/30] update order and sizes of test cases --- .../bindless_images/device_to_device_copy.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp index c0a99abf662b1..81b076560b625 100644 --- a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp +++ b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp @@ -76,17 +76,17 @@ int main() { sycl::queue q(dev); auto ctxt = q.get_context(); - bool validated = - run_copy_test_with(dev, q, {4}); + bool validated = run_copy_test_with( + dev, q, {2048, 2048}); - validated &= - run_copy_test_with(dev, q, {4, 4}); + validated &= run_copy_test_with( + dev, q, {512 * 256}); validated &= run_copy_test_with(dev, q, {4, 4, 4}); + sycl::image_channel_type::fp32, 3>(dev, q, {2048, 2048, 64}); if (!validated) { std::cout << "Tests failed"; From ef7aa03f58f68a7a165a3e6f30c093f41f74e756 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Tue, 5 Mar 2024 11:01:24 +0000 Subject: [PATCH 15/30] 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 33f66d90c06fb..87c6b8a9b7296 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG aa04d5d16d08dadb04c84a56faeb299a01d2b64f) + set(UNIFIED_RUNTIME_TAG a46b6c020bfef0ffdad24c24cab19e5eeae244b0) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 3699f21e49f3ab23e89b7b97e8f1bb1be069c01c Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Mon, 11 Mar 2024 23:25:13 +0000 Subject: [PATCH 16/30] 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 87c6b8a9b7296..b799f63f49fbf 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG a46b6c020bfef0ffdad24c24cab19e5eeae244b0) + set(UNIFIED_RUNTIME_TAG 4a93adc59ede2b2404fc66577afb96d66b9e4a17) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 46bd11740834ed4674f971f739743edca19500ef Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Mon, 11 Mar 2024 23:07:21 +0000 Subject: [PATCH 17/30] add support for copying image arrays with tests --- sycl/source/handler.cpp | 17 ++++++++--- .../bindless_images/device_to_device_copy.cpp | 28 ++++++++++++++++--- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index b806f3aa12b59..32583d35cf469 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -1152,6 +1152,8 @@ void handler::ext_oneapi_copy( throwIfGraphAssociated< ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: sycl_ext_oneapi_bindless_images>(); + ImageDesc.verify(); + MSrcPtr = Src.raw_handle; MDstPtr = Dest.raw_handle; @@ -1159,10 +1161,17 @@ void handler::ext_oneapi_copy( PiDesc.image_width = ImageDesc.width; PiDesc.image_height = ImageDesc.height; PiDesc.image_depth = ImageDesc.depth; - PiDesc.image_type = - ImageDesc.depth > 0 - ? PI_MEM_TYPE_IMAGE3D - : (ImageDesc.height > 0 ? PI_MEM_TYPE_IMAGE2D : PI_MEM_TYPE_IMAGE1D); + PiDesc.image_array_size = ImageDesc.array_size; + if (ImageDesc.array_size > 1) { + // Image Array. + PiDesc.image_type = ImageDesc.height > 0 ? PI_MEM_TYPE_IMAGE2D_ARRAY + : PI_MEM_TYPE_IMAGE1D_ARRAY; + } else { + PiDesc.image_type = ImageDesc.depth > 0 + ? PI_MEM_TYPE_IMAGE3D + : (ImageDesc.height > 0 ? PI_MEM_TYPE_IMAGE2D + : PI_MEM_TYPE_IMAGE1D); + } sycl::detail::pi::PiMemImageFormat PiFormat; PiFormat.image_channel_data_type = diff --git a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp index 81b076560b625..5c15582e0be33 100644 --- a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp +++ b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp @@ -52,7 +52,8 @@ bool check_test(const std::vector &out, } template + sycl::image_channel_type channelType, int dim, + syclexp::image_type type = syclexp::image_type::standard> bool run_copy_test_with(sycl::device &dev, sycl::queue &q, sycl::range dims) { std::vector dataSequence(dims.size()); @@ -63,7 +64,15 @@ bool run_copy_test_with(sycl::device &dev, sycl::queue &q, std::iota(dataSequence.begin(), dataSequence.end(), 0); std::iota(expected.begin(), expected.end(), 0); - syclexp::image_descriptor desc(dims, channelOrder, channelType); + syclexp::image_descriptor desc; + + if constexpr (type == syclexp::image_type::standard) { + desc = syclexp::image_descriptor(dims, channelOrder, channelType); + } else { + desc = syclexp::image_descriptor( + {dims[0], dim > 2 ? dims[1] : 0}, channelOrder, channelType, + syclexp::image_type::array, 1, dim > 2 ? dims[2] : dims[1]); + } copy_image_mem_handle_to_image_mem_handle(desc, dataSequence, dev, q, out); @@ -76,17 +85,28 @@ int main() { sycl::queue q(dev); auto ctxt = q.get_context(); + // Standard images copies bool validated = run_copy_test_with( - dev, q, {2048, 2048}); + dev, q, {2048 * 8, 2048 * 8}); validated &= run_copy_test_with( dev, q, {512 * 256}); + validated &= run_copy_test_with( + dev, q, {2048, 2048, 64}); + + // Layered images copies + validated &= + run_copy_test_with(dev, q, {956, 38}); validated &= run_copy_test_with(dev, q, {2048, 2048, 64}); + sycl::image_channel_type::fp32, 3, + syclexp::image_type::array>(dev, q, {2048, 2048, 64}); if (!validated) { std::cout << "Tests failed"; From c6e42b628d8cae51201b6f206172f5112d5df3ba Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Tue, 12 Mar 2024 23:39:25 +0000 Subject: [PATCH 18/30] 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 b799f63f49fbf..b6e758e9c4052 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 4a93adc59ede2b2404fc66577afb96d66b9e4a17) + set(UNIFIED_RUNTIME_TAG 14d589747a42714ee1c8fd3c3ade0574d0406f75) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From a443907bdab0d188030c85ff58d43f6072e99a87 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Tue, 12 Mar 2024 23:49:08 +0000 Subject: [PATCH 19/30] comment verbose print --- sycl/test-e2e/bindless_images/device_to_device_copy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp index 5c15582e0be33..9aecd4117bd83 100644 --- a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp +++ b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp @@ -8,7 +8,7 @@ #include // Uncomment to print additional test information -#define VERBOSE_PRINT +//#define VERBOSE_PRINT namespace syclexp = sycl::ext::oneapi::experimental; From 5efd58eb40ff19d949223e3c4c456e6c95254242 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Mon, 18 Mar 2024 16:42:46 +0000 Subject: [PATCH 20/30] 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 b6e758e9c4052..a88c6f6c6adbd 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 14d589747a42714ee1c8fd3c3ade0574d0406f75) + set(UNIFIED_RUNTIME_TAG a282c4cfd98a98b32afec52934854ecf7f1d6557) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 6400dabc10debecb5ec129580ea47ab713ab1998 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Wed, 20 Mar 2024 12:31:09 +0000 Subject: [PATCH 21/30] 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 a88c6f6c6adbd..29723e99be777 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG a282c4cfd98a98b32afec52934854ecf7f1d6557) + set(UNIFIED_RUNTIME_TAG 72ab43d41017ea1df2ae5082e10dfb78d3dc35c4) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) From 50ebbfe3af2e2f4cacdb0dc340fff6afa5f626c6 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 22 Mar 2024 11:38:43 +0000 Subject: [PATCH 22/30] 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 eebcb9ad17e60..04c917d524f31 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,7 +57,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 72ab43d41017ea1df2ae5082e10dfb78d3dc35c4) + set(UNIFIED_RUNTIME_TAG 5d9b46b0497476bbd224ecd968d7b7ef36ec6892) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}") From b6b4c8bbbfd0ae92af11beedc60a6ea70062d37d Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 22 Mar 2024 11:51:12 +0000 Subject: [PATCH 23/30] fix formatting --- sycl/test-e2e/bindless_images/device_to_device_copy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp index 9aecd4117bd83..39cdf9d58e22f 100644 --- a/sycl/test-e2e/bindless_images/device_to_device_copy.cpp +++ b/sycl/test-e2e/bindless_images/device_to_device_copy.cpp @@ -8,7 +8,7 @@ #include // Uncomment to print additional test information -//#define VERBOSE_PRINT +// #define VERBOSE_PRINT namespace syclexp = sycl::ext::oneapi::experimental; From 41c1154b118420062d091c0fb11792b75b499de3 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Tue, 26 Mar 2024 23:28:23 +0000 Subject: [PATCH 24/30] 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 90a47f5940e18..e8eed1e59029f 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -82,7 +82,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/cppchedy/unified-runtime.git") - set(UNIFIED_RUNTIME_TAG 5d9b46b0497476bbd224ecd968d7b7ef36ec6892) + set(UNIFIED_RUNTIME_TAG bea263c841f70918d11634c031e5003ff34e7c2c) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}") From be980ce58adfc20c116ec3a2510d6268e7f70ea6 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Thu, 11 Apr 2024 16:04:00 +0100 Subject: [PATCH 25/30] update UR tag for cuda adapter --- 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 94674836206e9..94185620deb8a 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -120,14 +120,8 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) ) fetch_adapter_source(cuda - ${UNIFIED_RUNTIME_REPO} - # commit 6e76c98a1f5cd3c4f5e99011e92bd55b3a46cc4c - # Merge: 08b3e8fe 834e6435 - # Author: Kenneth Benzie (Benie) - # Date: Wed Apr 10 16:26:17 2024 +0100 - # Merge pull request #1220 from fabiomestre/fabio/cuda_multimap - # [CUDA] Add support for multiple active mappings - 6e76c98a1f5cd3c4f5e99011e92bd55b3a46cc4c + https://github.com/cppchedy/unified-runtime.git + f894c7ffc57efe1918386d36612026b590f6d7d9 ) fetch_adapter_source(hip From 32b6963b3142d549f34fa0c66710deda11610acb Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Thu, 11 Apr 2024 18:14:25 +0100 Subject: [PATCH 26/30] update UR cuda adapter 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 94185620deb8a..59dfd6ff1d514 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -121,7 +121,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(cuda https://github.com/cppchedy/unified-runtime.git - f894c7ffc57efe1918386d36612026b590f6d7d9 + f268fdc35fbc2be9ec02a87d6737af92ee40989d ) fetch_adapter_source(hip From bd6803c7f2258543b531d41fe391b12ac5f50e32 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 12 Apr 2024 12:31:36 +0100 Subject: [PATCH 27/30] update UR cuda 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 59dfd6ff1d514..9243972f44bff 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -121,7 +121,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(cuda https://github.com/cppchedy/unified-runtime.git - f268fdc35fbc2be9ec02a87d6737af92ee40989d + cc3b814b95f68cc371f664dd911f224a5d8852d4 ) fetch_adapter_source(hip From 4f384362b3fa046dbeedcceafafd83c60dc16e3a Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 19 Apr 2024 12:13:58 +0100 Subject: [PATCH 28/30] handle cubemap copies --- sycl/source/handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index e7b0e96fdf935..7d7f094e8d4a2 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -1188,6 +1188,12 @@ void handler::ext_oneapi_copy( // Image Array. PiDesc.image_type = ImageDesc.height > 0 ? PI_MEM_TYPE_IMAGE2D_ARRAY : PI_MEM_TYPE_IMAGE1D_ARRAY; + + // Cubemap. + PiDesc.image_type = + ImageDesc.type == sycl::ext::oneapi::experimental::image_type::cubemap + ? PI_MEM_TYPE_IMAGE_CUBEMAP + : PiDesc.image_type; } else { PiDesc.image_type = ImageDesc.depth > 0 ? PI_MEM_TYPE_IMAGE3D From 0810bafff16c396b9d4bcdd19e63414e9d9971a3 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 19 Apr 2024 12:15:04 +0100 Subject: [PATCH 29/30] update CUDA 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 7d5b9bb958e2c..c03b87941a05c 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -115,7 +115,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(cuda https://github.com/cppchedy/unified-runtime.git - cc3b814b95f68cc371f664dd911f224a5d8852d4 + f9fb11670f49eb8080cd721d681005e508fd2cc5 ) fetch_adapter_source(hip From b9adf7dcd509df913dcd59ad08be1cb45021ebcf Mon Sep 17 00:00:00 2001 From: Przemek Malon Date: Wed, 24 Apr 2024 18:22:59 +0100 Subject: [PATCH 30/30] Update UR CUDA tag --- 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 e018e648a97d2..f2aabf8267cb2 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -114,8 +114,15 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) ) fetch_adapter_source(cuda - https://github.com/cppchedy/unified-runtime.git - f9fb11670f49eb8080cd721d681005e508fd2cc5 + "https://github.com/oneapi-src/unified-runtime.git" + # commit 7fcfe3ad8882fee23d83fa0fc4c4c944262a9ea3 + # Merge: b37fa2c4 f9fb1167 + # Author: Kenneth Benzie (Benie) + # Date: Wed Apr 24 10:38:00 2024 +0100 + # Merge pull request #1265 from cppchedy/chedy/device-to-device-copy + # + # [Bindless][Exp] Add support for device to device copies between CuArrays + 7fcfe3ad8882fee23d83fa0fc4c4c944262a9ea3 ) fetch_adapter_source(hip