Skip to content

Commit 14e04eb

Browse files
committed
Merge branch 'sycl_bundle_multi_device' into aaron/clBatch
2 parents ec37e17 + 103ba87 commit 14e04eb

File tree

13 files changed

+528
-191
lines changed

13 files changed

+528
-191
lines changed

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,8 @@ if(SYCL_UR_USE_FETCH_CONTENT)
116116
CACHE PATH "Path to external '${name}' adapter source dir" FORCE)
117117
endfunction()
118118

119-
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
120-
# commit c742ca49efb12380a35b8b0b467e6577ab8174ce
121-
# Merge: 3a8bf2c5 504d3b63
122-
# Author: Kenneth Benzie (Benie) <[email protected]>
123-
# Date: Mon Oct 21 11:55:23 2024 +0100
124-
# Merge pull request #2131 from Bensuo/ben/command-handle-fix
125-
# [EXP][CMDBUF] Make command handle behaviour consistent
126-
set(UNIFIED_RUNTIME_TAG c742ca49efb12380a35b8b0b467e6577ab8174ce)
119+
set(UNIFIED_RUNTIME_REPO "https://github.com/againull/unified-runtime")
120+
set(UNIFIED_RUNTIME_TAG 44a2f0234f9270aab0c8633c07da81e96fc5e214)
127121

128122
set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
129123
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need

sycl/source/detail/context_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <sycl/property_list.hpp>
2222

2323
#include <algorithm>
24+
#include <set>
2425

2526
namespace sycl {
2627
inline namespace _V1 {
@@ -492,7 +493,7 @@ std::optional<ur_program_handle_t> context_impl::getProgramForDevImgs(
492493
auto &Cache = LockedCache.get().Cache;
493494
ur_device_handle_t &DevHandle = getSyclObjImpl(Device)->getHandleRef();
494495
for (std::uintptr_t ImageIDs : ImgIdentifiers) {
495-
auto OuterKey = std::make_pair(ImageIDs, DevHandle);
496+
auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle});
496497
size_t NProgs = KeyMap.count(OuterKey);
497498
if (NProgs == 0)
498499
continue;

sycl/source/detail/helpers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ retrieveKernelBinary(const QueueImplPtr &Queue, const char *KernelName,
6565
auto DeviceImpl = Queue->getDeviceImplPtr();
6666
auto Device = detail::createSyclObjFromImpl<device>(DeviceImpl);
6767
ur_program_handle_t Program =
68-
detail::ProgramManager::getInstance().createURProgram(**DeviceImage,
69-
Context, Device);
68+
detail::ProgramManager::getInstance().createURProgram(
69+
**DeviceImage, Context, {Device});
7070
return {*DeviceImage, Program};
7171
}
7272

@@ -94,7 +94,7 @@ retrieveKernelBinary(const QueueImplPtr &Queue, const char *KernelName,
9494
DeviceImage = &detail::ProgramManager::getInstance().getDeviceImage(
9595
KernelName, Context, Device);
9696
Program = detail::ProgramManager::getInstance().createURProgram(
97-
*DeviceImage, Context, Device);
97+
*DeviceImage, Context, {Device});
9898
}
9999
return {DeviceImage, Program};
100100
}

sycl/source/detail/kernel_program_cache.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <atomic>
2121
#include <condition_variable>
2222
#include <mutex>
23+
#include <set>
2324
#include <type_traits>
2425

2526
#include <boost/unordered/unordered_flat_map.hpp>
@@ -118,9 +119,10 @@ class KernelProgramCache {
118119
* when debugging environment variables are set and we can just ignore them
119120
* since all kernels will have their build options overridden with the same
120121
* string*/
121-
using ProgramCacheKeyT =
122-
std::pair<std::pair<SerializedObj, std::uintptr_t>, ur_device_handle_t>;
123-
using CommonProgramKeyT = std::pair<std::uintptr_t, ur_device_handle_t>;
122+
using ProgramCacheKeyT = std::pair<std::pair<SerializedObj, std::uintptr_t>,
123+
std::set<ur_device_handle_t>>;
124+
using CommonProgramKeyT =
125+
std::pair<std::uintptr_t, std::set<ur_device_handle_t>>;
124126

125127
struct ProgramCache {
126128
::boost::unordered_map<ProgramCacheKeyT, ProgramBuildResultPtr> Cache;

0 commit comments

Comments
 (0)