@@ -353,15 +353,11 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer
353
353
false ,
354
354
returnValue));
355
355
ResidencyContainer container;
356
- uint32_t peekTaskCountBefore = commandQueue->csr ->peekTaskCount ();
357
- uint32_t flushedTaskCountBefore = commandQueue->csr ->peekLatestFlushedTaskCount ();
358
- NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer (0 , container, nullptr , false );
356
+ commandQueue->submitBatchBuffer (0 , container, nullptr , false );
359
357
EXPECT_EQ (csr->makeResidentCalledTimes , 0u );
360
- EXPECT_EQ (ret, NEO::SubmissionStatus::SUCCESS);
361
- EXPECT_EQ ((peekTaskCountBefore + 1 ), commandQueue->csr ->peekTaskCount ());
362
- EXPECT_EQ ((flushedTaskCountBefore + 1 ), commandQueue->csr ->peekLatestFlushedTaskCount ());
358
+
359
+ EXPECT_EQ (commandQueue->commandStream ->getGraphicsAllocation ()->getTaskCount (commandQueue->csr ->getOsContext ().getContextId ()), commandQueue->csr ->peekTaskCount ());
363
360
EXPECT_EQ (commandQueue->commandStream ->getGraphicsAllocation ()->getTaskCount (commandQueue->csr ->getOsContext ().getContextId ()), commandQueue->csr ->peekTaskCount ());
364
- EXPECT_EQ (commandQueue->commandStream ->getGraphicsAllocation ()->getResidencyTaskCount (commandQueue->csr ->getOsContext ().getContextId ()), commandQueue->csr ->peekTaskCount ());
365
361
commandQueue->destroy ();
366
362
}
367
363
@@ -378,14 +374,9 @@ HWTEST_F(CommandQueueCreate, givenCommandStreamReceiverFailsThenSubmitBatchBuffe
378
374
false ,
379
375
returnValue));
380
376
ResidencyContainer container;
381
- uint32_t peekTaskCountBefore = commandQueue->csr ->peekTaskCount ();
382
- uint32_t flushedTaskCountBefore = commandQueue->csr ->peekLatestFlushedTaskCount ();
383
377
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer (0 , container, nullptr , false );
384
378
EXPECT_EQ (ret, NEO::SubmissionStatus::FAILED);
385
- EXPECT_EQ (peekTaskCountBefore, commandQueue->csr ->peekTaskCount ());
386
- EXPECT_EQ (flushedTaskCountBefore, commandQueue->csr ->peekLatestFlushedTaskCount ());
387
- EXPECT_EQ (commandQueue->commandStream ->getGraphicsAllocation ()->getTaskCount (commandQueue->csr ->getOsContext ().getContextId ()), commandQueue->csr ->peekTaskCount ());
388
- EXPECT_EQ (commandQueue->commandStream ->getGraphicsAllocation ()->getResidencyTaskCount (commandQueue->csr ->getOsContext ().getContextId ()), commandQueue->csr ->peekTaskCount ());
379
+
389
380
commandQueue->destroy ();
390
381
}
391
382
@@ -1526,57 +1517,6 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenExecuteComma
1526
1517
commandList->destroy ();
1527
1518
}
1528
1519
1529
- HWTEST2_F (ExecuteCommandListTests, givenFailingSubmitBatchBufferThenResetGraphicsTaskCounts, IsAtLeastSkl) {
1530
- ze_command_queue_desc_t desc = {};
1531
- NEO::CommandStreamReceiver *csr;
1532
- device->getCsrForOrdinalAndIndex (&csr, 0u , 0u );
1533
- auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1534
- commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1535
-
1536
- commandQueue->initialize (false , false );
1537
- auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
1538
- commandList->initialize (device, NEO::EngineGroupType::Compute, 0u );
1539
- auto commandListHandle = commandList->toHandle ();
1540
-
1541
- void *alloc = alignedMalloc (0x100 , 0x100 );
1542
- NEO::GraphicsAllocation graphicsAllocation1 (0 , NEO::AllocationType::BUFFER, alloc, 0u , 0u , 1u , MemoryPool::System4KBPages, 1u );
1543
- NEO::GraphicsAllocation graphicsAllocation2 (0 , NEO::AllocationType::BUFFER, alloc, 0u , 0u , 1u , MemoryPool::System4KBPages, 1u );
1544
- graphicsAllocation1.updateTaskCount (3 , csr->getOsContext ().getContextId ());
1545
- graphicsAllocation2.updateTaskCount (3 , csr->getOsContext ().getContextId ());
1546
- commandList->commandContainer .addToResidencyContainer (&graphicsAllocation1);
1547
- commandList->commandContainer .addToResidencyContainer (&graphicsAllocation2);
1548
- auto res = commandQueue->executeCommandLists (1 , &commandListHandle, nullptr , false );
1549
- EXPECT_EQ (ZE_RESULT_ERROR_UNKNOWN, res);
1550
-
1551
- EXPECT_EQ (0u , graphicsAllocation1.getTaskCount (csr->getOsContext ().getContextId ()));
1552
- EXPECT_EQ (0u , graphicsAllocation2.getTaskCount (csr->getOsContext ().getContextId ()));
1553
-
1554
- commandQueue->destroy ();
1555
- commandList->destroy ();
1556
- alignedFree (alloc);
1557
- }
1558
-
1559
- HWTEST2_F (ExecuteCommandListTests, givenFailingSubmitBatchBufferThenWaitForCompletionFalse, IsAtLeastSkl) {
1560
- ze_command_queue_desc_t desc = {};
1561
- NEO::CommandStreamReceiver *csr;
1562
- device->getCsrForOrdinalAndIndex (&csr, 0u , 0u );
1563
- auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
1564
- commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
1565
-
1566
- commandQueue->initialize (false , false );
1567
- auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
1568
- commandList->initialize (device, NEO::EngineGroupType::Compute, 0u );
1569
- auto commandListHandle = commandList->toHandle ();
1570
- uint32_t flushedTaskCountPrior = csr->peekTaskCount ();
1571
- csr->setLatestFlushedTaskCount (flushedTaskCountPrior);
1572
- auto res = commandQueue->executeCommandLists (1 , &commandListHandle, nullptr , false );
1573
- EXPECT_EQ (ZE_RESULT_ERROR_UNKNOWN, res);
1574
- EXPECT_EQ (csr->peekLatestFlushedTaskCount (), flushedTaskCountPrior);
1575
-
1576
- commandQueue->destroy ();
1577
- commandList->destroy ();
1578
- }
1579
-
1580
1520
HWTEST2_F (ExecuteCommandListTests, givenSuccessfulSubmitBatchBufferThenExecuteCommandListReturnsSuccess, IsAtLeastSkl) {
1581
1521
ze_command_queue_desc_t desc = {};
1582
1522
NEO::CommandStreamReceiver *csr;
0 commit comments