@@ -339,14 +339,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
339
339
UR_RESULT_ERROR_INVALID_VALUE);
340
340
}
341
341
342
- hipGraphNode_t GraphNode;
343
- std::vector<hipGraphNode_t> DepsList;
342
+ try {
343
+ hipGraphNode_t GraphNode;
344
+ std::vector<hipGraphNode_t> DepsList;
344
345
345
- UR_CHECK_ERROR (getNodesFromSyncPoints (hCommandBuffer, numSyncPointsInWaitList,
346
- pSyncPointWaitList, DepsList));
346
+ UR_CHECK_ERROR (getNodesFromSyncPoints (
347
+ hCommandBuffer, numSyncPointsInWaitList, pSyncPointWaitList, DepsList));
347
348
348
- if (*pGlobalWorkSize == 0 ) {
349
- try {
349
+ if (*pGlobalWorkSize == 0 ) {
350
350
// Create an empty node if the kernel workload size is zero
351
351
UR_CHECK_ERROR (hipGraphAddEmptyNode (&GraphNode, hCommandBuffer->HIPGraph ,
352
352
DepsList.data (), DepsList.size ()));
@@ -356,24 +356,20 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
356
356
if (pSyncPoint) {
357
357
*pSyncPoint = SyncPoint;
358
358
}
359
- } catch (ur_result_t Err) {
360
- return Err;
359
+ return UR_RESULT_SUCCESS;
361
360
}
362
- return UR_RESULT_SUCCESS;
363
- }
364
361
365
- // Set the number of threads per block to the number of threads per warp
366
- // by default unless user has provided a better number
367
- size_t ThreadsPerBlock[3 ] = {64u , 1u , 1u };
368
- size_t BlocksPerGrid[3 ] = {1u , 1u , 1u };
362
+ // Set the number of threads per block to the number of threads per warp
363
+ // by default unless user has provided a better number
364
+ size_t ThreadsPerBlock[3 ] = {64u , 1u , 1u };
365
+ size_t BlocksPerGrid[3 ] = {1u , 1u , 1u };
369
366
370
- uint32_t LocalSize = hKernel->getLocalSize ();
371
- hipFunction_t HIPFunc = hKernel->get ();
372
- UR_CHECK_ERROR (setKernelParams (
373
- hCommandBuffer->Device , workDim, pGlobalWorkOffset, pGlobalWorkSize,
374
- pLocalWorkSize, hKernel, HIPFunc, ThreadsPerBlock, BlocksPerGrid));
367
+ uint32_t LocalSize = hKernel->getLocalSize ();
368
+ hipFunction_t HIPFunc = hKernel->get ();
369
+ UR_CHECK_ERROR (setKernelParams (
370
+ hCommandBuffer->Device , workDim, pGlobalWorkOffset, pGlobalWorkSize,
371
+ pLocalWorkSize, hKernel, HIPFunc, ThreadsPerBlock, BlocksPerGrid));
375
372
376
- try {
377
373
// Set node param structure with the kernel related data
378
374
auto &ArgIndices = hKernel->getArgIndices ();
379
375
hipKernelNodeParams NodeParams;
0 commit comments