Skip to content
Closed
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@
/// these stubs could be defined in core UR as the default which would
/// reduce code duplication. Adapters could then "override" these defaults.

static const char unsupported_ncpu[] =
"Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter yet.";

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferCreateExp(
ur_context_handle_t, ur_device_handle_t,
const ur_exp_command_buffer_desc_t *, ur_exp_command_buffer_handle_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferRetainExp(ur_exp_command_buffer_handle_t) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferFinalizeExp(ur_exp_command_buffer_handle_t) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -47,26 +47,23 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
const size_t *, const size_t *, const size_t *, uint32_t,
const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemcpyUSMExp(
ur_exp_command_buffer_handle_t, void *, const void *, size_t, uint32_t,
const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyExp(
ur_exp_command_buffer_handle_t, ur_mem_handle_t, ur_mem_handle_t, size_t,
size_t, size_t, uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -75,8 +72,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyRectExp(
ur_rect_offset_t, ur_rect_offset_t, ur_rect_region_t, size_t, size_t,
size_t, size_t, uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -85,8 +81,7 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteExp(
ur_exp_command_buffer_handle_t, ur_mem_handle_t, size_t, size_t,
const void *, uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -95,8 +90,7 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadExp(
ur_exp_command_buffer_handle_t, ur_mem_handle_t, size_t, size_t, void *,
uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -106,8 +100,7 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteRectExp(
ur_rect_offset_t, ur_rect_region_t, size_t, size_t, size_t, size_t, void *,
uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -117,15 +110,30 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadRectExp(
ur_rect_offset_t, ur_rect_region_t, size_t, size_t, size_t, size_t, void *,
uint32_t, const ur_exp_command_buffer_sync_point_t *,
ur_exp_command_buffer_sync_point_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
ur_exp_command_buffer_handle_t, ur_queue_handle_t, uint32_t,
const ur_event_handle_t *, ur_event_handle_t *) {
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for the NativeCPU adapter.");
detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMMemcpyExp(
ur_exp_command_buffer_handle_t hCommandBuffer, void *pDst, const void *pSrc,
size_t size, uint32_t numSyncPointsInWaitList,
const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList,
ur_exp_command_buffer_sync_point_t *pSyncPoint) {
(void)hCommandBuffer;
(void)pDst;
(void)pSrc;
(void)size;
(void)numSyncPointsInWaitList;
(void)pSyncPointWaitList;
(void)pSyncPoint;

detail::ur::die(unsupported_ncpu);
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}