performance: primary batch buffer use only on regular command lists

Immediate command list can use internal command queue.
Immediate command list then uses variable start offset and it does not
work with primary batch buffer.

Related-To: NEO-7807

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2023-04-19 15:21:05 +00:00
committed by Compute-Runtime-Automation
parent a3e923e359
commit 669665deff
37 changed files with 218 additions and 102 deletions

View File

@@ -166,7 +166,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
this->l1CachePolicyData.init(productHelper);
this->cmdListHeapAddressModel = L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment);
this->dummyBlitWa.rootDeviceEnvironment = &(device->getNEODevice()->getRootDeviceEnvironmentRef());
this->dispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary();
this->dispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(this->cmdListType == CommandListType::TYPE_REGULAR);
this->requiredStreamState.initSupport(rootDeviceEnvironment);
this->finalStreamState.initSupport(rootDeviceEnvironment);

View File

@@ -185,7 +185,7 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
return commandList;
}
auto commandQueue = CommandQueue::create(productFamily, device, csr, desc, commandList->isCopyOnly(), internalUsage, returnValue);
auto commandQueue = CommandQueue::create(productFamily, device, csr, desc, commandList->isCopyOnly(), internalUsage, true, returnValue);
if (!commandQueue) {
commandList->destroy();
commandList = nullptr;

View File

@@ -71,9 +71,10 @@ ze_result_t CommandQueueImp::destroy() {
return ZE_RESULT_SUCCESS;
}
ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal, bool immediateCmdListQueue) {
ze_result_t returnValue;
internalUsage = isInternal;
internalQueueForImmediateCommandList = immediateCmdListQueue;
returnValue = buffers.initialize(device, totalCmdBufferSize);
if (returnValue == ZE_RESULT_SUCCESS) {
NEO::GraphicsAllocation *bufferAllocation = buffers.getCurrentBufferAllocation();
@@ -99,7 +100,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
auto &productHelper = rootDeviceEnvironment.getHelper<NEO::ProductHelper>();
this->doubleSbaWa = productHelper.isAdditionalStateBaseAddressWARequired(hwInfo);
this->cmdListHeapAddressModel = L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment);
this->dispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary();
this->dispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(!immediateCmdListQueue);
}
return returnValue;
}
@@ -211,7 +212,7 @@ void CommandQueueImp::postSyncOperations(bool hangDetected) {
}
CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::CommandStreamReceiver *csr,
const ze_command_queue_desc_t *desc, bool isCopyOnly, bool isInternal, ze_result_t &returnValue) {
const ze_command_queue_desc_t *desc, bool isCopyOnly, bool isInternal, bool immediateCmdListQueue, ze_result_t &returnValue) {
CommandQueueAllocatorFn allocator = nullptr;
if (productFamily < IGFX_MAX_PRODUCT) {
allocator = commandQueueFactory[productFamily];
@@ -224,7 +225,7 @@ CommandQueue *CommandQueue::create(uint32_t productFamily, Device *device, NEO::
}
commandQueue = static_cast<CommandQueueImp *>((*allocator)(device, csr, desc));
returnValue = commandQueue->initialize(isCopyOnly, isInternal);
returnValue = commandQueue->initialize(isCopyOnly, isInternal, immediateCmdListQueue);
if (returnValue != ZE_RESULT_SUCCESS) {
commandQueue->destroy();
commandQueue = nullptr;

View File

@@ -47,7 +47,7 @@ struct CommandQueue : _ze_command_queue_handle_t {
virtual ze_result_t synchronize(uint64_t timeout) = 0;
static CommandQueue *create(uint32_t productFamily, Device *device, NEO::CommandStreamReceiver *csr,
const ze_command_queue_desc_t *desc, bool isCopyOnly, bool isInternal, ze_result_t &resultValue);
const ze_command_queue_desc_t *desc, bool isCopyOnly, bool isInternal, bool immediateCmdListQueue, ze_result_t &resultValue);
static CommandQueue *fromHandle(ze_command_queue_handle_t handle) {
return static_cast<CommandQueue *>(handle);
@@ -83,6 +83,7 @@ struct CommandQueue : _ze_command_queue_handle_t {
bool stateBaseAddressTracking = false;
bool doubleSbaWa = false;
bool dispatchCmdListBatchBufferAsPrimary = false;
bool internalQueueForImmediateCommandList = false;
};
using CommandQueueAllocatorFn = CommandQueue *(*)(Device *device, NEO::CommandStreamReceiver *csr,

View File

@@ -75,7 +75,7 @@ struct CommandQueueImp : public CommandQueue {
ze_result_t synchronize(uint64_t timeout) override;
ze_result_t initialize(bool copyOnly, bool isInternal);
ze_result_t initialize(bool copyOnly, bool isInternal, bool immediateCmdListQueue);
Device *getDevice() { return device; }

View File

@@ -60,7 +60,7 @@ bool BcsSplit::setupDevice(uint32_t productFamily, bool internalUsage, const ze_
for (const auto &csr : csrs) {
ze_result_t result;
auto commandQueue = CommandQueue::create(productFamily, &device, csr, &splitDesc, true, false, result);
auto commandQueue = CommandQueue::create(productFamily, &device, csr, &splitDesc, true, false, true, result);
UNRECOVERABLE_IF(result != ZE_RESULT_SUCCESS);
this->cmdQs.push_back(commandQueue);

View File

@@ -280,7 +280,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
UNRECOVERABLE_IF(csr == nullptr);
ze_result_t returnValue = ZE_RESULT_SUCCESS;
*commandQueue = CommandQueue::create(platform.eProductFamily, this, csr, &commandQueueDesc, isCopyOnly, false, returnValue);
*commandQueue = CommandQueue::create(platform.eProductFamily, this, csr, &commandQueueDesc, isCopyOnly, false, false, returnValue);
return returnValue;
}

View File

@@ -103,12 +103,13 @@ NEO::HeapAddressModel L0GfxCoreHelper::getHeapAddressModel(const NEO::RootDevice
return l0GfxCoreHelper.getPlatformHeapAddressModel();
}
bool L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary() {
bool defaultValue = false;
bool L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(bool allowPrimary) {
constexpr bool defaultValue = false;
bool value = defaultValue;
if (NEO::DebugManager.flags.DispatchCmdlistCmdBufferPrimary.get() != -1) {
return !!(NEO::DebugManager.flags.DispatchCmdlistCmdBufferPrimary.get());
value = !!(NEO::DebugManager.flags.DispatchCmdlistCmdBufferPrimary.get());
}
return defaultValue;
return value && allowPrimary;
}
} // namespace L0

View File

@@ -50,7 +50,7 @@ class L0GfxCoreHelper : public NEO::ApiGfxCoreHelper {
static bool useDynamicEventPacketsCount(const NEO::HardwareInfo &hwInfo);
static bool useSignalAllEventPackets(const NEO::HardwareInfo &hwInfo);
static NEO::HeapAddressModel getHeapAddressModel(const NEO::RootDeviceEnvironment &rootDeviceEnvironment);
static bool dispatchCmdListBatchBufferAsPrimary();
static bool dispatchCmdListBatchBufferAsPrimary(bool allowPrimary);
virtual void setAdditionalGroupProperty(ze_command_queue_group_properties_t &groupProperty, NEO::EngineGroupT &group) const = 0;
virtual L0::Event *createEvent(L0::EventPool *eventPool, const ze_event_desc_t *desc, L0::Device *device) const = 0;

View File

@@ -91,7 +91,7 @@ void AUBFixtureL0::setUp(const NEO::HardwareInfo *hardwareInfo, bool debuggingEn
returnValue = ZE_RESULT_ERROR_UNINITIALIZED;
ze_command_queue_desc_t queueDesc = {};
pCmdq = CommandQueue::create(hwInfo.platform.eProductFamily, device, csr, &queueDesc, false, false, returnValue);
pCmdq = CommandQueue::create(hwInfo.platform.eProductFamily, device, csr, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
}
void AUBFixtureL0::tearDown() {

View File

@@ -99,6 +99,7 @@ void ModuleMutableCommandListFixture::setUpImpl() {
&queueDesc,
false,
false,
false,
returnValue));
auto &gfxCoreHelper = device->getGfxCoreHelper();

View File

@@ -54,6 +54,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
&queueDesc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);

View File

@@ -36,7 +36,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelin
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -77,7 +77,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBa
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -125,7 +125,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThre
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -172,7 +172,7 @@ GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemp
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();

View File

@@ -57,6 +57,7 @@ struct CommandQueueThreadArbitrationPolicyTests : public ::testing::Test {
&queueDesc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);

View File

@@ -38,6 +38,7 @@ struct WhiteBox<::L0::CommandQueue> : public ::L0::CommandQueueImp {
using CommandQueue::dispatchCmdListBatchBufferAsPrimary;
using CommandQueue::doubleSbaWa;
using CommandQueue::frontEndStateTracking;
using CommandQueue::internalQueueForImmediateCommandList;
using CommandQueue::internalUsage;
using CommandQueue::partitionCount;
using CommandQueue::pipelineSelectStateTracking;
@@ -75,6 +76,7 @@ struct MockCommandQueueHw : public L0::CommandQueueHw<gfxCoreFamily> {
using L0::CommandQueue::dispatchCmdListBatchBufferAsPrimary;
using L0::CommandQueue::doubleSbaWa;
using L0::CommandQueue::frontEndStateTracking;
using L0::CommandQueue::internalQueueForImmediateCommandList;
using L0::CommandQueue::internalUsage;
using L0::CommandQueue::partitionCount;
using L0::CommandQueue::pipelineSelectStateTracking;

View File

@@ -48,6 +48,7 @@ HWTEST2_F(CommandQueueLinuxTests, givenExecBufferErrorOnXeHpcWhenExecutingComman
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);

View File

@@ -221,7 +221,7 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToAsy
auto &csr = neoDevice->getUltCommandStreamReceiver<FamilyType>();
cmdList.setCsr(&csr);
cmdList.getCmdContainer().setImmediateCmdListCsr(&csr);
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, result);
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result);
cmdList.cmdQImmediate = commandQueue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
@@ -257,7 +257,7 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToSyn
desc.stype = ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC;
desc.pNext = 0;
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, result);
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result);
cmdList.cmdQImmediate = commandQueue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
@@ -297,7 +297,7 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendToSynch
desc.stype = ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC;
desc.pNext = 0;
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, result);
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result);
cmdList.cmdQImmediate = commandQueue;
ze_group_count_t groupCount{1, 1, 1};
@@ -325,6 +325,7 @@ TEST_F(CommandQueueWithAssert, GivenCmdListWithAssertWhenExecutingThenCommandQue
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -357,6 +358,7 @@ TEST_F(CommandQueueWithAssert, GivenAssertKernelExecutedAndNoAssertHandlerWhenCh
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -381,6 +383,7 @@ TEST_F(CommandQueueWithAssert, GivenCmdListWithAssertExecutedWhenSynchronizeByPo
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -407,6 +410,7 @@ HWTEST_F(CommandQueueWithAssert, GivenCmdListWithAssertExecutedAndDetectedHangWh
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel1;
@@ -440,6 +444,7 @@ TEST_F(CommandQueueWithAssert, GivenAssertKernelExecutedWhenSynchronizingFenceTh
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);

View File

@@ -2436,7 +2436,7 @@ TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDef
EXPECT_EQ(expectedHeapAddressModel, commandList->getCmdListHeapAddressModel());
EXPECT_EQ(expectedHeapAddressModel, commandList->getCmdContainer().getHeapAddressModel());
auto expectedDispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary();
auto expectedDispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(true);
EXPECT_EQ(expectedDispatchCmdListBatchBufferAsPrimary, commandList->dispatchCmdListBatchBufferAsPrimary);
}

View File

@@ -1423,6 +1423,16 @@ HWTEST2_F(CommandListCreate, givenPlatformNotSupportsSharedHeapsWhenImmediateCmd
using PrimaryBatchBufferCmdListTest = Test<PrimaryBatchBufferCmdListFixture>;
HWTEST_F(PrimaryBatchBufferCmdListTest, givenForcedPrimaryBatchBufferWhenRegularAndImmediateObjectCreatedThenRegularSetPrimaryFlagAndImmediateNot) {
EXPECT_TRUE(commandList->dispatchCmdListBatchBufferAsPrimary);
EXPECT_TRUE(commandQueue->dispatchCmdListBatchBufferAsPrimary);
EXPECT_FALSE(commandListImmediate->dispatchCmdListBatchBufferAsPrimary);
ASSERT_NE(nullptr, commandListImmediate->cmdQImmediate);
auto immediateCmdQueue = static_cast<L0::ult::CommandQueue *>(commandListImmediate->cmdQImmediate);
EXPECT_FALSE(immediateCmdQueue->dispatchCmdListBatchBufferAsPrimary);
}
HWTEST_F(PrimaryBatchBufferCmdListTest, givenPrimaryBatchBufferWhenAppendingKernelAndClosingCommandListThenExpectAlignedSpaceForBatchBufferStart) {
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;

View File

@@ -2305,7 +2305,7 @@ HWTEST2_F(CommandListStateBaseAddressPrivateHeapTest,
ze_command_queue_desc_t desc = {};
auto cmdQueueHw = new MockCommandQueueHw<gfxCoreFamily>(device, commandQueue->getCsr(), &desc);
cmdQueueHw->initialize(false, false);
cmdQueueHw->initialize(false, false, false);
auto &cmdQueueStream = cmdQueueHw->commandStream;

View File

@@ -42,6 +42,7 @@ TEST_F(CommandQueueCreate, whenCreatingCommandQueueThenItIsInitialized) {
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
@@ -77,6 +78,7 @@ TEST_F(CommandQueueCreate, whenSynchronizeByPollingTaskCountThenCallsPrintOutput
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel1, kernel2;
@@ -102,6 +104,7 @@ HWTEST_F(CommandQueueCreate, givenPrintfKernelAndDetectedHangWhenSynchronizingBy
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel1;
@@ -134,6 +137,7 @@ HWTEST_F(CommandQueueCreate, givenPrintfKernelAndDetectedHangWhenSynchronizingTh
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel1;
@@ -163,6 +167,7 @@ HWTEST_F(CommandQueueCreate, givenGpuHangOnSecondReserveWhenReservingLinearStrea
&desc,
false,
false,
false,
returnValue));
size_t maxSize = commandQueue->commandStream.getMaxAvailableSpace();
@@ -204,6 +209,7 @@ HWTEST_F(CommandQueueCreate, whenReserveLinearStreamThenBufferAllocationSwitched
&desc,
false,
false,
false,
returnValue));
size_t maxSize = commandQueue->commandStream.getMaxAvailableSpace();
@@ -264,6 +270,7 @@ TEST_F(CommandQueueCreate, whenCreatingCommandQueueWithInvalidProductFamilyThenF
&desc,
false,
false,
false,
returnValue);
ASSERT_EQ(nullptr, commandQueue);
@@ -278,6 +285,7 @@ TEST_F(CommandQueueCreate, whenCmdBuffersAllocationsAreCreatedThenSizeIsNotLessT
&desc,
false,
false,
false,
returnValue));
size_t maxSize = commandQueue->commandStream.getMaxAvailableSpace();
@@ -310,6 +318,7 @@ HWTEST_F(CommandQueueCreate, given100CmdListsWhenExecutingThenCommandStreamIsNot
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -359,6 +368,7 @@ HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperWhenExecutingThenMergeState
&desc,
false,
false,
false,
returnValue));
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(commandQueue->getCsr());
ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper);
@@ -396,6 +406,7 @@ HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperAndImmediateCmdListWhenExec
&desc,
false,
false,
false,
returnValue));
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(commandQueue->getCsr());
ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper);
@@ -422,7 +433,7 @@ HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperAndImmediateCmdListWhenExec
HWTEST2_F(CommandQueueCreate, givenOutOfHostMemoryErrorFromSubmitBatchBufferWhenExecutingCommandListsThenOutOfHostMemoryIsReturned, IsAtLeastSkl) {
const ze_command_queue_desc_t desc = {};
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
commandQueue->submitBatchBufferReturnValue = NEO::SubmissionStatus::OUT_OF_HOST_MEMORY;
Mock<Kernel> kernel;
@@ -470,7 +481,7 @@ HWTEST2_F(CommandQueueCreate, givenSwTagsEnabledWhenPrepareAndSubmitBatchBufferT
NEO::DebugManager.flags.EnableSWTags.set(1);
const ze_command_queue_desc_t desc = {};
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
ASSERT_NE(nullptr, commandList);
@@ -519,7 +530,7 @@ struct MockCommandQueueHwEstimateSizeTest : public MockCommandQueueHw<gfxCoreFam
HWTEST2_F(CommandQueueCreate, GivenDispatchTaskCountPostSyncRequiredWhenExecuteCommandListsThenEstimatedSizeIsCorrect, IsAtLeastSkl) {
const ze_command_queue_desc_t desc = {};
auto commandQueue = new MockCommandQueueHwEstimateSizeTest<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(
@@ -558,6 +569,7 @@ HWTEST_F(CommandQueueCreate, givenUpdateTaskCountFromWaitAndRegularCmdListWhenDi
&desc,
false,
false,
false,
returnValue));
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -598,6 +610,7 @@ HWTEST_F(CommandQueueCreate, givenUpdateTaskCountFromWaitAndImmediateCmdListWhen
&desc,
false,
false,
false,
returnValue));
auto commandList = CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue);
@@ -635,6 +648,7 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer
&desc,
false,
false,
false,
returnValue));
ResidencyContainer container;
TaskCountType peekTaskCountBefore = commandQueue->csr->peekTaskCount();
@@ -660,6 +674,7 @@ HWTEST_F(CommandQueueCreate, givenCommandStreamReceiverFailsThenSubmitBatchBuffe
&desc,
false,
false,
false,
returnValue));
ResidencyContainer container;
TaskCountType peekTaskCountBefore = commandQueue->csr->peekTaskCount();
@@ -684,6 +699,7 @@ HWTEST_F(CommandQueueCreate, givenOutOfMemoryThenSubmitBatchBufferReturnsOutOfMe
&desc,
false,
false,
false,
returnValue));
ResidencyContainer container;
NEO::SubmissionStatus ret = commandQueue->submitBatchBuffer(0, container, nullptr, false);
@@ -702,6 +718,7 @@ TEST_F(CommandQueueCreate, whenCommandQueueCreatedThenExpectLinearStreamInitiali
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(commandQueue, nullptr);
@@ -726,6 +743,7 @@ HWTEST_F(CommandQueueCreate, givenQueueInAsyncModeAndRugularCmdListWithAppendBar
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -747,6 +765,7 @@ HWTEST_F(CommandQueueCreate, givenQueueInSyncModeAndRugularCmdListWithAppendBarr
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -769,6 +788,7 @@ TEST_F(CommandQueueCreate, givenCmdQueueWithBlitCopyWhenExecutingNonCopyBlitComm
&desc,
true,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -792,6 +812,7 @@ TEST_F(CommandQueueCreate, givenCmdQueueWithBlitCopyWhenExecutingCopyBlitCommand
&desc,
true,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -1147,7 +1168,7 @@ HWTEST2_F(ExecuteCommandListTests, givenExecuteCommandListWhenItReturnsThenConta
NEO::CommandStreamReceiver *csr;
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
auto commandQueue = new MockCommandQueue<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
commandList->setCommandListPerThreadScratchSize(100u);
@@ -1187,7 +1208,7 @@ HWTEST2_F(ExecuteCommandListTests, givenOutOfMemorySubmitBatchBufferThenExecuteC
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::OUT_OF_MEMORY;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1205,7 +1226,7 @@ HWTEST2_F(CommandQueueDestroy, givenCommandQueueAndCommandListWithSshAndScratchW
NEO::CommandStreamReceiver *csr;
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
auto commandQueue = new MockCommandQueue<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
commandList->setCommandListPerThreadScratchSize(100u);
@@ -1231,7 +1252,7 @@ HWTEST2_F(CommandQueueDestroy, givenCommandQueueAndCommandListWithSshAndPrivateS
NEO::CommandStreamReceiver *csr;
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
auto commandQueue = new MockCommandQueue<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
commandList->setCommandListPerThreadPrivateScratchSize(100u);
@@ -1261,7 +1282,7 @@ HWTEST2_F(CommandQueueDestroy, givenCommandQueueAndCommandListWithWhenBindlessEn
NEO::CommandStreamReceiver *csr;
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
auto commandQueue = new MockCommandQueue<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
commandList->setCommandListPerThreadScratchSize(100u);
@@ -1281,7 +1302,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenExecuteComma
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1302,7 +1323,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenResetGraphic
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1332,7 +1353,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenResetGraphic
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1360,7 +1381,7 @@ HWTEST2_F(ExecuteCommandListTests, givenFailingSubmitBatchBufferThenWaitForCompl
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::FAILED;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1381,7 +1402,7 @@ HWTEST2_F(ExecuteCommandListTests, givenSuccessfulSubmitBatchBufferThenExecuteCo
auto commandQueue = new MockCommandQueueSubmitBatchBuffer<gfxCoreFamily>(device, csr, &desc);
commandQueue->submitBatchBufferResult = NEO::SubmissionStatus::SUCCESS;
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
auto commandListHandle = commandList->toHandle();
@@ -1404,6 +1425,7 @@ HWTEST2_F(ExecuteCommandListTests, givenCommandQueueHavingTwoB2BCommandListsThen
&desc,
false,
false,
false,
returnValue);
auto commandList0 = new CommandListCoreFamily<gfxCoreFamily>();
commandList0->initialize(device, NEO::EngineGroupType::Compute, 0u);
@@ -1442,6 +1464,7 @@ HWTEST2_F(ExecuteCommandListTests, givenCommandQueueHavingTwoB2BCommandListsThen
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
commandList0->setCommandListPerThreadScratchSize(0u);
@@ -1483,6 +1506,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
auto commandList1 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -1519,6 +1543,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false);
@@ -1555,6 +1580,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
auto commandList1 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -1591,6 +1617,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false);
@@ -1627,6 +1654,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
auto commandList1 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -1663,6 +1691,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false);
@@ -1699,6 +1728,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
auto commandList1 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -1735,6 +1765,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false);
EXPECT_EQ(1024u, csr->getScratchSpaceController()->getPerThreadScratchSpaceSize());
@@ -1769,6 +1800,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
auto commandList0 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
auto commandList1 = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
@@ -1803,6 +1835,7 @@ HWTEST2_F(ExecuteCommandListTests, givenTwoCommandQueuesHavingTwoB2BCommandLists
&desc,
false,
false,
false,
returnValue));
commandQueue1->executeCommandLists(1, &commandListHandle0, nullptr, false);
EXPECT_EQ(1024u, csr->getScratchSpaceController()->getPerThreadPrivateScratchSize());
@@ -1836,6 +1869,7 @@ HWTEST_F(ExecuteCommandListTests, givenDirectSubmissionEnabledWhenExecutingCmdLi
&desc,
false,
false,
false,
returnValue));
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
commandList->setCommandListPerThreadPrivateScratchSize(0u);
@@ -1878,6 +1912,7 @@ HWTEST_F(ExecuteCommandListTests, givenDirectSubmissionEnabledAndDebugFlagSetWhe
&desc,
false,
false,
false,
returnValue));
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
commandList->setCommandListPerThreadPrivateScratchSize(0u);
@@ -1920,6 +1955,7 @@ TEST_F(CommandQueueCreate, givenOverrideCmdQueueSyncModeToDefaultWhenCommandQueu
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
@@ -1942,6 +1978,7 @@ TEST_F(CommandQueueCreate, givenOverrideCmdQueueSyncModeToAsynchronousWhenComman
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
@@ -1964,6 +2001,7 @@ TEST_F(CommandQueueCreate, givenOverrideCmdQueueSyncModeToSynchronousWhenCommand
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
@@ -1987,6 +2025,7 @@ TEST_F(CommandQueueCreate, givenCreatedCommandQueueWhenGettingTrackingFlagsThenD
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
@@ -2010,7 +2049,7 @@ TEST_F(CommandQueueCreate, givenCreatedCommandQueueWhenGettingTrackingFlagsThenD
auto expectedHeapAddressModel = l0GfxCoreHelper.getPlatformHeapAddressModel();
EXPECT_EQ(expectedHeapAddressModel, commandQueue->cmdListHeapAddressModel);
auto expectedDispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary();
auto expectedDispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(true);
EXPECT_EQ(expectedDispatchCmdListBatchBufferAsPrimary, commandQueue->dispatchCmdListBatchBufferAsPrimary);
commandQueue->destroy();
@@ -2046,6 +2085,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
&desc,
false,
false,
false,
returnValue));
std::unique_lock<std::mutex> lock;
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle()->getMemoryManager());
@@ -2071,6 +2111,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
&desc,
false,
false,
false,
returnValue));
std::unique_lock<std::mutex> lock;
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle()->getMemoryManager());
@@ -2097,6 +2138,7 @@ TEST_F(CommandQueueCreate, givenCommandQueueWhenHandleIndirectAllocationResidenc
&desc,
false,
false,
false,
returnValue));
std::unique_lock<std::mutex> lock;
auto mockSvmAllocsManager = std::make_unique<SVMAllocsManagerMock>(device->getDriverHandle()->getMemoryManager());

View File

@@ -313,6 +313,7 @@ HWTEST2_F(MultiTileCommandQueueSynchronizeTest, givenMultiplePartitionCountWhenC
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -353,6 +354,7 @@ HWTEST2_F(MultiTileCommandQueueSynchronizeTest, givenCsrHasMultipleActivePartiti
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -380,6 +382,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSingleTileCsrWhenExecutingMultiTileCo
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -418,6 +421,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSinglePartitionCountWhenWaitFunctionF
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -458,6 +462,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenSynchronousCommandQueueWhenTagUpdateF
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -521,6 +526,7 @@ HWTEST_F(CommandQueuePowerHintTest, givenDriverHandleWithPowerHintAndOsContextPo
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -544,6 +550,7 @@ HWTEST_F(CommandQueuePowerHintTest, givenDriverHandleWithPowerHintAndOsContextPo
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(returnValue, ZE_RESULT_SUCCESS);
ASSERT_NE(nullptr, commandQueue);
@@ -608,6 +615,7 @@ TEST_F(CommandQueueCreateNegativeTest, whenDeviceAllocationFailsDuringCommandQue
&desc,
false,
false,
false,
returnValue);
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, returnValue);
ASSERT_EQ(nullptr, commandQueue);
@@ -662,7 +670,7 @@ TEST_F(CommandQueueInitTests, givenMultipleSubDevicesWhenInitializingThenAllocat
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue;
L0::CommandQueue *commandQueue = CommandQueue::create(productFamily, device, csr.get(), &desc, false, false, returnValue);
L0::CommandQueue *commandQueue = CommandQueue::create(productFamily, device, csr.get(), &desc, false, false, false, returnValue);
EXPECT_NE(nullptr, commandQueue);
const uint64_t expectedBitfield = maxNBitValue(numSubDevices);
@@ -687,7 +695,7 @@ TEST_F(CommandQueueInitTests, whenDestroyCommandQueueThenStoreCommandBuffersAsRe
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue;
L0::CommandQueue *commandQueue = CommandQueue::create(productFamily, device, csr.get(), &desc, false, false, returnValue);
L0::CommandQueue *commandQueue = CommandQueue::create(productFamily, device, csr.get(), &desc, false, false, false, returnValue);
EXPECT_NE(nullptr, commandQueue);
auto deviceImp = static_cast<DeviceImp *>(device);
EXPECT_TRUE(deviceImp->allocationsForReuse->peekIsEmpty());
@@ -722,6 +730,7 @@ HWTEST2_F(DeviceWithDualStorage, givenCmdListWithAppendedKernelAndUsmTransferAnd
&desc,
false,
false,
false,
res));
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
ASSERT_NE(nullptr, commandQueue);

View File

@@ -85,7 +85,7 @@ HWTEST2_F(CommandQueueProgramSBATest, whenCreatingCommandQueueThenItIsInitialize
auto csr = std::unique_ptr<NEO::CommandStreamReceiver>(neoDevice->createCommandStreamReceiver());
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr.get(), &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
uint32_t alignedSize = 4096u;
NEO::LinearStream child(commandQueue->commandStream.getSpace(alignedSize), alignedSize);
@@ -130,7 +130,7 @@ HWTEST2_F(CommandQueueProgramSBATest, whenProgrammingStateBaseAddressWithStatele
auto csr = std::unique_ptr<NEO::CommandStreamReceiver>(neoDevice->createCommandStreamReceiver());
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr.get(), &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto &commandStream = commandQueue->commandStream;
auto alignedSize = commandQueue->estimateStateBaseAddressCmdSize();
@@ -171,7 +171,7 @@ HWTEST2_F(CommandQueueProgramSBATest,
auto csr = std::unique_ptr<NEO::CommandStreamReceiver>(neoDevice->createCommandStreamReceiver());
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr.get(), &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto alignedSize = commandQueue->estimateStateBaseAddressCmdSize();
NEO::LinearStream child(commandQueue->commandStream.getSpace(alignedSize), alignedSize);
@@ -212,7 +212,7 @@ HWTEST2_F(CommandQueueProgramSBATest,
auto csr = std::unique_ptr<NEO::CommandStreamReceiver>(neoDevice->createCommandStreamReceiver());
csr->setupContext(*neoDevice->getDefaultEngine().osContext);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr.get(), &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto alignedSize = commandQueue->estimateStateBaseAddressCmdSize();
NEO::LinearStream child(commandQueue->commandStream.getSpace(alignedSize), alignedSize);
@@ -276,6 +276,7 @@ HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandLi
&desc,
true,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -305,6 +306,7 @@ HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandLi
&desc,
true,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -350,6 +352,7 @@ HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecuti
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -411,6 +414,7 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDebugModeToTreatIndirectAllocatio
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -475,6 +479,7 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDeviceThatSupportsSubmittingIndir
&desc,
false,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -702,7 +707,7 @@ HWTEST2_F(EngineInstancedDeviceExecuteTests, givenEngineInstancedDeviceWhenExecu
NEO::CommandStreamReceiver *csr;
l0Device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, false, returnValue));
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, l0Device, NEO::EngineGroupType::Compute, 0u, returnValue)));
auto commandListHandle = commandList->toHandle();
@@ -753,7 +758,7 @@ HWTEST2_F(EngineInstancedDeviceExecuteTests, givenEngineInstancedDeviceWithFabri
NEO::CommandStreamReceiver *csr;
l0Device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, l0Device, csr, &desc, false, false, false, returnValue));
auto commandList = std::unique_ptr<CommandList>(whiteboxCast(CommandList::create(productFamily, l0Device, NEO::EngineGroupType::Compute, 0u, returnValue)));
auto commandListHandle = commandList->toHandle();
@@ -795,7 +800,7 @@ HWTEST2_F(CommandQueueIndirectAllocations, givenCtxWithIndirectAccessWhenExecuti
ze_command_queue_desc_t desc = {};
auto csr = neoDevice->getDefaultEngine().commandStreamReceiver;
auto commandQueue = new MockCommandQueueHandleIndirectAllocs<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
auto cmdListHandle = commandList->toHandle();
@@ -818,7 +823,7 @@ HWTEST2_F(CommandQueueIndirectAllocations, givenCtxWitNohIndirectAccessWhenExecu
ze_command_queue_desc_t desc = {};
auto csr = neoDevice->getDefaultEngine().commandStreamReceiver;
auto commandQueue = new MockCommandQueueHandleIndirectAllocs<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
auto cmdListHandle = commandList.get()->toHandle();
@@ -845,7 +850,7 @@ HWTEST2_F(CommandQueueIndirectAllocations, givenCommandQueueWhenHandleIndirectAl
ze_command_queue_desc_t desc = {};
auto csr = neoDevice->getDefaultEngine().commandStreamReceiver;
auto commandQueue = new MockCommandQueueHandleIndirectAllocs<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
auto cmdListHandle = commandList.get()->toHandle();
@@ -877,6 +882,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenMakeResidentAndMigrateWithEmptyR
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
commandQueue->makeResidentAndMigrate(false, container);
@@ -896,6 +902,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenMakeResidentAndMigrateWithTwoAll
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
MockGraphicsAllocation mockGA1;
@@ -920,6 +927,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenPerformMigrationIsFalseThenTrans
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
MockGraphicsAllocation mockGA;
@@ -943,6 +951,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenPerformMigrationIsTrueAndAllocat
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
MockGraphicsAllocation mockGA;
@@ -967,6 +976,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenPerformMigrationIsTrueAndAllocat
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
MockGraphicsAllocation mockGA;
@@ -991,6 +1001,7 @@ HWTEST_F(CommandQueueTest, givenCommandQueueWhenPerformMigrationIsTrueAndAllocat
&desc,
true,
false,
false,
returnValue);
ResidencyContainer container;
MockGraphicsAllocation mockGA;
@@ -1053,7 +1064,7 @@ HWTEST2_F(CommandQueueTest, whenExecuteCommandListsIsCalledThenCorrectSizeOfFron
ASSERT_NE(nullptr, csr);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>{device, csr, &desc};
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
Mock<::L0::Kernel> defaultKernel;
auto pMockModule1 = std::unique_ptr<Module>(new Mock<Module>(device, nullptr));
@@ -1202,7 +1213,7 @@ HWTEST2_F(CommandQueueTest, givenRegularKernelScheduledAsCooperativeWhenExecuteC
ASSERT_NE(nullptr, csr);
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>{device, csr, &desc};
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
Mock<::L0::Kernel> defaultKernel;
auto pMockModule1 = std::unique_ptr<Module>(new Mock<Module>(device, nullptr));
@@ -1236,10 +1247,10 @@ HWTEST2_F(CommandQueueTest, givenTwoCommandQueuesUsingOneCsrWhenExecuteCommandLi
ASSERT_NE(nullptr, csr);
auto commandQueue1 = new MockCommandQueueHw<gfxCoreFamily>{device, csr, &desc};
commandQueue1->initialize(false, false);
commandQueue1->initialize(false, false, false);
auto commandQueue2 = new MockCommandQueueHw<gfxCoreFamily>{device, csr, &desc};
commandQueue2->initialize(false, false);
commandQueue2->initialize(false, false, false);
Mock<::L0::Kernel> defaultKernel;
auto pMockModule1 = std::unique_ptr<Module>(new Mock<Module>(device, nullptr));

View File

@@ -113,6 +113,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenACommandListExecutedRequiresUncach
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -139,6 +140,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenCommandListThatRequiresDisabledEU
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -168,6 +170,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenASecondLevelBatchBufferPerCommandL
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -216,6 +219,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenFenceWhenExecutingCmdListThenFenc
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
auto &csr = neoDevice->getUltCommandStreamReceiver<FamilyType>();
@@ -255,6 +259,7 @@ HWTEST2_F(CommandQueueExecuteCommandLists, whenUsingFenceThenExpectEndingPipeCon
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -307,6 +312,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, whenExecutingCommandListsThenEndingPip
&desc,
false,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
@@ -350,6 +356,7 @@ HWTEST2_F(CommandQueueExecuteCommandLists, givenCommandQueueHaving2CommandListsT
&desc,
false,
false,
false,
returnValue));
CommandList::fromHandle(commandLists[0])->setCommandListPerThreadScratchSize(512u);
@@ -427,6 +434,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenMidThreadPreemptionWhenCommandsAr
&desc,
false,
flagInternal,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -481,6 +489,7 @@ HWTEST2_F(CommandQueueExecuteCommandLists, givenMidThreadPreemptionWhenCommandsA
&desc,
false,
flagInternal,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -542,7 +551,7 @@ HWTEST2_F(CommandQueueExecuteCommandLists, givenCommandListsWithCooperativeAndNo
device->getCsrForOrdinalAndIndex(&csr, 0u, 0u);
auto pCommandQueue = new MockCommandQueueHw<gfxCoreFamily>{device, csr, &desc};
pCommandQueue->initialize(false, false);
pCommandQueue->initialize(false, false, false);
Mock<::L0::Kernel> kernel;
auto pMockModule = std::unique_ptr<Module>(new Mock<Module>(device, nullptr));
@@ -619,7 +628,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsImplicitScalingDisabled, givenCommandLi
Mock<L0::DeviceImp> device{pNeoDevice, pNeoDevice->getExecutionEnvironment()};
auto pCommandQueue = new MockCommandQueueHw<gfxCoreFamily>{&device, pMockCsr, &desc};
pCommandQueue->initialize(false, false);
pCommandQueue->initialize(false, false, false);
Mock<::L0::Kernel> kernel;
auto pMockModule = std::unique_ptr<Module>(new Mock<Module>(&device, nullptr));
@@ -661,7 +670,7 @@ void CommandQueueExecuteCommandLists::twoCommandListCommandPreemptionTest(bool p
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, currentCsr, &desc, false, false, returnValue));
device, currentCsr, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
commandQueue->preemptionCmdSyncProgramming = preemptionCmdProgramming;
preemptionCmdProgramming = NEO::PreemptionHelper::getRequiredCmdStreamSize<FamilyType>(NEO::PreemptionMode::ThreadGroup, NEO::PreemptionMode::Disabled) > 0u;
@@ -961,6 +970,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, GivenCopyCommandQueueWhenExecutingCopy
&desc,
true,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -1009,6 +1019,7 @@ struct CommandQueueExecuteCommandListSWTagsTests : public Test<DeviceFixture> {
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -1148,6 +1159,7 @@ HWTEST2_F(MultiDeviceCommandQueueExecuteCommandLists, givenMultiplePartitionCoun
&desc,
false,
false,
false,
returnValue));
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
EXPECT_EQ(2u, commandQueue->partitionCount);
@@ -1241,6 +1253,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, GivenUpdateTaskCountFromWaitWhenExecut
&desc,
true,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -1293,6 +1306,7 @@ HWTEST_F(CommandQueueExecuteCommandLists, GivenCopyCommandQueueWhenExecutingCopy
&desc,
true,
false,
false,
returnValue));
ASSERT_NE(nullptr, commandQueue);
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);

View File

@@ -28,7 +28,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, GivenSynchronousModeWhenExe
ze_command_queue_desc_t desc;
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
auto mockCmdQ = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
mockCmdQ->initialize(false, false);
mockCmdQ->initialize(false, false, false);
ze_result_t returnValue;
ze_command_list_handle_t commandLists[] = {
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle()};
@@ -43,7 +43,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, GivenSynchronousModeAndDevi
desc.mode = ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS;
auto mockCmdQ = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
mockCmdQ->initialize(false, false);
mockCmdQ->initialize(false, false, false);
mockCmdQ->synchronizeReturnValue = ZE_RESULT_ERROR_DEVICE_LOST;
ze_result_t returnValue;
@@ -62,7 +62,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, GivenAsynchronousModeWhenEx
ze_command_queue_desc_t desc;
desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
auto mockCmdQ = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);
mockCmdQ->initialize(false, false);
mockCmdQ->initialize(false, false, false);
ze_result_t returnValue;
ze_command_list_handle_t commandLists[] = {
CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle()};
@@ -79,7 +79,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, whenUsingFenceThenLastPipeC
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
queueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_fence_desc_t fenceDesc = {};
@@ -139,7 +139,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingS
ze_command_queue_desc_t queueDesc = {};
queueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -164,7 +164,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingS
cmdList.clear();
auto commandQueue2 = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue2 = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue2);
@@ -201,7 +201,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingS
ze_command_queue_desc_t queueDesc = {};
queueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue);
@@ -232,7 +232,7 @@ HWTEST2_F(CommandQueueExecuteCommandListsSimpleTest, givenTwoCommandQueuesUsingS
cmdList.clear();
foundPreemptionMmioCount = 0;
auto commandQueue2 = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue2 = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
ASSERT_NE(nullptr, commandQueue2);
@@ -406,7 +406,7 @@ struct PauseOnGpuTests : public PauseOnGpuFixture {
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue);
@@ -571,7 +571,7 @@ struct PauseOnGpuWithImmediateCommandListTests : public PauseOnGpuFixture {
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
commandList = CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::RenderCompute, returnValue);

View File

@@ -614,6 +614,7 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests,
&desc,
true,
false,
false,
returnValue);
EXPECT_NE(nullptr, commandQueue);
@@ -665,6 +666,7 @@ HWTEST2_F(ContextMakeMemoryResidentAndMigrationTests,
&desc,
true,
false,
false,
returnValue);
EXPECT_NE(nullptr, commandQueue);
@@ -714,6 +716,7 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests,
&desc,
true,
false,
false,
returnValue);
EXPECT_NE(nullptr, commandQueue);

View File

@@ -291,11 +291,11 @@ HWTEST_F(L0DebuggerLinuxTest, givenDebuggingEnabledWhenCommandQueuesAreCreatedAn
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(1u, drmMock->ioctlCallsCount);
EXPECT_EQ(1u, debuggerL0Hw->commandQueueCreatedCount);
auto commandQueue2 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue2 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(1u, drmMock->ioctlCallsCount);
EXPECT_EQ(2u, debuggerL0Hw->commandQueueCreatedCount);
@@ -398,12 +398,12 @@ HWTEST_F(L0DebuggerLinuxMultitileTest, givenDebuggingEnabledWhenCommandQueuesCre
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue1 = CommandQueue::create(productFamily, subDevice0, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue1 = CommandQueue::create(productFamily, subDevice0, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(1u, drmMock->ioctlCallsCount);
EXPECT_EQ(1u, debuggerL0Hw->commandQueueCreatedCount);
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
auto commandQueue2 = CommandQueue::create(productFamily, subDevice1, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue2 = CommandQueue::create(productFamily, subDevice1, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(2u, debuggerL0Hw->commandQueueCreatedCount);
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -433,7 +433,7 @@ HWTEST_F(L0DebuggerLinuxMultitileTest, givenDebuggingEnabledWhenCommandQueueCrea
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(2u, drmMock->ioctlCallsCount);
EXPECT_EQ(1u, debuggerL0Hw->commandQueueCreatedCount);
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
@@ -491,7 +491,7 @@ HWTEST_F(L0DebuggerLinuxMultitileTest, givenSubDeviceFilteredByAffinityMaskWhenC
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(1u, debuggerL0Hw->commandQueueCreatedCount);
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
EXPECT_NE(0u, debuggerL0Hw->uuidL0CommandQueueHandle[0]);

View File

@@ -91,7 +91,7 @@ HWTEST_F(L0DebuggerPerContextAddressSpaceTest, givenDebuggingEnabledWhenCommandL
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -433,7 +433,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionEnabledForRegularCo
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {
@@ -467,7 +467,7 @@ HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionDisabledForRegularC
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {

View File

@@ -358,7 +358,7 @@ HWTEST2_P(L0DebuggerWithBlitterTest, givenUseCsrImmediateSubmissionEnabledForReg
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {
@@ -437,7 +437,7 @@ HWTEST2_P(L0DebuggerWithBlitterTest, givenDebuggingEnabledWhenInternalCmdQIsUsed
ze_command_queue_desc_t queueDesc = {};
std::unique_ptr<MockCommandQueueHw<gfxCoreFamily>, Deleter> commandQueue(new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc));
commandQueue->initialize(false, true);
commandQueue->initialize(false, true, false);
EXPECT_TRUE(commandQueue->internalUsage);
ze_result_t returnValue;
ze_command_list_handle_t commandLists[] = {
@@ -492,7 +492,7 @@ HWTEST_P(L0DebuggerWithBlitterTest, givenDebuggingEnabledWhenCommandListIsExecut
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, bcsEngine->commandStreamReceiver, &queueDesc, true, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, bcsEngine->commandStreamReceiver, &queueDesc, true, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();

View File

@@ -123,7 +123,7 @@ HWTEST2_F(L0DebuggerPerContextAddressSpaceTest, givenDebuggingEnabledAndRequired
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto cmdQ = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto cmdQ = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
ASSERT_NE(nullptr, cmdQ);
auto commandQueue = whiteboxCast(cmdQ);
@@ -184,7 +184,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledAndDebuggerLogsWhenCommandQueueIs
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {
@@ -220,7 +220,7 @@ HWTEST2_F(L0DebuggerSimpleTest, givenNullL0DebuggerAndDebuggerLogsWhenCommandQue
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {
@@ -251,7 +251,7 @@ HWTEST2_F(L0DebuggerTest, givenL0DebuggerAndDebuggerLogsDisabledWhenCommandQueue
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
ze_command_list_handle_t commandLists[] = {
@@ -310,7 +310,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenSbaB
ze_command_queue_desc_t queueDesc = {};
std::unique_ptr<MockCommandQueueHw<gfxCoreFamily>, Deleter> commandQueue(new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc));
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
ze_command_list_handle_t commandLists[] = {
@@ -337,7 +337,7 @@ HWTEST2_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenSbaB
HWTEST2_F(L0DebuggerTest, givenDebugerEnabledWhenPrepareAndSubmitBatchBufferThenLeftoverIsZeroed, Gen12Plus) {
ze_command_queue_desc_t queueDesc = {};
std::unique_ptr<MockCommandQueueHw<gfxCoreFamily>, Deleter> commandQueue(new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc));
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
auto &commandStream = commandQueue->commandStream;
auto estimatedSize = 4096u;
@@ -384,7 +384,7 @@ HWTEST2_F(L0DebuggerSingleAddressSpace, givenDebuggingEnabledWhenCommandListIsEx
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();

View File

@@ -31,7 +31,7 @@ HWTEST2_F(CommandQueueDebugCommandsTest, givenDebuggingEnabledWhenCommandListIsE
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -80,7 +80,7 @@ HWTEST2_F(CommandQueueDebugCommandsTest, givenDebuggingEnabledWhenCommandListIsE
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue));
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily, deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -168,7 +168,7 @@ HWTEST2_F(SLDebuggerInternalUsageTest, givenDebuggingEnabledWhenInternalCmdQIsUs
device->setPreemptionMode(NEO::PreemptionMode::Disabled);
std::unique_ptr<MockCommandQueueHw<gfxCoreFamily>, Deleter> commandQueue(new MockCommandQueueHw<gfxCoreFamily>(deviceL0, device->getDefaultEngine().commandStreamReceiver, &queueDesc));
commandQueue->initialize(false, true);
commandQueue->initialize(false, true, false);
EXPECT_TRUE(commandQueue->internalUsage);
ze_result_t returnValue;
ze_command_list_handle_t commandLists[] = {

View File

@@ -93,10 +93,10 @@ HWTEST_F(L0DebuggerWindowsTest, givenDebuggingEnabledAndCommandQueuesAreCreatedA
ze_command_queue_desc_t queueDesc = {};
ze_result_t returnValue;
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue1 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(1u, debuggerL0Hw->commandQueueCreatedCount);
auto commandQueue2 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue2 = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
EXPECT_EQ(2u, debuggerL0Hw->commandQueueCreatedCount);
commandQueue1->destroy();

View File

@@ -361,6 +361,7 @@ HWTEST_F(FenceTest, givenPrintfKernelWhenSynchronizingFenceThenPrintPrintfOutput
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel;
TaskCountType currentTaskCount = 33u;
@@ -402,6 +403,7 @@ HWTEST_F(FenceTest, givenPrintfKernelAndDetectedHangWhenSynchronizingFenceThenPr
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel;
@@ -439,6 +441,7 @@ HWTEST_F(FenceTest, givenPrintfKernelNotCompletedWhenSynchronizingFenceWithZeroT
&desc,
false,
false,
false,
returnValue));
Mock<Kernel> kernel;
TaskCountType currentTaskCount = 33u;

View File

@@ -862,11 +862,19 @@ TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperUsingOverrideDebugKeyWhenGetting
DebugManager.flags.DispatchCmdlistCmdBufferPrimary.set(0);
EXPECT_FALSE(L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary());
EXPECT_FALSE(L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(true));
DebugManager.flags.DispatchCmdlistCmdBufferPrimary.set(1);
EXPECT_TRUE(L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary());
EXPECT_TRUE(L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(true));
}
TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperUsingOverrideDebugKeyWhenGettingDispatchCmdListCmdBufferPrimaryAndNotAllowPrimaryThenOverrideDbgKeyValueAndDisallow) {
DebugManagerStateRestore restorer;
DebugManager.flags.DispatchCmdlistCmdBufferPrimary.set(1);
EXPECT_FALSE(L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(false));
}
} // namespace ult

View File

@@ -140,7 +140,7 @@ HWTEST2_F(CommandListStatePrefetchXeHpcCore, givenForceMemoryPrefetchForKmdMigra
ze_command_list_handle_t commandListHandle = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle();
auto commandList = CommandList::fromHandle(commandListHandle);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
result = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, true);
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
@@ -392,7 +392,7 @@ HWTEST2_F(CommandListStatePrefetchXeHpcCore, givenAppendMemoryPrefetchForKmdMigr
ze_command_list_handle_t commandListHandle = CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)->toHandle();
auto commandList = CommandList::fromHandle(commandListHandle);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, returnValue);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, false, false, false, returnValue);
ze_event_pool_desc_t eventPoolDesc = {};
eventPoolDesc.count = 1;
@@ -463,7 +463,7 @@ HWTEST2_F(CommandListStatePrefetchXeHpcCore, givenAppendMemoryPrefetchForKmdMigr
ze_command_list_handle_t commandListHandle = CommandList::createImmediate(productFamily, device, &queueDesc, false, NEO::EngineGroupType::Copy, returnValue)->toHandle();
auto commandList = CommandList::fromHandle(commandListHandle);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, commandList->isCopyOnly(), false, returnValue);
auto commandQueue = CommandQueue::create(productFamily, device, neoDevice->getDefaultEngine().commandStreamReceiver, &queueDesc, commandList->isCopyOnly(), false, false, returnValue);
ze_event_pool_desc_t eventPoolDesc = {};
eventPoolDesc.count = 1;

View File

@@ -35,7 +35,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenCommandQueueWhenExecutingCommandListsT
csr.createGlobalFenceAllocation();
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, &csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
@@ -61,7 +61,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenCommandQueueWhenExecutingCommandListsT
auto csr = neoDevice->getDefaultEngine().commandStreamReceiver;
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
@@ -90,7 +90,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenCommandQueueWhenExecutingCommandListsF
auto csr = neoDevice->getDefaultEngine().commandStreamReceiver;
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, csr, &desc);
commandQueue->initialize(false, false);
commandQueue->initialize(false, false, false);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Compute, 0u, returnValue));
@@ -158,7 +158,9 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateThenSpl
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::Copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit.cmdQs.size(), 0u);
ASSERT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit.cmdQs.size(), 0u);
auto bcsInternalQueue = static_cast<L0::ult::CommandQueue *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit.cmdQs[0]);
EXPECT_TRUE(bcsInternalQueue->internalQueueForImmediateCommandList);
std::unique_ptr<L0::CommandList> commandList2(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::Copy, returnValue));
ASSERT_NE(nullptr, commandList2);

View File

@@ -31,7 +31,7 @@ XE_HPG_CORETEST_F(CommandQueueExecuteCommandListsXeHpgCore, WhenExecutingCmdList
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
@@ -75,7 +75,7 @@ XE_HPG_CORETEST_F(CommandQueueExecuteCommandListsXeHpgCore, WhenExecutingCmdList
ze_result_t returnValue;
auto commandQueue = whiteboxCast(CommandQueue::create(
productFamily,
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, returnValue));
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
ASSERT_NE(nullptr, commandQueue);
auto usedSpaceBefore = commandQueue->commandStream.getUsed();