fix: revert use dedciated cmd lists for bcs split

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2025-08-19 15:43:59 +00:00
committed by Compute-Runtime-Automation
parent a2f60af5c6
commit bc223b9052
12 changed files with 366 additions and 419 deletions

View File

@@ -228,11 +228,6 @@ struct CommandList : _ze_command_list_handle_t {
bool internalUsage, NEO::EngineGroupType engineGroupType,
ze_result_t &resultValue);
static CommandList *createImmediate(uint32_t productFamily, Device *device,
const ze_command_queue_desc_t *desc,
bool internalUsage, NEO::EngineGroupType engineGroupType, NEO::CommandStreamReceiver *csr,
ze_result_t &resultValue);
static CommandList *fromHandle(ze_command_list_handle_t handle) {
return static_cast<CommandList *>(handle);
}
@@ -487,8 +482,6 @@ struct CommandList : _ze_command_list_handle_t {
return totalNoopSpace;
}
void forceDisableInOrderWaits() { inOrderWaitsDisabled = true; }
ze_command_list_flags_t getCmdListFlags() const {
return flags;
}
@@ -602,7 +595,6 @@ struct CommandList : _ze_command_list_handle_t {
bool closedCmdList = false;
bool isWalkerWithProfilingEnqueued = false;
bool shouldRegisterEnqueuedWalkerWithProfiling = false;
bool inOrderWaitsDisabled = false;
};
using CommandListAllocatorFn = CommandList *(*)(uint32_t);

View File

