Skip to content

Commit

Permalink
Add note to docs
Browse files Browse the repository at this point in the history
urCommandBufferFinalizeExp will return UR_RESULT_ERROR_INVALID_OPERATION
if the command buffer has already been finalized.
  • Loading branch information
hdelan committed Nov 14, 2024
1 parent 09b3a7c commit 0a75eef
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -8484,6 +8484,7 @@ urCommandBufferReleaseExp(
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hCommandBuffer`
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "If `hCommandBuffer` has already been finalized"
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
UR_APIEXPORT ur_result_t UR_APICALL
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/exp-command-buffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ params:
desc: "[in] Handle of the command-buffer object."
returns:
- $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
- $X_RESULT_ERROR_INVALID_OPERATION
- "If `hCommandBuffer` has already been finalized"
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
- $X_RESULT_ERROR_OUT_OF_RESOURCES
--- #--------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7542,6 +7542,7 @@ ur_result_t UR_APICALL urCommandBufferReleaseExp(
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hCommandBuffer`
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "If `hCommandBuffer` has already been finalized"
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
ur_result_t UR_APICALL urCommandBufferFinalizeExp(
Expand Down
1 change: 1 addition & 0 deletions source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6405,6 +6405,7 @@ ur_result_t UR_APICALL urCommandBufferReleaseExp(
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `NULL == hCommandBuffer`
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
/// - ::UR_RESULT_ERROR_INVALID_OPERATION - "If `hCommandBuffer` has already been finalized"
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
ur_result_t UR_APICALL urCommandBufferFinalizeExp(
Expand Down
1 change: 0 additions & 1 deletion test/conformance/exp_command_buffer/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,4 @@ TEST_P(urCommandBufferAppendKernelLaunchExpTest, FinalizeTwice) {
ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle));
EXPECT_EQ_RESULT(urCommandBufferFinalizeExp(cmd_buf_handle),
UR_RESULT_ERROR_INVALID_OPERATION);

}

0 comments on commit 0a75eef

Please sign in to comment.