Skip to content

Commit ff8f410

Browse files
Adds OpenCL stubs
1 parent 1f256ef commit ff8f410

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

source/adapters/opencl/command_buffer.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,40 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferFillExp(
297297
return UR_RESULT_SUCCESS;
298298
}
299299

300+
UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
301+
ur_exp_command_buffer_handle_t hCommandBuffer, const void *mem, size_t size,
302+
ur_usm_migration_flags_t flags, uint32_t numSyncPointsInWaitList,
303+
const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList,
304+
ur_exp_command_buffer_sync_point_t *pSyncPoint) {
305+
(void)hCommandBuffer;
306+
(void)mem;
307+
(void)size;
308+
(void)flags;
309+
(void)numSyncPointsInWaitList;
310+
(void)pSyncPointWaitList;
311+
(void)pSyncPoint;
312+
313+
// Not implemented
314+
return PI_ERROR_INVALID_OPERATION;
315+
}
316+
317+
UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
318+
ur_exp_command_buffer_handle_t hCommandBuffer, const void *mem, size_t size,
319+
ur_usm_migration_flags_t flags, uint32_t numSyncPointsInWaitList,
320+
const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList,
321+
ur_exp_command_buffer_sync_point_t *pSyncPoint) {
322+
(void)hCommandBuffer;
323+
(void)mem;
324+
(void)size;
325+
(void)flags;
326+
(void)numSyncPointsInWaitList;
327+
(void)pSyncPointWaitList;
328+
(void)pSyncPoint;
329+
330+
// Not implemented
331+
return PI_ERROR_INVALID_OPERATION;
332+
}
333+
300334
UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
301335
ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue,
302336
uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList,

source/adapters/opencl/ur_interface_loader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable(
296296
urCommandBufferAppendMemBufferWriteExp;
297297
pDdiTable->pfnAppendMemBufferWriteRectExp =
298298
urCommandBufferAppendMemBufferWriteRectExp;
299+
pDdiTable->pfnAppendUSMPrefetchExp = urCommandBufferAppendUSMPrefetchExp;
300+
pDdiTable->pfnAppendUSMAdviseExp = urCommandBufferAppendUSMAdviseExp;
299301
pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp;
300302

301303
return retVal;

0 commit comments

Comments
 (0)