Skip to content

Commit

Permalink
Adds warning message to CUDA + removes calls it die() in Hip
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancepillois committed Dec 15, 2023
1 parent 1ed2107 commit 01cd56d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 10 additions & 0 deletions source/adapters/cuda/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
// Get sync point and register the cuNode with it.
*pSyncPoint =
hCommandBuffer->AddSyncPoint(std::make_shared<CUgraphNode>(GraphNode));

setErrorMessage("Prefetch hint ignored and replaced with empty node as "
"prefetch is not supported by CUDA Graph backend",
UR_RESULT_SUCCESS);
Result = UR_RESULT_ERROR_ADAPTER_SPECIFIC;
} catch (ur_result_t Err) {
Result = Err;
}
Expand Down Expand Up @@ -579,6 +584,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp(
// Get sync point and register the cuNode with it.
*pSyncPoint =
hCommandBuffer->AddSyncPoint(std::make_shared<CUgraphNode>(GraphNode));

setErrorMessage("Memory advice ignored and replaced with empty node as "
"memory advice is not supported by CUDA Graph backend",
UR_RESULT_SUCCESS);
Result = UR_RESULT_ERROR_ADAPTER_SPECIFIC;
} catch (ur_result_t Err) {
Result = Err;
}
Expand Down
4 changes: 0 additions & 4 deletions source/adapters/hip/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp(
ur_usm_migration_flags_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 HIP adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp(
ur_exp_command_buffer_handle_t, const void *, size_t, ur_usm_advice_flags_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 HIP adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand Down

0 comments on commit 01cd56d

Please sign in to comment.