@@ -235,7 +235,6 @@ struct CommandListCoreFamily : public CommandListImp {
bool isCbEventBoundToCmdList(Event *event) const;
bool kernelMemoryPrefetchEnabled() const override;
void assignInOrderExecInfoToEvent(Event *event);
bool hasInOrderDependencies() const;
protected:
MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyKernelWithGA(void *dstPtr, NEO::GraphicsAllocation *dstPtrAlloc,
@@ -399,6 +398,7 @@ struct CommandListCoreFamily : public CommandListImp {
bool handleInOrderImplicitDependencies(bool relaxedOrderingAllowed, bool dualStreamCopyOffloadOperation);
bool isQwordInOrderCounter() const { return GfxFamily::isQwordInOrderCounter; }
bool isInOrderNonWalkerSignalingRequired(const Event *event) const;
bool hasInOrderDependencies() const;
void appendFullSynchronizedDispatchInit();
void addPatchScratchAddressInImplicitArgs(CommandsToPatch &commandsToPatch, NEO::EncodeDispatchKernelArgs &args, const NEO::KernelDescriptor &kernelDescriptor, bool kernelNeedsImplicitArgs);
size_t addCmdForPatching(std::shared_ptr<NEO::InOrderExecInfo> *externalInOrderExecInfo, void *cmd1, void *cmd2, uint64_t counterValue, NEO::InOrderPatchCommandHelpers::PatchCmdType patchCmdType);

View File

@@ -651,7 +651,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopy(
ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams) {
memoryCopyParams.relaxedOrderingDispatch |= isRelaxedOrderingDispatchAllowed(numWaitEvents, isCopyOffloadEnabled());
memoryCopyParams.relaxedOrderingDispatch = isRelaxedOrderingDispatchAllowed(numWaitEvents, isCopyOffloadEnabled());
auto estimatedSize = commonImmediateCommandSize;
if (isCopyOnly(true)) {
@@ -683,8 +683,8 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopy(
memoryCopyParams.taskCountUpdateRequired = true;
hasStallindCmds = !memoryCopyParams.relaxedOrderingDispatch;
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, void *dstptrParam, const void *srcptrParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
return subCmdList->appendMemoryCopy(dstptrParam, srcptrParam, sizeParam, hSignalEventParam, 0u, nullptr, memoryCopyParams);
auto splitCall = [&](void *dstptrParam, const void *srcptrParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
return CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(dstptrParam, srcptrParam, sizeParam, hSignalEventParam, 0u, nullptr, memoryCopyParams);
};
ret = static_cast<DeviceImp *>(this->device)->bcsSplit->appendSplitCall<gfxCoreFamily, void *, const void *>(this, dstptr, srcptr, size, hSignalEvent, numWaitEvents, phWaitEvents, true, memoryCopyParams.relaxedOrderingDispatch, direction, splitCall);
@@ -711,7 +711,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopyRegio
ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams) {
memoryCopyParams.relaxedOrderingDispatch |= isRelaxedOrderingDispatchAllowed(numWaitEvents, isCopyOffloadEnabled());
memoryCopyParams.relaxedOrderingDispatch = isRelaxedOrderingDispatchAllowed(numWaitEvents, isCopyOffloadEnabled());
auto estimatedSize = commonImmediateCommandSize;
if (isCopyOnly(true)) {
@@ -735,7 +735,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopyRegio
memoryCopyParams.taskCountUpdateRequired = true;
hasStallindCmds = !memoryCopyParams.relaxedOrderingDispatch;
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, uint32_t dstOriginXParam, uint32_t srcOriginXParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
auto splitCall = [&](uint32_t dstOriginXParam, uint32_t srcOriginXParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
ze_copy_region_t dstRegionLocal = {};
ze_copy_region_t srcRegionLocal = {};
memcpy(&dstRegionLocal, dstRegion, sizeof(ze_copy_region_t));
@@ -744,9 +744,9 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopyRegio
dstRegionLocal.width = static_cast<uint32_t>(sizeParam);
srcRegionLocal.originX = srcOriginXParam;
srcRegionLocal.width = static_cast<uint32_t>(sizeParam);
return subCmdList->appendMemoryCopyRegion(dstPtr, &dstRegionLocal, dstPitch, dstSlicePitch,
srcPtr, &srcRegionLocal, srcPitch, srcSlicePitch,
hSignalEventParam, 0u, nullptr, memoryCopyParams);
return CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyRegion(dstPtr, &dstRegionLocal, dstPitch, dstSlicePitch,
srcPtr, &srcRegionLocal, srcPitch, srcSlicePitch,
hSignalEventParam, 0u, nullptr, memoryCopyParams);
};
ret = static_cast<DeviceImp *>(this->device)->bcsSplit->appendSplitCall<gfxCoreFamily, uint32_t, uint32_t>(this, dstRegion->originX, srcRegion->originX, dstRegion->width, hSignalEvent, numWaitEvents, phWaitEvents, true, memoryCopyParams.relaxedOrderingDispatch, direction, splitCall);
@@ -815,11 +815,11 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendPageFaultCopy(N
uintptr_t dstAddress = static_cast<uintptr_t>(dstAllocation->getGpuAddress());
uintptr_t srcAddress = static_cast<uintptr_t>(srcAllocation->getGpuAddress());
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, uintptr_t dstAddressParam, uintptr_t srcAddressParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
subCmdList->appendMemoryCopyBlit(dstAddressParam, dstAllocation, 0u,
srcAddressParam, srcAllocation, 0u,
sizeParam, nullptr);
return subCmdList->appendSignalEvent(hSignalEventParam, false);
auto splitCall = [&](uintptr_t dstAddressParam, uintptr_t srcAddressParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
this->appendMemoryCopyBlit(dstAddressParam, dstAllocation, 0u,
srcAddressParam, srcAllocation, 0u,
sizeParam, nullptr);
return CommandListCoreFamily<gfxCoreFamily>::appendSignalEvent(hSignalEventParam, false);
};
ret = static_cast<DeviceImp *>(this->device)->bcsSplit->appendSplitCall<gfxCoreFamily, uintptr_t, uintptr_t>(this, dstAddress, srcAddress, size, nullptr, 0u, nullptr, false, relaxedOrdering, direction, splitCall);
@@ -1158,7 +1158,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::hostSynchronize(uint6
auto tempAllocsCleanupRequired = handlePostWaitOperations && (mainStorageCleanupNeeded || copyOffloadStorageCleanupNeeded);
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !this->inOrderWaitsDisabled && !tempAllocsCleanupRequired && this->latestFlushIsHostVisible && (this->heaplessModeEnabled || !this->latestOperationHasOptimizedCbEvent));
bool inOrderWaitAllowed = (isInOrderExecutionEnabled() && !tempAllocsCleanupRequired && this->latestFlushIsHostVisible && (this->heaplessModeEnabled || !this->latestOperationHasOptimizedCbEvent));
uint64_t inOrderSyncValue = this->inOrderExecInfo.get() ? inOrderExecInfo->getCounterValue() : 0;

View File

@@ -153,13 +153,6 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
const ze_command_queue_desc_t *desc,
bool internalUsage, NEO::EngineGroupType engineGroupType,
ze_result_t &returnValue) {
return createImmediate(productFamily, device, desc, internalUsage, engineGroupType, nullptr, returnValue);
}
CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device,
const ze_command_queue_desc_t *desc,
bool internalUsage, NEO::EngineGroupType engineGroupType, NEO::CommandStreamReceiver *csr,
ze_result_t &returnValue) {
ze_command_queue_desc_t cmdQdesc = *desc;
@@ -175,17 +168,13 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
CommandListImp *commandList = nullptr;
returnValue = ZE_RESULT_ERROR_UNINITIALIZED;
if (!allocator) {
return nullptr;
}
auto queueProperties = CommandQueue::extractQueueProperties(cmdQdesc);
auto deviceImp = static_cast<DeviceImp *>(device);
const auto &hwInfo = device->getHwInfo();
auto &gfxCoreHelper = device->getGfxCoreHelper();
if (!csr) {
if (allocator) {
NEO::CommandStreamReceiver *csr = nullptr;
auto deviceImp = static_cast<DeviceImp *>(device);
const auto &hwInfo = device->getHwInfo();
auto &gfxCoreHelper = device->getGfxCoreHelper();
if (internalUsage) {
if (NEO::EngineHelper::isCopyOnlyEngineType(engineGroupType) && deviceImp->getActiveDevice()->getInternalCopyEngine()) {
csr = deviceImp->getActiveDevice()->getInternalCopyEngine()->commandStreamReceiver;
@@ -200,73 +189,73 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
return commandList;
}
}
}
LOG_CRITICAL_FOR_CORE(unlikely(csr == nullptr), "Error during creation of immediate command queue. Unable to create CSR object. Aborting!!");
LOG_CRITICAL_FOR_CORE(unlikely(csr == nullptr), "Error during creation of immediate command queue. Unable to create CSR object. Aborting!!");
UNRECOVERABLE_IF(nullptr == csr);
UNRECOVERABLE_IF(nullptr == csr);
commandList = static_cast<CommandListImp *>((*allocator)(CommandList::commandListimmediateIddsPerBlock));
commandList->internalUsage = internalUsage;
commandList->cmdListType = CommandListType::typeImmediate;
commandList->isSyncModeQueue = (cmdQdesc.mode == ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS);
if (NEO::debugManager.flags.MakeEachEnqueueBlocking.get()) {
commandList->isSyncModeQueue |= true;
}
auto &productHelper = device->getProductHelper();
if (!internalUsage) {
auto &rootDeviceEnvironment = device->getNEODevice()->getRootDeviceEnvironment();
bool enabledCmdListSharing = !NEO::EngineHelper::isCopyOnlyEngineType(engineGroupType);
commandList->immediateCmdListHeapSharing = L0GfxCoreHelper::enableImmediateCmdListHeapSharing(rootDeviceEnvironment, enabledCmdListSharing);
}
csr->initializeResources(false, device->getDevicePreemptionMode());
csr->initDirectSubmission();
auto commandQueue = CommandQueue::create(productFamily, device, csr, &cmdQdesc, NEO::EngineHelper::isCopyOnlyEngineType(engineGroupType), internalUsage, true, returnValue);
if (!commandQueue) {
commandList->destroy();
commandList = nullptr;
return commandList;
}
commandList->cmdQImmediate = commandQueue;
returnValue = commandList->initialize(device, engineGroupType, 0);
if ((cmdQdesc.flags & ZE_COMMAND_QUEUE_FLAG_IN_ORDER) || (NEO::debugManager.flags.ForceInOrderImmediateCmdListExecution.get() == 1)) {
commandList->enableInOrderExecution();
commandList->flags |= ZE_COMMAND_LIST_FLAG_IN_ORDER;
}
if (queueProperties.synchronizedDispatchMode != NEO::SynchronizedDispatchMode::disabled) {
if (commandList->isInOrderExecutionEnabled()) {
commandList->enableSynchronizedDispatch(queueProperties.synchronizedDispatchMode);
} else {
returnValue = ZE_RESULT_ERROR_INVALID_ARGUMENT;
commandList = static_cast<CommandListImp *>((*allocator)(CommandList::commandListimmediateIddsPerBlock));
commandList->internalUsage = internalUsage;
commandList->cmdListType = CommandListType::typeImmediate;
commandList->isSyncModeQueue = (cmdQdesc.mode == ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS);
if (NEO::debugManager.flags.MakeEachEnqueueBlocking.get()) {
commandList->isSyncModeQueue |= true;
}
}
if (returnValue != ZE_RESULT_SUCCESS) {
commandList->destroy();
commandList = nullptr;
return commandList;
}
auto &productHelper = device->getProductHelper();
commandList->isTbxMode = csr->isTbxMode();
commandList->commandListPreemptionMode = device->getDevicePreemptionMode();
if (!internalUsage) {
auto &rootDeviceEnvironment = device->getNEODevice()->getRootDeviceEnvironment();
bool enabledCmdListSharing = !NEO::EngineHelper::isCopyOnlyEngineType(engineGroupType);
commandList->immediateCmdListHeapSharing = L0GfxCoreHelper::enableImmediateCmdListHeapSharing(rootDeviceEnvironment, enabledCmdListSharing);
}
csr->initializeResources(false, device->getDevicePreemptionMode());
csr->initDirectSubmission();
if (!internalUsage) {
commandList->isBcsSplitNeeded = deviceImp->bcsSplit->setupDevice(csr);
}
auto commandQueue = CommandQueue::create(productFamily, device, csr, &cmdQdesc, NEO::EngineHelper::isCopyOnlyEngineType(engineGroupType), internalUsage, true, returnValue);
if (!commandQueue) {
commandList->destroy();
commandList = nullptr;
return commandList;
}
commandList->copyThroughLockedPtrEnabled = gfxCoreHelper.copyThroughLockedPtrEnabled(hwInfo, productHelper);
commandList->cmdQImmediate = commandQueue;
const bool cmdListSupportsCopyOffload = commandList->isInOrderExecutionEnabled() && !productHelper.isDcFlushAllowed();
returnValue = commandList->initialize(device, engineGroupType, 0);
if ((NEO::debugManager.flags.ForceCopyOperationOffloadForComputeCmdList.get() == 1 || queueProperties.copyOffloadHint) && cmdListSupportsCopyOffload) {
commandList->enableCopyOperationOffload();
if ((cmdQdesc.flags & ZE_COMMAND_QUEUE_FLAG_IN_ORDER) || (NEO::debugManager.flags.ForceInOrderImmediateCmdListExecution.get() == 1)) {
commandList->enableInOrderExecution();
commandList->flags |= ZE_COMMAND_LIST_FLAG_IN_ORDER;
}
if (queueProperties.synchronizedDispatchMode != NEO::SynchronizedDispatchMode::disabled) {
if (commandList->isInOrderExecutionEnabled()) {
commandList->enableSynchronizedDispatch(queueProperties.synchronizedDispatchMode);
} else {
returnValue = ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
}
if (returnValue != ZE_RESULT_SUCCESS) {
commandList->destroy();
commandList = nullptr;
return commandList;
}
commandList->isTbxMode = csr->isTbxMode();
commandList->commandListPreemptionMode = device->getDevicePreemptionMode();
if (!internalUsage) {
commandList->isBcsSplitNeeded = deviceImp->bcsSplit->setupDevice(csr);
}
commandList->copyThroughLockedPtrEnabled = gfxCoreHelper.copyThroughLockedPtrEnabled(hwInfo, productHelper);
const bool cmdListSupportsCopyOffload = commandList->isInOrderExecutionEnabled() && !productHelper.isDcFlushAllowed();
if ((NEO::debugManager.flags.ForceCopyOperationOffloadForComputeCmdList.get() == 1 || queueProperties.copyOffloadHint) && cmdListSupportsCopyOffload) {
commandList->enableCopyOperationOffload();
}
}
return commandList;

View File

@@ -51,7 +51,6 @@ struct CommandListImp : public CommandList {
void enableCopyOperationOffload();
void setInterruptEventsCsr(NEO::CommandStreamReceiver &csr);
virtual bool kernelMemoryPrefetchEnabled() const = 0;
std::shared_ptr<NEO::InOrderExecInfo> &getInOrderExecInfo() { return inOrderExecInfo; }
size_t getInOrderExecDeviceRequiredSize() const;
uint64_t getInOrderExecDeviceGpuAddress() const;
size_t getInOrderExecHostRequiredSize() const;

View File

@@ -42,7 +42,7 @@ bool BcsSplit::setupDevice(NEO::CommandStreamReceiver *csr) {
this->clientCount++;
if (!this->cmdLists.empty()) {
if (!this->cmdQs.empty()) {
return true;
}
@@ -82,27 +82,24 @@ bool BcsSplit::setupQueues(const NEO::BcsSplitSettings &settings) {
return false;
}
ze_command_queue_flags_t flags = events.aggregatedEventsMode ? static_cast<ze_command_queue_flags_t>(ZE_COMMAND_QUEUE_FLAG_IN_ORDER) : 0u;
const ze_command_queue_desc_t splitDesc = {.stype = ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, .flags = flags, .mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS};
const ze_command_queue_desc_t splitDesc = {.stype = ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, .mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS};
auto productFamily = this->device.getHwInfo().platform.eProductFamily;
for (const auto &csr : csrs) {
ze_result_t result;
auto cmdList = CommandList::createImmediate(productFamily, &device, &splitDesc, true, NEO::EngineHelpers::engineTypeToEngineGroupType(csr->getOsContext().getEngineType()), csr, result);
auto commandQueue = CommandQueue::create(productFamily, &device, csr, &splitDesc, true, false, true, result);
UNRECOVERABLE_IF(result != ZE_RESULT_SUCCESS);
cmdList->forceDisableInOrderWaits();
this->cmdLists.push_back(cmdList);
this->cmdQs.push_back(commandQueue);
auto engineType = csr->getOsContext().getEngineType();
auto bcsId = NEO::EngineHelpers::getBcsIndex(engineType);
if (settings.h2dEngines.test(bcsId)) {
this->h2dCmdLists.push_back(cmdList);
this->h2dCmdQs.push_back(commandQueue);
}
if (settings.d2hEngines.test(bcsId)) {
this->d2hCmdLists.push_back(cmdList);
this->d2hCmdQs.push_back(commandQueue);
}
}
@@ -130,24 +127,24 @@ void BcsSplit::releaseResources() {
this->clientCount--;
if (this->clientCount == 0u) {
for (auto cmdList : cmdLists) {
cmdList->destroy();
for (auto cmdQ : cmdQs) {
cmdQ->destroy();
}
cmdLists.clear();
d2hCmdLists.clear();
h2dCmdLists.clear();
cmdQs.clear();
d2hCmdQs.clear();
h2dCmdQs.clear();
this->events.releaseResources();
}
}
std::vector<CommandList *> &BcsSplit::getCmdListsForSplit(NEO::TransferDirection direction) {
std::vector<CommandQueue *> &BcsSplit::getCmdQsForSplit(NEO::TransferDirection direction) {
if (direction == NEO::TransferDirection::hostToLocal) {
return this->h2dCmdLists;
return this->h2dCmdQs;
} else if (direction == NEO::TransferDirection::localToHost) {
return this->d2hCmdLists;
return this->d2hCmdQs;
}
return this->cmdLists;
return this->cmdQs;
}
size_t BcsSplit::Events::obtainAggregatedEventsForSplit(Context *context) {
@@ -215,7 +212,7 @@ size_t BcsSplit::Events::createAggregatedEvent(Context *context) {
zex_counter_based_event_external_storage_properties_t externalStorageAllocProperties = {.stype = ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES,
.incrementValue = 1,
.completionValue = static_cast<uint64_t>(bcsSplit.cmdLists.size())};
.completionValue = static_cast<uint64_t>(bcsSplit.cmdQs.size())};
const zex_counter_based_event_desc_t counterBasedDesc = {.stype = ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC,
.pNext = &externalStorageAllocProperties,
@@ -272,7 +269,7 @@ std::optional<size_t> BcsSplit::Events::createFromPool(Context *context, size_t
* - 1 event to handle barrier (vector of barrier events).
*/
const size_t neededEvents = this->bcsSplit.cmdLists.size() + 2;
const size_t neededEvents = this->bcsSplit.cmdQs.size() + 2;
if (!allocatePool(context, maxEventCountInPool, neededEvents)) {
return std::nullopt;
@@ -314,8 +311,8 @@ std::optional<size_t> BcsSplit::Events::createFromPool(Context *context, size_t
void BcsSplit::Events::resetEventPackage(size_t index) {
this->marker[index]->reset();
this->barrier[index]->reset();
for (size_t j = 0; j < this->bcsSplit.cmdLists.size(); j++) {
this->subcopy[index * this->bcsSplit.cmdLists.size() + j]->reset();
for (size_t j = 0; j < this->bcsSplit.cmdQs.size(); j++) {
this->subcopy[index * this->bcsSplit.cmdQs.size() + j]->reset();
}
}

View File

@@ -61,9 +61,9 @@ struct BcsSplit {
Events(BcsSplit &bcsSplit) : bcsSplit(bcsSplit) {}
} events;
std::vector<CommandList *> cmdLists;
std::vector<CommandList *> h2dCmdLists;
std::vector<CommandList *> d2hCmdLists;
std::vector<CommandQueue *> cmdQs;
std::vector<CommandQueue *> h2dCmdQs;
std::vector<CommandQueue *> d2hCmdQs;
template <GFXCORE_FAMILY gfxCoreFamily, typename T, typename K>
ze_result_t appendSplitCall(CommandListCoreFamilyImmediate<gfxCoreFamily> *cmdList,
@@ -76,8 +76,9 @@ struct BcsSplit {
bool performMigration,
bool hasRelaxedOrderingDependencies,
NEO::TransferDirection direction,
std::function<ze_result_t(CommandListCoreFamilyImmediate<gfxCoreFamily> *, T, K, size_t, ze_event_handle_t)> appendCall) {
std::function<ze_result_t(T, K, size_t, ze_event_handle_t)> appendCall) {
ze_result_t result = ZE_RESULT_SUCCESS;
const bool hasStallingCmds = !hasRelaxedOrderingDependencies;
auto markerEventIndexRet = this->events.obtainForSplit(Context::fromHandle(cmdList->getCmdListContext()), MemoryConstants::pageSize64k / sizeof(typename CommandListCoreFamilyImmediate<gfxCoreFamily>::GfxFamily::TimestampPacketType));
if (!markerEventIndexRet.has_value()) {
@@ -91,10 +92,10 @@ struct BcsSplit {
cmdList->appendSignalEvent(this->events.barrier[markerEventIndex]->toHandle(), false);
}
auto subcopyEventIndex = markerEventIndex * this->cmdLists.size();
StackVec<ze_event_handle_t, 16> eventHandles;
auto subcopyEventIndex = markerEventIndex * this->cmdQs.size();
StackVec<ze_event_handle_t, 4> eventHandles;
auto &cmdListsForSplit = this->getCmdListsForSplit(direction);
auto &cmdQsForSplit = this->getCmdQsForSplit(direction);
auto signalEvent = Event::fromHandle(hSignalEvent);
@@ -105,23 +106,17 @@ struct BcsSplit {
const auto aggregatedEventsMode = this->events.aggregatedEventsMode;
auto totalSize = size;
auto engineCount = cmdListsForSplit.size();
for (size_t i = 0; i < cmdListsForSplit.size(); i++) {
auto subCmdList = static_cast<CommandListCoreFamilyImmediate<gfxCoreFamily> *>(cmdListsForSplit[i]);
auto engineCount = cmdQsForSplit.size();
for (size_t i = 0; i < cmdQsForSplit.size(); i++) {
if (barrierRequired) {
auto barrierEventHandle = this->events.barrier[markerEventIndex]->toHandle();
subCmdList->addEventsToCmdList(1u, &barrierEventHandle, nullptr, hasRelaxedOrderingDependencies, false, true, false, false);
cmdList->addEventsToCmdList(1u, &barrierEventHandle, nullptr, hasRelaxedOrderingDependencies, false, true, false, false);
}
if (cmdList->hasInOrderDependencies()) {
auto &inOrderExecInfo = cmdList->getInOrderExecInfo();
subCmdList->appendWaitOnInOrderDependency(inOrderExecInfo, nullptr, inOrderExecInfo->getCounterValue(), inOrderExecInfo->getAllocationOffset(), hasRelaxedOrderingDependencies, false, false, false, false);
}
subCmdList->addEventsToCmdList(numWaitEvents, phWaitEvents, nullptr, hasRelaxedOrderingDependencies, false, false, false, false);
cmdList->addEventsToCmdList(numWaitEvents, phWaitEvents, nullptr, hasRelaxedOrderingDependencies, false, true, false, false);
if (signalEvent && i == 0u) {
subCmdList->appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, true, false, true);
cmdList->appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, true, false, true);
}
auto localSize = totalSize / engineCount;
@@ -130,7 +125,9 @@ struct BcsSplit {
auto copyEventIndex = aggregatedEventsMode ? markerEventIndex : subcopyEventIndex + i;
auto eventHandle = this->events.subcopy[copyEventIndex]->toHandle();
result = appendCall(subCmdList, localDstPtr, localSrcPtr, localSize, eventHandle);
result = appendCall(localDstPtr, localSrcPtr, localSize, eventHandle);
cmdList->executeCommandListImmediateWithFlushTaskImpl(performMigration, hasStallingCmds, hasRelaxedOrderingDependencies, NEO::AppendOperations::nonKernel, true, cmdQsForSplit[i], nullptr, nullptr);
if ((aggregatedEventsMode && i == 0) || !aggregatedEventsMode) {
eventHandles.push_back(eventHandle);
@@ -140,7 +137,7 @@ struct BcsSplit {
engineCount--;
if (signalEvent) {
signalEvent->appendAdditionalCsr(subCmdList->getCsr(false));
signalEvent->appendAdditionalCsr(static_cast<CommandQueueImp *>(cmdQsForSplit[i])->getCsr());
}
}
@@ -167,7 +164,7 @@ struct BcsSplit {
bool setupDevice(NEO::CommandStreamReceiver *csr);
void releaseResources();
std::vector<CommandList *> &getCmdListsForSplit(NEO::TransferDirection direction);
std::vector<CommandQueue *> &getCmdQsForSplit(NEO::TransferDirection direction);
void setupEnginesMask(NEO::BcsSplitSettings &settings);
bool setupQueues(const NEO::BcsSplitSettings &settings);

View File

@@ -1100,7 +1100,7 @@ HWTEST2_F(AggregatedBcsSplitTests, givenLimitedEnginesCountWhenCreatingBcsSplitT
bcsSplit.setupDevice(cmdList->getCsr(false));
EXPECT_EQ(expectedEnginesCount, bcsSplit.cmdLists.size());
EXPECT_EQ(expectedEnginesCount, bcsSplit.cmdQs.size());
bcsSplit.releaseResources();
}
@@ -1141,7 +1141,7 @@ HWTEST2_F(AggregatedBcsSplitTests, whenObtainCalledThenAggregatedEventsCreated,
EXPECT_FALSE(bcsSplit->events.subcopy[i]->isSignalScope(ZE_EVENT_SCOPE_FLAG_HOST));
EXPECT_TRUE(bcsSplit->events.subcopy[i]->isSignalScope(ZE_EVENT_SCOPE_FLAG_DEVICE));
EXPECT_EQ(1u, bcsSplit->events.subcopy[i]->getInOrderIncrementValue());
EXPECT_EQ(static_cast<uint64_t>(bcsSplit->cmdLists.size()), bcsSplit->events.subcopy[i]->getInOrderExecBaseSignalValue());
EXPECT_EQ(static_cast<uint64_t>(bcsSplit->cmdQs.size()), bcsSplit->events.subcopy[i]->getInOrderExecBaseSignalValue());
EXPECT_EQ(nullptr, bcsSplit->events.marker[i]->getInOrderExecInfo());
EXPECT_TRUE(bcsSplit->events.marker[i]->isCounterBased());
@@ -1186,7 +1186,7 @@ HWTEST2_F(AggregatedBcsSplitTests, whenObtainCalledThenAggregatedEventsCreated,
for (auto &event : bcsSplit->events.subcopy) {
EXPECT_TRUE(event->isCounterBased());
EXPECT_EQ(1u, event->getInOrderIncrementValue());
EXPECT_EQ(static_cast<uint64_t>(bcsSplit->cmdLists.size()), event->getInOrderExecSignalValueWithSubmissionCounter());
EXPECT_EQ(static_cast<uint64_t>(bcsSplit->cmdQs.size()), event->getInOrderExecSignalValueWithSubmissionCounter());
}
}
@@ -1285,7 +1285,7 @@ struct MultiTileAggregatedBcsSplitTests : public AggregatedBcsSplitTests {
};
HWTEST2_F(MultiTileAggregatedBcsSplitTests, givenMuliTileBcsSplitWhenSetupingThenCreateCorrectQueues, IsAtLeastXeHpcCore) {
ASSERT_EQ(expectedEnginesCount, bcsSplit->cmdLists.size());
ASSERT_EQ(expectedEnginesCount, bcsSplit->cmdQs.size());
auto perTileEngineCount = expectedEnginesCount / expectedTileCount;
@@ -1295,7 +1295,7 @@ HWTEST2_F(MultiTileAggregatedBcsSplitTests, givenMuliTileBcsSplitWhenSetupingThe
auto expectedEngineType = static_cast<aub_stream::EngineType>(aub_stream::EngineType::ENGINE_BCS1 + baseEngineId);
auto &osContext = static_cast<CommandListImp *>(bcsSplit->cmdLists[engineId])->getCsr(false)->getOsContext();
auto &osContext = static_cast<CommandQueueImp *>(bcsSplit->cmdQs[engineId])->getCsr()->getOsContext();
EXPECT_EQ(expectedEngineType, osContext.getEngineType());
EXPECT_EQ(1u << tileId, osContext.getDeviceBitfield().to_ulong());
}
@@ -1306,10 +1306,10 @@ HWTEST2_F(MultiTileAggregatedBcsSplitTests, givenIncorrectNumberOfTilesWhenCreat
debugManager.flags.SplitBcsRequiredTileCount.set(expectedTileCount + 1);
cmdList.reset();
bcsSplit->releaseResources();
EXPECT_EQ(0u, bcsSplit->cmdLists.size());
EXPECT_EQ(0u, bcsSplit->cmdQs.size());
cmdList = createCmdList();
EXPECT_EQ(0u, bcsSplit->cmdLists.size());
EXPECT_EQ(0u, bcsSplit->cmdQs.size());
}
} // namespace ult

View File

@@ -4028,7 +4028,7 @@ struct BcsSplitInOrderCmdListTests : public InOrderCmdListFixture {
auto bcsSplit = static_cast<DeviceImp *>(device)->bcsSplit.get();
for (uint32_t i = 0; i < numLinkCopyEngines; i++) {
if (static_cast<WhiteBox<CommandList> *>(bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount() != expectedTaskCount) {
if (static_cast<CommandQueueImp *>(bcsSplit->cmdQs[0])->getTaskCount() != expectedTaskCount) {
return false;
}
}
@@ -4048,7 +4048,7 @@ struct BcsSplitInOrderCmdListTests : public InOrderCmdListFixture {
}
template <typename FamilyType, GFXCORE_FAMILY gfxCoreFamily>
void verifySplitCmds(LinearStream &cmdStream, size_t streamOffset, size_t subCopyOffset, L0::Device *device, uint64_t submissionId, WhiteBox<L0::CommandListCoreFamilyImmediate<FamilyType::gfxCoreFamily>> &immCmdList,
void verifySplitCmds(LinearStream &cmdStream, size_t streamOffset, L0::Device *device, uint64_t submissionId, WhiteBox<L0::CommandListCoreFamilyImmediate<FamilyType::gfxCoreFamily>> &immCmdList,
uint64_t externalDependencyGpuVa);
std::unique_ptr<VariableBackup<HardwareInfo>> hwInfoBackup;
@@ -4056,7 +4056,7 @@ struct BcsSplitInOrderCmdListTests : public InOrderCmdListFixture {
};
template <typename FamilyType, GFXCORE_FAMILY gfxCoreFamily>
void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_t streamOffset, size_t subCopyOffset, L0::Device *device, uint64_t submissionId,
void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_t streamOffset, L0::Device *device, uint64_t submissionId,
WhiteBox<L0::CommandListCoreFamilyImmediate<FamilyType::gfxCoreFamily>> &immCmdList, uint64_t externalDependencyGpuVa) {
using XY_COPY_BLT = typename std::remove_const<decltype(FamilyType::cmdInitXyCopyBlt)>::type;
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
@@ -4070,15 +4070,16 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
auto counterGpuAddress = inOrderExecInfo->getBaseDeviceAddress();
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(cmdStream.getCpuBase(), streamOffset), (cmdStream.getUsed() - streamOffset)));
auto itor = cmdList.begin();
bool aggregatedEventSplit = bcsSplit->events.aggregatedEventsMode;
for (uint32_t i = 0; i < numLinkCopyEngines; i++) {
auto subCmdStream = bcsSplit->cmdLists[i]->getCmdContainer().getCommandStream();
auto beginItor = itor;
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(subCmdStream->getCpuBase(), subCopyOffset), (subCmdStream->getUsed() - subCopyOffset)));
auto itor = cmdList.begin();
auto engineOffset = aggregatedEventSplit ? submissionId : (submissionId * numLinkCopyEngines);
uint64_t signalSubCopyEventGpuVa = 0;
@@ -4154,14 +4155,10 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
ASSERT_TRUE(false);
}
auto semaphoreCmds = findAll<MI_SEMAPHORE_WAIT *>(cmdList.begin(), itor);
auto semaphoreCmds = findAll<MI_SEMAPHORE_WAIT *>(beginItor, itor);
EXPECT_EQ(numExpectedSemaphores, semaphoreCmds.size());
}
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(cmdStream.getCpuBase(), streamOffset), (cmdStream.getUsed() - streamOffset)));
auto itor = cmdList.begin();
auto semaphoreItor = find<MI_SEMAPHORE_WAIT *>(itor, cmdList.end());
if (submissionId > 0) {
@@ -4308,12 +4305,11 @@ HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCo
immCmdList->getCsr(false)->getNextBarrierCount();
size_t offset = cmdStream->getUsed();
size_t subCopyOffset = static_cast<DeviceImp *>(device)->bcsSplit->cmdLists[0]->getCmdContainer().getCommandStream()->getUsed();
immCmdList->appendMemoryCopy(&copyData, &copyData, copySize, nullptr, 0, nullptr, copyParams);
// no implicit dependencies
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, subCopyOffset, device, 0, *immCmdList, 0);
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, device, 0, *immCmdList, 0);
}
HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCopyAfterBarrierWithImplicitDependenciesThenHandleCorrectInOrderSignaling, IsAtLeastXeHpcCore) {
@@ -4333,7 +4329,6 @@ HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCo
immCmdList->appendMemoryCopy(&copyData, &copyData, copySize, nullptr, 0, nullptr, copyParams);
size_t offset = cmdStream->getUsed();
size_t subCopyOffset = static_cast<DeviceImp *>(device)->bcsSplit->cmdLists[0]->getCmdContainer().getCommandStream()->getUsed();
*immCmdList->getCsr(false)->getBarrierCountTagAddress() = 0u;
immCmdList->getCsr(false)->getNextBarrierCount();
@@ -4341,7 +4336,7 @@ HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCo
immCmdList->appendMemoryCopy(&copyData, &copyData, copySize, nullptr, 0, nullptr, copyParams);
// implicit dependencies
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, subCopyOffset, device, 1, *immCmdList, 0);
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, device, 1, *immCmdList, 0);
}
HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCopyWithEventDependencyThenRequiredSemaphores, IsAtLeastXeHpcCore) {
@@ -4362,13 +4357,12 @@ HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenAppendingMemoryCo
immCmdList->appendMemoryCopy(&copyData, &copyData, copySize, nullptr, 0, nullptr, copyParams);
size_t offset = cmdStream->getUsed();
size_t subCopyOffset = static_cast<DeviceImp *>(device)->bcsSplit->cmdLists[0]->getCmdContainer().getCommandStream()->getUsed();
*immCmdList->inOrderExecInfo->getBaseHostAddress() = 0;
immCmdList->appendMemoryCopy(&copyData, &copyData, copySize, nullptr, 1, &eventHandle, copyParams);
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, subCopyOffset, device, 1, *immCmdList, events[0]->getCompletionFieldGpuAddress(device));
verifySplitCmds<FamilyType, FamilyType::gfxCoreFamily>(*cmdStream, offset, device, 1, *immCmdList, events[0]->getCompletionFieldGpuAddress(device));
}
HWTEST2_F(BcsSplitInOrderCmdListTests, givenBcsSplitEnabledWhenDispatchingCopyRegionThenHandleInOrderSignaling, IsAtLeastXeHpcCore) {

View File

@@ -353,19 +353,19 @@ 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);
ASSERT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
ASSERT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
std::unique_ptr<L0::CommandList> commandList2(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList2);
EXPECT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
commandList->destroy();
commandList.release();
EXPECT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_NE(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
commandList2->destroy();
commandList2.release();
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenNotAllBlittersAvailableWhenCreateImmediateThenSplitCmdQAreNotCreated, IsXeHpcCore) {
@@ -384,11 +384,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenNotAllBlittersAvailableWhenCreateImmed
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
commandList->destroy();
commandList.release();
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenNotAllBlittersAvailableAndSplitBcsMaskSetWhenCreateImmediateThenSplitCmdQAreCreated, IsXeHpcCore) {
@@ -409,11 +409,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenNotAllBlittersAvailableAndSplitBcsMask
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 2u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 2u);
commandList->destroy();
commandList.release();
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndSplitBcsMaskWhenCreateImmediateThenGivenCountOfSplitCmdQAreCreated, IsXeHpcCore) {
@@ -434,7 +434,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndSplitBcsMaskWhenCreateI
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 3u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 3u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateThenInitializeCmdQsOnce, IsXeHpcCore) {
@@ -455,13 +455,13 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateThenIni
debugManager.flags.SplitBcsRequiredEnginesCount.set(3);
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 3u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 3u);
debugManager.flags.SplitBcsMask.set(0b110);
debugManager.flags.SplitBcsRequiredEnginesCount.set(2);
std::unique_ptr<L0::CommandList> commandList2(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList2);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 3u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 3u);
commandList->destroy();
commandList.release();
@@ -485,7 +485,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateInterna
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, true, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateLinkedThenSplitCmdQAreNotCreated, IsXeHpcCore) {
@@ -504,7 +504,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyWhenCreateImmediateLinkedT
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopySetZeroWhenCreateImmediateThenSplitCmdQAreNotCreated, IsXeHpcCore) {
@@ -523,7 +523,7 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopySetZeroWhenCreateImmediate
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, testL0Device.get(), &cmdQueueDesc, false, NEO::EngineGroupType::copy, returnValue));
ASSERT_NE(nullptr, commandList);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 0u);
}
HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhenAppendingMemoryCopyWithSizeLessThanFourMBThenDoNotSplit, IsXeHpcCore) {
@@ -547,11 +547,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 4 * MemoryConstants::megaByte - 1;
@@ -566,10 +566,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -596,11 +596,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -613,10 +613,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -644,11 +644,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyHostptrDisabledAndImmediat
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -659,10 +659,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyHostptrDisabledAndImmediat
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
context->freeMem(dstPtr);
}
@@ -689,11 +689,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyHostptrDisabledAndImmediat
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -704,10 +704,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyHostptrDisabledAndImmediat
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
context->freeMem(srcPtr);
}
@@ -733,11 +733,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -748,10 +748,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(dstPtr);
}
@@ -777,11 +777,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -792,10 +792,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(srcPtr);
}
@@ -821,11 +821,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -841,10 +841,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -873,11 +873,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
ASSERT_NE(nullptr, commandList0);
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -896,14 +896,14 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getCsr()->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getCsr()->peekTaskCount(), 1u);
EXPECT_FALSE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies);
context->freeMem(srcPtr);
@@ -935,11 +935,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
ASSERT_NE(nullptr, commandList0);
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -956,51 +956,43 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
int client;
ultCsr->registerClient(&client);
auto cmdStream0 = commandList0->getCmdContainer().getCommandStream();
auto offset0 = cmdStream0->getUsed();
auto cmdList2 = static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2]);
auto cmdStream2 = cmdList2->getCmdContainer().getCommandStream();
auto offset2 = cmdStream2->getUsed();
auto cmdList3 = static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3]);
auto cmdStream3 = cmdList3->getCmdContainer().getCommandStream();
auto offset3 = cmdStream3->getUsed();
auto cmdStream = commandList0->getCmdContainer().getCommandStream();
auto offset = cmdStream->getUsed();
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
auto csr0 = commandList0->getCsr(false);
auto csr2 = cmdList2->getCsr(false);
auto csr3 = cmdList3->getCsr(false);
auto csr2 = static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getCsr();
auto csr3 = static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getCsr();
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(csr2->peekTaskCount(), 1u);
EXPECT_EQ(csr3->peekTaskCount(), 1u);
GenCmdList genCmdList0;
GenCmdList genCmdList2;
GenCmdList genCmdList3;
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(cmdStream->getCpuBase(), offset), (cmdStream->getUsed() - offset)));
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(genCmdList0, ptrOffset(cmdStream0->getCpuBase(), offset0), (cmdStream0->getUsed() - offset0)));
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(genCmdList2, ptrOffset(cmdStream2->getCpuBase(), offset2), (cmdStream2->getUsed() - offset2)));
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(genCmdList3, ptrOffset(cmdStream3->getCpuBase(), offset3), (cmdStream3->getUsed() - offset3)));
bool csr0TaskCountFound = false;
bool csr2TaskCountFound = false;
bool csr3TaskCountFound = false;
auto findTagUpdate = [&](GenCmdList &genCmdList, CommandStreamReceiver *csr) {
auto found = std::find_if(genCmdList.cbegin(), genCmdList.cend(), [&](void *cmd) {
if (auto cmdHw = genCmdCast<MI_FLUSH_DW *>(cmd)) {
return cmdHw->getDestinationAddress() == csr->getTagAllocation()->getGpuAddress();
for (auto &cmd : cmdList) {
if (auto miFlushCmd = genCmdCast<MI_FLUSH_DW *>(cmd)) {
if (miFlushCmd->getDestinationAddress() == csr2->getTagAllocation()->getGpuAddress()) {
csr2TaskCountFound = true;
} else if (miFlushCmd->getDestinationAddress() == csr3->getTagAllocation()->getGpuAddress()) {
csr3TaskCountFound = true;
} else if (miFlushCmd->getDestinationAddress() == csr0->getTagAllocation()->getGpuAddress()) {
csr0TaskCountFound = true;
}
return false;
});
}
}
return (found != genCmdList.cend());
};
EXPECT_TRUE(findTagUpdate(genCmdList0, csr0));
EXPECT_TRUE(findTagUpdate(genCmdList2, csr2));
EXPECT_TRUE(findTagUpdate(genCmdList3, csr3));
EXPECT_TRUE(csr0TaskCountFound);
EXPECT_TRUE(csr2TaskCountFound);
EXPECT_TRUE(csr3TaskCountFound);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -1030,11 +1022,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSyncCmdListAndSplitBcsCopyAndImmediate
ASSERT_NE(nullptr, commandList0);
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1053,14 +1045,14 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSyncCmdListAndSplitBcsCopyAndImmediate
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getCsr()->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getCsr()->peekTaskCount(), 1u);
EXPECT_FALSE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies);
EXPECT_EQ(ultCsr->waitForCompletionWithTimeoutTaskCountCalled, 1u);
@@ -1094,11 +1086,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
ASSERT_NE(nullptr, commandList0);
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1121,14 +1113,14 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getCsr()->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getCsr()->peekTaskCount(), 1u);
EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies);
commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
@@ -1189,14 +1181,14 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenRelaxedOrderingNotAllowedWhenDispatchS
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
EXPECT_EQ(1u, ultCsr->getNumClients());
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->getCsr(false)->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->getCsr(false)->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getCsr()->peekTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getCsr()->peekTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getCsr()->peekTaskCount(), 1u);
EXPECT_FALSE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies);
uint32_t semaphoresFound = 0;
@@ -1236,11 +1228,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1255,10 +1247,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -1285,11 +1277,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1304,10 +1296,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -1334,11 +1326,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1354,10 +1346,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopyRegion(dstPtr, &region, 0, 0, srcPtr, &region, 0, 0, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);
@@ -1386,11 +1378,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
ze_event_pool_desc_t eventPoolDesc = {};
eventPoolDesc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
@@ -1417,10 +1409,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, event->toHandle(), 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, commandList0->getCmdContainer().getCommandStream()->getCpuBase(), commandList0->getCmdContainer().getCommandStream()->getUsed()));
@@ -1457,11 +1449,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
ASSERT_NE(nullptr, commandList0);
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1478,16 +1470,16 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, commandList0->getCmdContainer().getCommandStream()->getCpuBase(), commandList0->getCmdContainer().getCommandStream()->getUsed()));
auto itor = cmdList.begin();
for (uint32_t i = 0u; i < static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size() * 2; ++i) {
for (uint32_t i = 0u; i < static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size() * 2; ++i) {
itor = find<MI_SEMAPHORE_WAIT *>(itor, cmdList.end());
EXPECT_NE(cmdList.end(), itor);
}
@@ -1520,11 +1512,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1551,10 +1543,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
auto result = commandList0->appendMemoryCopy(dstPtr, srcPtr, size, event->toHandle(), 0, nullptr, copyParams);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, commandList0->getCmdContainer().getCommandStream()->getCpuBase(), commandList0->getCmdContainer().getCommandStream()->getUsed()));
@@ -1590,11 +1582,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.pools.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.marker.size(), 0u);
@@ -1648,11 +1640,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.pools.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.marker.size(), 0u);
@@ -1726,11 +1718,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.pools.size(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->events.marker.size(), 0u);
@@ -1776,11 +1768,11 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
NEO::EngineGroupType::copy,
returnValue));
ASSERT_NE(nullptr, commandList0);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists.size(), 4u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs.size(), 4u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 0u);
constexpr size_t alignment = 4096u;
constexpr size_t size = 8 * MemoryConstants::megaByte;
@@ -1798,10 +1790,10 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenSplitBcsCopyAndImmediateCommandListWhe
size,
false);
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[0])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[1])->cmdQImmediate->getTaskCount(), 0u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[2])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<WhiteBox<CommandList> *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdLists[3])->cmdQImmediate->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[0])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[1])->getTaskCount(), 0u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[2])->getTaskCount(), 1u);
EXPECT_EQ(static_cast<CommandQueueImp *>(static_cast<DeviceImp *>(testL0Device.get())->bcsSplit->cmdQs[3])->getTaskCount(), 1u);
context->freeMem(srcPtr);
context->freeMem(dstPtr);

