Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,8 @@ 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")
# commit 532a4ecb72da4876cef61a4ae4d638e27ad609d5
# Merge: 22962057 d944ff33
# Author: aarongreig <[email protected]>
# Date: Mon Sep 30 10:43:10 2024 +0100
# Merge pull request #1924 from Bensuo/fabio/cmd_buffer_kernel_update
# Add support for command-buffer kernel updates
set(UNIFIED_RUNTIME_TAG 532a4ecb72da4876cef61a4ae4d638e27ad609d5)
set(UNIFIED_RUNTIME_REPO "https://github.com/againull/unified-runtime")
set(UNIFIED_RUNTIME_TAG 44a2f0234f9270aab0c8633c07da81e96fc5e214)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
Expand Down
3 changes: 2 additions & 1 deletion sycl/source/detail/context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sycl/property_list.hpp>

#include <algorithm>
#include <set>

namespace sycl {
inline namespace _V1 {
Expand Down Expand Up @@ -490,7 +491,7 @@ std::optional<ur_program_handle_t> context_impl::getProgramForDevImgs(
auto &Cache = LockedCache.get().Cache;
ur_device_handle_t &DevHandle = getSyclObjImpl(Device)->getHandleRef();
for (std::uintptr_t ImageIDs : ImgIdentifiers) {
auto OuterKey = std::make_pair(ImageIDs, DevHandle);
auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle});
size_t NProgs = KeyMap.count(OuterKey);
if (NProgs == 0)
continue;
Expand Down
6 changes: 3 additions & 3 deletions sycl/source/detail/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ retrieveKernelBinary(const QueueImplPtr &Queue, const char *KernelName,
auto DeviceImpl = Queue->getDeviceImplPtr();
auto Device = detail::createSyclObjFromImpl<device>(DeviceImpl);
ur_program_handle_t Program =
detail::ProgramManager::getInstance().createURProgram(**DeviceImage,
Context, Device);
detail::ProgramManager::getInstance().createURProgram(
**DeviceImage, Context, {Device});
return {*DeviceImage, Program};
}

Expand Down Expand Up @@ -94,7 +94,7 @@ retrieveKernelBinary(const QueueImplPtr &Queue, const char *KernelName,
DeviceImage = &detail::ProgramManager::getInstance().getDeviceImage(
KernelName, Context, Device);
Program = detail::ProgramManager::getInstance().createURProgram(
*DeviceImage, Context, Device);
*DeviceImage, Context, {Device});
}
return {DeviceImage, Program};
}
Expand Down
8 changes: 5 additions & 3 deletions sycl/source/detail/kernel_program_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <set>
#include <type_traits>

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

struct ProgramCache {
::boost::unordered_map<ProgramCacheKeyT, ProgramBuildResultPtr> Cache;
Expand Down
Loading
Loading