Skip to content

Commit b9d00e5

Browse files
committed
[UR] Uplift tag to bring urProgramCreateWithBinary change
1 parent 3bd93c4 commit b9d00e5

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

sycl/cmake/modules/FetchUnifiedRuntime.cmake

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ 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 568a96aabc6edabe8514ae163aecc64cd5a41878
121-
# Author: Mateusz P. Nowak <[email protected]>
122-
# Date: Tue Oct 15 13:57:26 2024 +0200
123-
# Benchmark updates for faster run and more reliable results (#2164)
124-
set(UNIFIED_RUNTIME_TAG 568a96aabc6edabe8514ae163aecc64cd5a41878)
119+
set(UNIFIED_RUNTIME_REPO "https://github.com/againull/unified-runtime")
120+
# commit b79ebe4e98789144bcdf3832088eb6e6b5ae6967
121+
# Merge: 7b4bc761 fbb6e862
122+
# Author: Kenneth Benzie (Benie) <[email protected]>
123+
# Date: Fri Oct 4 16:39:59 2024 +0100
124+
# Merge pull request #2018 from wenju-he/L0-bindless-image-device-query
125+
# [L0] Fix device query of bindless image support
126+
set(UNIFIED_RUNTIME_TAG 8054db458c818f3f4552d808ea9e478708476e06)
125127

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

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ createBinaryProgram(const ContextImplPtr Context, const device &Device,
9696
Properties.count = Metadata.size();
9797
Properties.pMetadatas = Metadata.data();
9898
Adapter->call<UrApiKind::urProgramCreateWithBinary>(
99-
Context->getHandleRef(), UrDevice, DataLen, Data, &Properties, &Program);
99+
Context->getHandleRef(), 1, &UrDevice, &DataLen, &Data, &Properties,
100+
&Program);
100101

101102
if (BinaryStatus != UR_RESULT_SUCCESS) {
102103
throw detail::set_ur_error(

sycl/unittests/SYCL2020/KernelBundleStateFiltering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ ur_result_t redefinedUrProgramCreate(void *pParams) {
105105

106106
ur_result_t redefinedUrProgramCreateWithBinary(void *pParams) {
107107
auto params = *static_cast<ur_program_create_with_binary_params_t *>(pParams);
108-
redefinedUrProgramCreateCommon(*params.ppBinary);
108+
for (uint32_t i = 0; i < *params.pnumDevices; ++i)
109+
redefinedUrProgramCreateCommon(*params.pppBinaries[i]);
109110
return UR_RESULT_SUCCESS;
110111
}
111112

sycl/unittests/helpers/RuntimeLinkingCommon.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static ur_result_t redefined_urProgramCreateWithIL(void *pParams) {
4040

4141
static ur_result_t redefined_urProgramCreateWithBinary(void *pParams) {
4242
auto Params = *static_cast<ur_program_create_with_binary_params_t *>(pParams);
43-
auto *Magic = reinterpret_cast<const unsigned char *>(*Params.ppBinary);
43+
auto *Magic = reinterpret_cast<const unsigned char *>(*Params.pppBinaries[0]);
4444
ur_program_handle_t *res = *Params.pphProgram;
4545
*res = mock::createDummyHandle<ur_program_handle_t>(sizeof(unsigned));
4646
reinterpret_cast<mock::dummy_handle_t>(*res)->setDataAs<unsigned>(*Magic);

sycl/unittests/program_manager/CompileTarget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ static ur_result_t redefinedDeviceGet(void *pParams) {
138138
std::vector<std::string> createWithBinaryLog;
139139
static ur_result_t redefinedProgramCreateWithBinary(void *pParams) {
140140
auto params = *static_cast<ur_program_create_with_binary_params_t *>(pParams);
141-
createWithBinaryLog.push_back(
142-
reinterpret_cast<const char *>(*params.ppBinary));
141+
for (uint32_t i = 0; i < *params.pnumDevices; ++i)
142+
createWithBinaryLog.push_back(
143+
reinterpret_cast<const char *>(*params.pppBinaries[i]));
143144
return UR_RESULT_SUCCESS;
144145
}
145146

0 commit comments

Comments
 (0)