View File

@@ -237,15 +237,4 @@ aub_stream::EngineType mapCcsIndexToEngineType(uint32_t index) {
return static_cast<aub_stream::EngineType>(index + static_cast<uint32_t>(aub_stream::ENGINE_CCS));
}
EngineGroupType engineTypeToEngineGroupType(aub_stream::EngineType engineType) {
if (isCcs(engineType)) {
return EngineGroupType::compute;
} else if (isComputeEngine(engineType)) {
return EngineGroupType::renderCompute;
} else if (engineType == aub_stream::ENGINE_BCS) {
return EngineGroupType::copy;
}
return EngineGroupType::linkedCopy;
}
} // namespace NEO::EngineHelpers

View File

@@ -7,7 +7,6 @@
#pragma once
#include "shared/source/helpers/definitions/engine_group_types.h"
#include "shared/source/helpers/device_bitfield.h"
#include "aubstream/engine_node.h"
@@ -59,7 +58,6 @@ aub_stream::EngineType mapBcsIndexToEngineType(uint32_t index, bool includeMainC
aub_stream::EngineType mapCcsIndexToEngineType(uint32_t index);
std::string engineTypeToString(aub_stream::EngineType engineType);
std::string engineUsageToString(EngineUsage usage);
EngineGroupType engineTypeToEngineGroupType(aub_stream::EngineType engineType);
bool isBcsEnabled(const HardwareInfo &hwInfo, aub_stream::EngineType engineType);