|
12 | 12 | #include "helpers/kernel_helpers.hpp"
|
13 | 13 | #include "helpers/mutable_helpers.hpp"
|
14 | 14 | #include "logger/ur_logger.hpp"
|
| 15 | +#include "ur/ur.hpp" |
15 | 16 | #include "ur_api.h"
|
16 | 17 | #include "ur_interface_loader.hpp"
|
17 | 18 | #include "ur_level_zero.hpp"
|
@@ -485,16 +486,16 @@ ur_exp_command_buffer_handle_t_::ur_exp_command_buffer_handle_t_(
|
485 | 486 | IsUpdatable(Desc->isUpdatable), IsProfilingEnabled(Desc->enableProfiling),
|
486 | 487 | InOrderRequested(Desc->isInOrder), IsInOrderCmdList(IsInOrderCmdList),
|
487 | 488 | UseImmediateAppendPath(UseImmediateAppendPath) {
|
488 |
| - ur::level_zero::urContextRetain(Context); |
489 |
| - ur::level_zero::urDeviceRetain(Device); |
| 489 | + UR_CALL_NOCHECK(ur::level_zero::urContextRetain(Context)); |
| 490 | + UR_CALL_NOCHECK(ur::level_zero::urDeviceRetain(Device)); |
490 | 491 | }
|
491 | 492 |
|
492 | 493 | void ur_exp_command_buffer_handle_t_::cleanupCommandBufferResources() {
|
493 | 494 | // Release the memory allocated to the Context stored in the command_buffer
|
494 |
| - ur::level_zero::urContextRelease(Context); |
| 495 | + UR_CALL_NOCHECK(ur::level_zero::urContextRelease(Context)); |
495 | 496 |
|
496 | 497 | // Release the device
|
497 |
| - ur::level_zero::urDeviceRelease(Device); |
| 498 | + UR_CALL_NOCHECK(ur::level_zero::urDeviceRelease(Device)); |
498 | 499 |
|
499 | 500 | // Release the memory allocated to the CommandList stored in the
|
500 | 501 | // command_buffer
|
@@ -586,7 +587,7 @@ void ur_exp_command_buffer_handle_t_::cleanupCommandBufferResources() {
|
586 | 587 |
|
587 | 588 | for (auto &AssociatedKernel : KernelsList) {
|
588 | 589 | ReleaseIndirectMem(AssociatedKernel);
|
589 |
| - ur::level_zero::urKernelRelease(AssociatedKernel); |
| 590 | + UR_CALL_NOCHECK(ur::level_zero::urKernelRelease(AssociatedKernel)); |
590 | 591 | }
|
591 | 592 | }
|
592 | 593 |
|
@@ -1068,10 +1069,10 @@ ur_result_t urCommandBufferAppendKernelLaunchExp(
|
1068 | 1069 | CommandBuffer->KernelsList.push_back(KernelAlternatives[i]);
|
1069 | 1070 | }
|
1070 | 1071 |
|
1071 |
| - ur::level_zero::urKernelRetain(Kernel); |
| 1072 | + UR_CALL(ur::level_zero::urKernelRetain(Kernel)); |
1072 | 1073 | // Retain alternative kernels if provided
|
1073 | 1074 | for (size_t i = 0; i < NumKernelAlternatives; i++) {
|
1074 |
| - ur::level_zero::urKernelRetain(KernelAlternatives[i]); |
| 1075 | + UR_CALL(ur::level_zero::urKernelRetain(KernelAlternatives[i])); |
1075 | 1076 | }
|
1076 | 1077 |
|
1077 | 1078 | if (Command) {
|
@@ -1509,8 +1510,8 @@ ur_result_t waitForDependencies(ur_exp_command_buffer_handle_t CommandBuffer,
|
1509 | 1510 | (WaitCommandList->first, CommandBuffer->WaitEvent->ZeEvent,
|
1510 | 1511 | CommandBuffer->WaitEvent->WaitList.Length,
|
1511 | 1512 | CommandBuffer->WaitEvent->WaitList.ZeEventList));
|
1512 |
| - Queue->executeCommandList(WaitCommandList, false /*IsBlocking*/, |
1513 |
| - false /*OKToBatchCommand*/); |
| 1513 | + UR_CALL(Queue->executeCommandList(WaitCommandList, false /*IsBlocking*/, |
| 1514 | + false /*OKToBatchCommand*/)); |
1514 | 1515 | MustSignalWaitEvent = false;
|
1515 | 1516 | }
|
1516 | 1517 | // Given WaitEvent was created without specifying Counting Events, then this
|
|
0 commit comments