@@ -28,13 +28,13 @@ SinKernelGraphL0::DataFloatPtr SinKernelGraphL0::allocDevice(uint32_t count) {
2828 ze_device_mem_alloc_desc_t deviceAllocationDesc = {
2929 ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC};
3030
31- zeMemAllocDevice (levelzero->context , &deviceAllocationDesc,
32- count * sizeof (float ), 0 , levelzero->device ,
33- &deviceptr);
31+ EXPECT_ZE_RESULT_SUCCESS ( zeMemAllocDevice (levelzero->context , &deviceAllocationDesc,
32+ count * sizeof (float ), 0 , levelzero->device ,
33+ &deviceptr) );
3434
3535 auto copied = levelzero;
3636 return SinKernelGraphL0::DataFloatPtr (static_cast <float *>(deviceptr), [copied](float *ptr) {
37- zeMemFree (copied->context , ptr);
37+ EXPECT_ZE_RESULT_SUCCESS ( zeMemFree (copied->context , ptr) );
3838 });
3939}
4040
@@ -43,12 +43,12 @@ SinKernelGraphL0::DataFloatPtr SinKernelGraphL0::allocHost(uint32_t count) {
4343 ze_host_mem_alloc_desc_t hostAllocationDesc = {
4444 ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC};
4545
46- zeMemAllocHost (levelzero->context , &hostAllocationDesc,
47- count * sizeof (float ), 0 , &hostptr);
46+ EXPECT_ZE_RESULT_SUCCESS ( zeMemAllocHost (levelzero->context , &hostAllocationDesc,
47+ count * sizeof (float ), 0 , &hostptr) );
4848
4949 auto copied = levelzero;
5050 return SinKernelGraphL0::DataFloatPtr (static_cast <float *>(hostptr), [copied](float *ptr) {
51- zeMemFree (copied->context , ptr);
51+ EXPECT_ZE_RESULT_SUCCESS ( zeMemFree (copied->context , ptr) );
5252 });
5353}
5454
@@ -207,7 +207,7 @@ TestResult SinKernelGraphL0::runGraph(float *input_h) {
207207 ASSERT_ZE_RESULT_SUCCESS (zeCommandListImmediateAppendCommandListsExp (
208208 immCmdList, 1 , &graphCmdList, nullptr , 0 , nullptr ));
209209 } else {
210- zeCommandQueueExecuteCommandLists (cmdQueue, 1 , &graphCmdList, nullptr );
210+ ASSERT_ZE_RESULT_SUCCESS ( zeCommandQueueExecuteCommandLists (cmdQueue, 1 , &graphCmdList, nullptr ) );
211211 }
212212
213213 return TestResult::Success;
@@ -228,7 +228,7 @@ TestResult SinKernelGraphL0::runEager(float *input_h) {
228228TestResult SinKernelGraphL0::waitCompletion () {
229229 if (!immediateAppendCmdList && withGraphs) {
230230 ASSERT_ZE_RESULT_SUCCESS (zeCommandQueueSynchronize (cmdQueue, std::numeric_limits<uint64_t >::max ()));
231- zeEventHostReset (zeEvent);
231+ ASSERT_ZE_RESULT_SUCCESS ( zeEventHostReset (zeEvent) );
232232 } else {
233233 ASSERT_ZE_RESULT_SUCCESS (zeCommandListHostSynchronize (
234234 immCmdList, std::numeric_limits<uint64_t >::max ()));
@@ -242,13 +242,13 @@ SinKernelGraphL0::~SinKernelGraphL0() {
242242 return ;
243243
244244 if (graphCmdList != nullptr )
245- zeCommandListDestroy (graphCmdList);
246- zeKernelDestroy (kernelAssign);
247- zeKernelDestroy (kernelSin);
248- zeModuleDestroy (moduleAssign);
249- zeModuleDestroy (moduleSin);
250- zeEventDestroy (zeEvent);
251- zeEventPoolDestroy (zePool);
252- zeCommandListDestroy (immCmdList);
253- zeCommandQueueDestroy (cmdQueue);
245+ EXPECT_ZE_RESULT_SUCCESS ( zeCommandListDestroy (graphCmdList) );
246+ EXPECT_ZE_RESULT_SUCCESS ( zeKernelDestroy (kernelAssign) );
247+ EXPECT_ZE_RESULT_SUCCESS ( zeKernelDestroy (kernelSin) );
248+ EXPECT_ZE_RESULT_SUCCESS ( zeModuleDestroy (moduleAssign) );
249+ EXPECT_ZE_RESULT_SUCCESS ( zeModuleDestroy (moduleSin) );
250+ EXPECT_ZE_RESULT_SUCCESS ( zeEventDestroy (zeEvent) );
251+ EXPECT_ZE_RESULT_SUCCESS ( zeEventPoolDestroy (zePool) );
252+ EXPECT_ZE_RESULT_SUCCESS ( zeCommandListDestroy (immCmdList) );
253+ EXPECT_ZE_RESULT_SUCCESS ( zeCommandQueueDestroy (cmdQueue) );
254254}
0 commit comments