Skip to content

Commit 82beeee

Browse files
committed
Fix after rebase
1 parent 3a092a3 commit 82beeee

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

source/adapters/level_zero/v2/queue_immediate_in_order.cpp

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -847,15 +847,9 @@ ur_result_t ur_queue_immediate_in_order_t::enqueueDeviceGlobalVariableWrite(
847847
ur_program_handle_t hProgram, const char *name, bool blockingWrite,
848848
size_t count, size_t offset, const void *pSrc, uint32_t numEventsInWaitList,
849849
const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) {
850-
// TODO: implement program->getZeModuleMap() to be sure that
851-
// it's thread-safe
852-
ze_module_handle_t zeModule{};
853-
auto It = hProgram->ZeModuleMap.find(this->hDevice->ZeDevice);
854-
if (It != hProgram->ZeModuleMap.end()) {
855-
zeModule = It->second;
856-
} else {
857-
zeModule = hProgram->ZeModule;
858-
}
850+
// TODO: make getZeModuleHandle thread-safe
851+
ze_module_handle_t zeModule =
852+
hProgram->getZeModuleHandle(this->hDevice->ZeDevice);
859853

860854
// Find global variable pointer
861855
auto globalVarPtr = getGlobalPointerFromModule(zeModule, offset, count, name);
@@ -869,15 +863,9 @@ ur_result_t ur_queue_immediate_in_order_t::enqueueDeviceGlobalVariableRead(
869863
ur_program_handle_t hProgram, const char *name, bool blockingRead,
870864
size_t count, size_t offset, void *pDst, uint32_t numEventsInWaitList,
871865
const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) {
872-
// TODO: implement program->getZeModule() to be sure that
873-
// it's thread-safe
874-
ze_module_handle_t zeModule{};
875-
auto It = hProgram->ZeModuleMap.find(this->hDevice->ZeDevice);
876-
if (It != hProgram->ZeModuleMap.end()) {
877-
zeModule = It->second;
878-
} else {
879-
zeModule = hProgram->ZeModule;
880-
}
866+
// TODO: make getZeModuleHandle thread-safe
867+
ze_module_handle_t zeModule =
868+
hProgram->getZeModuleHandle(this->hDevice->ZeDevice);
881869

882870
// Find global variable pointer
883871
auto globalVarPtr = getGlobalPointerFromModule(zeModule, offset, count, name);

source/loader/layers/sanitizer/ur_sanddi.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,16 @@ __urdlllocal ur_result_t UR_APICALL urProgramCreateWithIL(
206206
/// @brief Intercept function for urProgramCreateWithBinary
207207
__urdlllocal ur_result_t UR_APICALL urProgramCreateWithBinary(
208208
ur_context_handle_t hContext, ///< [in] handle of the context instance
209-
ur_device_handle_t
210-
hDevice, ///< [in] handle to device associated with binary.
211-
size_t size, ///< [in] size in bytes.
212-
const uint8_t *pBinary, ///< [in] pointer to binary.
209+
uint32_t numDevices, ///< [in] number of devices
210+
ur_device_handle_t *
211+
phDevices, ///< [in][range(0, numDevices)] a pointer to a list of device handles. The
212+
///< binaries are loaded for devices specified in this list.
213+
size_t *
214+
pLengths, ///< [in][range(0, numDevices)] array of sizes of program binaries
215+
///< specified by `pBinaries` (in bytes).
216+
const uint8_t **
217+
ppBinaries, ///< [in][range(0, numDevices)] pointer to program binaries to be loaded
218+
///< for devices specified by `phDevices`.
213219
const ur_program_properties_t *
214220
pProperties, ///< [in][optional] pointer to program creation properties.
215221
ur_program_handle_t
@@ -224,8 +230,9 @@ __urdlllocal ur_result_t UR_APICALL urProgramCreateWithBinary(
224230

225231
getContext()->logger.debug("==== urProgramCreateWithBinary");
226232

227-
UR_CALL(pfnProgramCreateWithBinary(hContext, hDevice, size, pBinary,
228-
pProperties, phProgram));
233+
UR_CALL(pfnProgramCreateWithBinary(hContext, numDevices, phDevices,
234+
pLengths, ppBinaries, pProperties,
235+
phProgram));
229236
UR_CALL(getContext()->interceptor->insertProgram(*phProgram));
230237

231238
return UR_RESULT_SUCCESS;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{NONDETERMINISTIC}}
2+
urProgramSetSpecializationConstantsTest.InvalidValueSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}
3+
urProgramSetSpecializationConstantsTest.InvalidValueId/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}
4+
urProgramSetSpecializationConstantsTest.InvalidValuePtr/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{NONDETERMINISTIC}}
2+
urProgramSetSpecializationConstantsTest.InvalidValueSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}
3+
urProgramSetSpecializationConstantsTest.InvalidValueId/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
4+
urProgramSetSpecializationConstantsTest.InvalidValuePtr/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_

0 commit comments

Comments
 (0)