Skip to content

Commit 01cd56d

Browse files
Adds warning message to CUDA + removes calls it die() in Hip
1 parent 1ed2107 commit 01cd56d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

source/adapters/cuda/command_buffer.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
549549
// Get sync point and register the cuNode with it.
550550
*pSyncPoint =
551551
hCommandBuffer->AddSyncPoint(std::make_shared<CUgraphNode>(GraphNode));
552+
553+
setErrorMessage("Prefetch hint ignored and replaced with empty node as "
554+
"prefetch is not supported by CUDA Graph backend",
555+
UR_RESULT_SUCCESS);
556+
Result = UR_RESULT_ERROR_ADAPTER_SPECIFIC;
552557
} catch (ur_result_t Err) {
553558
Result = Err;
554559
}
@@ -579,6 +584,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp(
579584
// Get sync point and register the cuNode with it.
580585
*pSyncPoint =
581586
hCommandBuffer->AddSyncPoint(std::make_shared<CUgraphNode>(GraphNode));
587+
588+
setErrorMessage("Memory advice ignored and replaced with empty node as "
589+
"memory advice is not supported by CUDA Graph backend",
590+
UR_RESULT_SUCCESS);
591+
Result = UR_RESULT_ERROR_ADAPTER_SPECIFIC;
582592
} catch (ur_result_t Err) {
583593
Result = Err;
584594
}

source/adapters/hip/command_buffer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
127127
ur_usm_migration_flags_t, uint32_t,
128128
const ur_exp_command_buffer_sync_point_t *,
129129
ur_exp_command_buffer_sync_point_t *) {
130-
detail::ur::die("Experimental Command-buffer feature is not "
131-
"implemented for HIP adapter.");
132130
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
133131
}
134132

135133
UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp(
136134
ur_exp_command_buffer_handle_t, const void *, size_t, ur_usm_advice_flags_t,
137135
uint32_t, const ur_exp_command_buffer_sync_point_t *,
138136
ur_exp_command_buffer_sync_point_t *) {
139-
detail::ur::die("Experimental Command-buffer feature is not "
140-
"implemented for HIP adapter.");
141137
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
142138
}
143139

0 commit comments

Comments
 (0)