Skip to content

Commit cd0bec9

Browse files
committed
Remove redundant asserts
1 parent f739737 commit cd0bec9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

source/adapters/level_zero/command_buffer.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
726726
const ur_exp_command_buffer_sync_point_t *SyncPointWaitList,
727727
ur_exp_command_buffer_sync_point_t *RetSyncPoint,
728728
ur_exp_command_buffer_command_handle_t *Command) {
729-
UR_ASSERT(CommandBuffer && Kernel && Kernel->Program,
730-
UR_RESULT_ERROR_INVALID_NULL_POINTER);
729+
UR_ASSERT(Kernel->Program, UR_RESULT_ERROR_INVALID_NULL_POINTER);
731730
// Lock automatically releases when this goes out of scope.
732731
std::scoped_lock<ur_shared_mutex, ur_shared_mutex, ur_shared_mutex> Lock(
733732
Kernel->Mutex, Kernel->Program->Mutex, CommandBuffer->Mutex);
@@ -1340,9 +1339,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferReleaseCommandExp(
13401339
UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
13411340
ur_exp_command_buffer_command_handle_t Command,
13421341
const ur_exp_command_buffer_update_kernel_launch_desc_t *CommandDesc) {
1343-
UR_ASSERT(Command, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
13441342
UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
1345-
UR_ASSERT(CommandDesc, UR_RESULT_ERROR_INVALID_NULL_POINTER);
13461343
UR_ASSERT(CommandDesc->newWorkDim <= 3,
13471344
UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
13481345

0 commit comments

Comments
 (0)