mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: don't use global ProductHelper getter 4/n
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
76faad3398
commit
a4eba996f7
@@ -139,7 +139,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
|
||||
auto &hwInfo = device->getHwInfo();
|
||||
auto &rootDeviceEnvironment = device->getNEODevice()->getRootDeviceEnvironment();
|
||||
this->dcFlushSupport = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
|
||||
this->dcFlushSupport = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, rootDeviceEnvironment);
|
||||
this->systolicModeSupport = NEO::PreambleHelper<GfxFamily>::isSystolicModeConfigurable(hwInfo);
|
||||
this->stateComputeModeTracking = L0GfxCoreHelper::enableStateComputeModeTracking(rootDeviceEnvironment);
|
||||
this->frontEndStateTracking = L0GfxCoreHelper::enableFrontEndStateTracking(rootDeviceEnvironment);
|
||||
@@ -2682,7 +2682,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWriteToMemory(void *desc
|
||||
|
||||
const auto &hwInfo = this->device->getHwInfo();
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(descriptor->writeScope, hwInfo);
|
||||
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(descriptor->writeScope, device->getNEODevice()->getRootDeviceEnvironment());
|
||||
args.dcFlushEnable &= dstAllocationStruct.needsFlush;
|
||||
const uint64_t gpuAddress = static_cast<uint64_t>(dstAllocationStruct.alignedAllocationPtr);
|
||||
|
||||
|
||||
@@ -1617,10 +1617,9 @@ ze_result_t DeviceImp::getFabricVertex(ze_fabric_vertex_handle_t *phVertex) {
|
||||
}
|
||||
|
||||
uint32_t DeviceImp::getEventMaxPacketCount() const {
|
||||
const auto &hardwareInfo = this->getHwInfo();
|
||||
auto &l0GfxCoreHelper = this->neoDevice->getRootDeviceEnvironment().getHelper<L0GfxCoreHelper>();
|
||||
|
||||
uint32_t basePackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hardwareInfo);
|
||||
uint32_t basePackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(this->neoDevice->getRootDeviceEnvironment());
|
||||
if (this->isImplicitScalingCapable()) {
|
||||
basePackets *= static_cast<uint32_t>(neoDevice->getDeviceBitfield().count());
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class L0GfxCoreHelper : public NEO::ApiGfxCoreHelper {
|
||||
virtual bool platformSupportsRayTracing() const = 0;
|
||||
virtual bool isZebinAllowed(const NEO::Debugger *debugger) const = 0;
|
||||
virtual uint32_t getEventMaxKernelCount(const NEO::HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getEventBaseMaxPacketCount(const NEO::HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getEventBaseMaxPacketCount(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
|
||||
|
||||
protected:
|
||||
L0GfxCoreHelper() = default;
|
||||
@@ -98,7 +98,7 @@ class L0GfxCoreHelperHw : public L0GfxCoreHelper {
|
||||
bool platformSupportsRayTracing() const override;
|
||||
bool isZebinAllowed(const NEO::Debugger *debugger) const override;
|
||||
uint32_t getEventMaxKernelCount(const NEO::HardwareInfo &hwInfo) const override;
|
||||
uint32_t getEventBaseMaxPacketCount(const NEO::HardwareInfo &hwInfo) const override;
|
||||
uint32_t getEventBaseMaxPacketCount(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const override;
|
||||
|
||||
protected:
|
||||
L0GfxCoreHelperHw() = default;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -35,7 +35,7 @@ uint32_t L0GfxCoreHelperHw<Family>::getEventMaxKernelCount(const NEO::HardwareIn
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
uint32_t L0GfxCoreHelperHw<Family>::getEventBaseMaxPacketCount(const NEO::HardwareInfo &hwInfo) const {
|
||||
uint32_t L0GfxCoreHelperHw<Family>::getEventBaseMaxPacketCount(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
return 1u;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
#include "level_zero/core/source/hw_helpers/l0_hw_helper.h"
|
||||
@@ -41,9 +42,10 @@ uint32_t L0GfxCoreHelperHw<Family>::getEventMaxKernelCount(const NEO::HardwareIn
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
uint32_t L0GfxCoreHelperHw<Family>::getEventBaseMaxPacketCount(const NEO::HardwareInfo &hwInfo) const {
|
||||
uint32_t L0GfxCoreHelperHw<Family>::getEventBaseMaxPacketCount(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
uint32_t basePackets = getEventMaxKernelCount(hwInfo);
|
||||
if (NEO::MemorySynchronizationCommands<Family>::getDcFlushEnable(true, hwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<Family>::getDcFlushEnable(true, rootDeviceEnvironment)) {
|
||||
basePackets += L0GfxCoreHelper::useCompactL3FlushEventPacket(hwInfo) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -916,7 +916,7 @@ HWTEST2_F(HostPointerManagerCommandListTest, givenCommandListWhenMemoryFillWithS
|
||||
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*cmdList.rbegin());
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
EXPECT_NE(nullptr, pc);
|
||||
EXPECT_TRUE(pc->getDcFlushEnable());
|
||||
} else {
|
||||
|
||||
@@ -611,7 +611,7 @@ HWTEST_F(CommandListCreate, givenCommandListWithCopyOnlyWhenAppendWaitEventsWith
|
||||
cmdList, ptrOffset(commandContainer.getCommandStream()->getCpuBase(), 0), commandContainer.getCommandStream()->getUsed()));
|
||||
auto itor = find<MI_FLUSH_DW *>(cmdList.begin(), cmdList.end());
|
||||
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
EXPECT_NE(cmdList.end(), itor);
|
||||
} else {
|
||||
EXPECT_EQ(cmdList.end(), itor);
|
||||
@@ -637,7 +637,7 @@ HWTEST_F(CommandListCreate, givenCommandListyWhenAppendWaitEventsWithDcFlushThen
|
||||
auto itor = find<SEMAPHORE_WAIT *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itor);
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
itor--;
|
||||
EXPECT_NE(nullptr, genCmdCast<PIPE_CONTROL *>(*itor));
|
||||
} else {
|
||||
@@ -668,7 +668,7 @@ HWTEST_F(CommandListCreate, givenCommandListWhenAppendWaitEventsWithDcFlushThenP
|
||||
auto itor = find<SEMAPHORE_WAIT *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itor);
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
itor--;
|
||||
EXPECT_NE(nullptr, genCmdCast<PIPE_CONTROL *>(*itor));
|
||||
} else {
|
||||
@@ -699,7 +699,7 @@ HWTEST_F(CommandListCreate, givenAsyncCmdQueueAndImmediateCommandListWhenAppendW
|
||||
EXPECT_NE(nullptr, commandList->cmdQImmediate);
|
||||
|
||||
size_t expectedUsed = 2 * sizeof(SEMAPHORE_WAIT) + sizeof(MI_BATCH_BUFFER_END);
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
expectedUsed += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
expectedUsed = alignUp(expectedUsed, 64);
|
||||
|
||||
@@ -173,7 +173,7 @@ using CommandListTest = Test<DeviceFixture>;
|
||||
using IsDcFlushSupportedPlatform = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_XE_HP_CORE>;
|
||||
|
||||
HWTEST2_F(CommandListTest, givenCopyCommandListWhenRequiredFlushOperationThenExpectNoPipeControl, IsDcFlushSupportedPlatform) {
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()));
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
|
||||
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
@@ -190,7 +190,7 @@ HWTEST2_F(CommandListTest, givenCopyCommandListWhenRequiredFlushOperationThenExp
|
||||
HWTEST2_F(CommandListTest, givenComputeCommandListWhenRequiredFlushOperationThenExpectPipeControlWithDcFlush, IsDcFlushSupportedPlatform) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()));
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
|
||||
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
@@ -217,7 +217,7 @@ HWTEST2_F(CommandListTest, givenComputeCommandListWhenRequiredFlushOperationThen
|
||||
HWTEST2_F(CommandListTest, givenComputeCommandListWhenNoRequiredFlushOperationThenExpectNoPipeControl, IsDcFlushSupportedPlatform) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()));
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
|
||||
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
@@ -234,7 +234,7 @@ HWTEST2_F(CommandListTest, givenComputeCommandListWhenNoRequiredFlushOperationTh
|
||||
HWTEST2_F(CommandListTest, givenComputeCommandListWhenRequiredFlushOperationAndNoSignalScopeEventThenExpectPipeControlWithDcFlush, IsDcFlushSupportedPlatform) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()));
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
@@ -271,7 +271,7 @@ HWTEST2_F(CommandListTest, givenComputeCommandListWhenRequiredFlushOperationAndN
|
||||
HWTEST2_F(CommandListTest, givenComputeCommandListWhenRequiredFlushOperationAndSignalScopeEventThenExpectNoPipeControl, IsDcFlushSupportedPlatform) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()));
|
||||
EXPECT_TRUE(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
|
||||
@@ -518,7 +518,7 @@ HWTEST2_F(CommandListCreate, givenCommandListAndHostPointersWhenMemoryCopyCalled
|
||||
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*genCmdList.rbegin());
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
EXPECT_NE(nullptr, pc);
|
||||
EXPECT_TRUE(pc->getDcFlushEnable());
|
||||
} else {
|
||||
|
||||
@@ -92,7 +92,7 @@ HWTEST_F(CommandListAppendEventReset, givenCmdlistWhenResetEventWithTimeStampIsA
|
||||
|
||||
uint32_t maxPackets = EventPacketsCount::eventPackets;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
maxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
maxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
auto itorSdi = findAll<MI_STORE_DATA_IMM *>(cmdList.begin(), cmdList.end());
|
||||
@@ -293,7 +293,7 @@ HWTEST2_F(CommandListAppendUsedPacketSignalEvent, givenTimestampEventUsedInReset
|
||||
|
||||
uint32_t maxPackets = EventPacketsCount::eventPackets;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
maxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
maxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
gpuAddress += ((maxPackets - 1) * event->getSinglePacketSize());
|
||||
|
||||
@@ -352,7 +352,7 @@ HWTEST2_F(CommandListAppendEventReset, givenEventWithHostScopeUsedInResetThenPip
|
||||
EXPECT_EQ(cmd->getImmediateData(), Event::STATE_CLEARED);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(gpuAddress, NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*cmd));
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
postSyncFound = true;
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ HWTEST2_F(CommandListAppendUsedPacketSignalEvent,
|
||||
EXPECT_EQ(cmd->getImmediateData(), Event::STATE_CLEARED);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(gpuAddress, NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*cmd));
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
EXPECT_TRUE(cmd->getWorkloadPartitionIdOffsetEnable());
|
||||
postSyncFound++;
|
||||
gpuAddress += event->getSinglePacketSize() * commandList->partitionCount;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -109,7 +109,7 @@ HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyRegionC
|
||||
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*genCmdList.rbegin());
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
EXPECT_NE(nullptr, pc);
|
||||
EXPECT_TRUE(pc->getDcFlushEnable());
|
||||
} else {
|
||||
@@ -425,7 +425,7 @@ HWTEST2_F(AppendMemoryCopy, givenCommandListAndHostPointersWhenMemoryCopyCalledT
|
||||
itor++;
|
||||
}
|
||||
uint32_t expectedDcFlushPipeControl =
|
||||
NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo()) ? 1 : 0;
|
||||
NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()) ? 1 : 0;
|
||||
EXPECT_EQ(expectedDcFlushPipeControl, dcFlushPipeControl);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ HWTEST_F(CommandListAppendSignalEvent, givenEventWithScopeFlagDeviceWhenAppendin
|
||||
if (cmd->getPostSyncOperation() == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
||||
EXPECT_EQ(cmd->getImmediateData(), Event::STATE_SIGNALED);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
postSyncFound = true;
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ HWTEST2_F(CommandListAppendUsedPacketSignalEvent,
|
||||
EXPECT_EQ(Event::STATE_SIGNALED, cmd->getImmediateData());
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(gpuAddress, NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*cmd));
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
EXPECT_TRUE(cmd->getWorkloadPartitionIdOffsetEnable());
|
||||
postSyncFound++;
|
||||
gpuAddress += event->getSinglePacketSize();
|
||||
@@ -342,7 +342,7 @@ HWTEST2_F(CommandListAppendUsedPacketSignalEvent,
|
||||
EXPECT_EQ(Event::STATE_SIGNALED, cmd->getImmediateData());
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(gpuAddress, NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*cmd));
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
EXPECT_TRUE(cmd->getWorkloadPartitionIdOffsetEnable());
|
||||
postSyncFound++;
|
||||
gpuAddress += event->getSinglePacketSize();
|
||||
|
||||
@@ -340,7 +340,7 @@ HWTEST_F(CommandListAppendWaitOnEvent, givenEventWithWaitScopeFlagDeviceWhenAppe
|
||||
auto itor = find<MI_SEMAPHORE_WAIT *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(cmdList.end(), itor);
|
||||
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
itor--;
|
||||
auto cmd = genCmdCast<PIPE_CONTROL *>(*itor);
|
||||
|
||||
@@ -526,7 +526,7 @@ HWTEST_F(CommandListAppendWaitOnEvent, givenCommandBufferIsEmptyWhenAppendingWai
|
||||
commandList->commandContainer.getCommandStream()->getSpace(consumeSpace);
|
||||
|
||||
size_t expectedConsumedSpace = sizeof(MI_SEMAPHORE_WAIT);
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
expectedConsumedSpace += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
|
||||
@@ -558,14 +558,14 @@ HWTEST_F(CommandListAppendWaitOnEvent, givenCommandBufferIsEmptyWhenAppendingWai
|
||||
usedSpaceAfter));
|
||||
|
||||
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
ASSERT_NE(cmdList.end(), itorPC);
|
||||
{
|
||||
auto cmd = genCmdCast<PIPE_CONTROL *>(*itorPC);
|
||||
ASSERT_NE(cmd, nullptr);
|
||||
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
}
|
||||
} else {
|
||||
EXPECT_EQ(cmdList.end(), itorPC);
|
||||
|
||||
@@ -939,7 +939,7 @@ HWTEST2_F(AppendMemoryCopyXeHpAndLaterMultiPacket,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 2;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 3;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -1060,7 +1060,7 @@ HWTEST2_F(AppendMemoryCopyXeHpAndLaterSinglePacket,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 0;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 1;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -1084,7 +1084,7 @@ HWTEST2_F(AppendMemoryCopyXeHpAndLaterSinglePacket,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 0;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 1;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -1202,7 +1202,7 @@ HWTEST2_F(MultiTileAppendMemoryCopyXeHpAndLaterMultiPacket,
|
||||
input.size = 0x100002345;
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
constexpr uint32_t reminderPostSyncOps = 1;
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
input.storeDataImmOffset = arg.expectedPacketsInUse * testEvent->getSinglePacketSize();
|
||||
@@ -1226,7 +1226,7 @@ HWTEST2_F(MultiTileAppendMemoryCopyXeHpAndLaterMultiPacket,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 2;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 3;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -1335,7 +1335,7 @@ HWTEST2_F(MultiTileAppendMemoryCopyXeHpAndLaterSinglePacket,
|
||||
input.size = 0x100002345;
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
constexpr uint32_t reminderPostSyncOps = 1;
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
input.storeDataImmOffset = arg.expectedPacketsInUse * testEvent->getSinglePacketSize();
|
||||
|
||||
@@ -539,7 +539,7 @@ void testMultiTileAppendMemoryFillManyKernels(FillTestInput &input, TestExpected
|
||||
size_t usedAfter = commandContainer.getCommandStream()->getUsed();
|
||||
|
||||
uint32_t expectedDcFlush = 0;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
// 1st dc flush after cross-tile sync, 2nd dc flush for signal scope event
|
||||
expectedDcFlush = 2;
|
||||
}
|
||||
@@ -742,7 +742,7 @@ HWTEST2_F(AppendFillMultiPacketEventTest,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 1;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 2;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -767,7 +767,7 @@ HWTEST2_F(AppendFillMultiPacketEventTest,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 1;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 2;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -787,7 +787,7 @@ HWTEST2_F(AppendFillMultiPacketEventTest,
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
uint32_t reminderPostSyncOps = 2;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
reminderPostSyncOps = 3;
|
||||
}
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
@@ -900,7 +900,7 @@ HWTEST2_F(MultiTileAppendFillEventMultiPacketTest,
|
||||
arg.expectedKernelCount = 2;
|
||||
arg.expectedWalkerPostSyncOp = 3;
|
||||
arg.expectedPostSyncPipeControls = 0;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
// last kernel uses 4 packets, in addition to kernel two packets, use 2 packets to two tile cache flush
|
||||
arg.expectedPacketsInUse = 6;
|
||||
// cache flush with event signal
|
||||
@@ -931,7 +931,7 @@ HWTEST2_F(MultiTileAppendFillEventMultiPacketTest,
|
||||
arg.expectedKernelCount = 2;
|
||||
arg.expectedWalkerPostSyncOp = 3;
|
||||
arg.expectedPostSyncPipeControls = 0;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
// last kernel uses 4 packets, in addition to kernel two packets, use 2 packets to two tile cache flush
|
||||
arg.expectedPacketsInUse = 6;
|
||||
// cache flush with event signal
|
||||
@@ -1015,7 +1015,7 @@ HWTEST2_F(MultiTileAppendFillEventSinglePacketTest,
|
||||
input.patternSize = patternSize;
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
constexpr uint32_t reminderPostSyncOps = 1;
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
input.storeDataImmOffset = arg.expectedPacketsInUse * testEvent->getSinglePacketSize();
|
||||
@@ -1042,7 +1042,7 @@ HWTEST2_F(MultiTileAppendFillEventSinglePacketTest,
|
||||
input.patternSize = patternSize;
|
||||
|
||||
if (input.signalAllPackets) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getHwInfo())) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
constexpr uint32_t reminderPostSyncOps = 1;
|
||||
arg.expectStoreDataImm = reminderPostSyncOps;
|
||||
}
|
||||
@@ -1159,7 +1159,7 @@ using MultiTileAppendFillCompactL3EventTest = Test<AppendFillMultiPacketEventFix
|
||||
HWTEST2_F(MultiTileAppendFillCompactL3EventTest,
|
||||
givenMultiTileCmdListCallToAppendMemoryFillWhenPlatformNeedsDcFlushAndL3CompactTimestampEventThenRegisterPostSyncUsedOtherwiseUsesWalkerPostSyncProfiling,
|
||||
IsAtLeastXeHpCore) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
arg.expectedPacketsInUse = 2;
|
||||
arg.expectedKernelCount = 1;
|
||||
arg.expectedWalkerPostSyncOp = 0;
|
||||
@@ -1192,7 +1192,7 @@ HWTEST2_F(MultiTileAppendFillCompactL3EventTest,
|
||||
HWTEST2_F(MultiTileAppendFillCompactL3EventTest,
|
||||
givenMultiTileCmdListCallToAppendMemoryFillWhenPlatformNeedsDcFlushAndL3CompactImmediateEventThenPipeControlPostSyncUsedOtherwiseUsesWalkerPostSyncProfiling,
|
||||
IsAtLeastXeHpCore) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, input.device->getNEODevice()->getRootDeviceEnvironment())) {
|
||||
arg.expectedPacketsInUse = 2;
|
||||
arg.expectedKernelCount = 1;
|
||||
arg.expectedWalkerPostSyncOp = 0;
|
||||
|
||||
@@ -460,7 +460,7 @@ HWTEST_F(CommandListAppendWaitOnMem, givenAppendWaitOnMemWithSignalEventAndHostS
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(cmd->getImmediateData(), Event::STATE_SIGNALED);
|
||||
EXPECT_EQ(pipeControlAddress, NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*cmd));
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
postSyncFound = true;
|
||||
}
|
||||
}
|
||||
@@ -781,7 +781,7 @@ HWTEST_F(CommandListAppendWriteToMem, givenAppendWriteToMemWithScopeThenPipeCont
|
||||
if (cmd->getPostSyncOperation() == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
||||
EXPECT_EQ(cmd->getImmediateData(), data);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
postSyncFound = true;
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ HWTEST2_F(CommandListAppendWriteToMem, givenAppendWriteToMemWithScopeThenPipeCon
|
||||
if (cmd->getPostSyncOperation() == POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA) {
|
||||
EXPECT_EQ(cmd->getImmediateData(), data);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
|
||||
EXPECT_EQ(NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, device->getNEODevice()->getRootDeviceEnvironment()), cmd->getDcFlushEnable());
|
||||
uint64_t pcAddress = cmd->getAddress() | (static_cast<uint64_t>(cmd->getAddressHigh()) << 32);
|
||||
EXPECT_EQ(expectedGpuAddress, pcAddress);
|
||||
postSyncFound = true;
|
||||
|
||||
@@ -313,7 +313,7 @@ struct PauseOnGpuFixture : public Test<ModuleFixture> {
|
||||
if ((static_cast<uint32_t>(requiredDebugPauseState) == pipeControlCmd->getImmediateData()) &&
|
||||
(debugPauseStateAddress == NEO::UnitTestHelper<FamilyType>::getPipeControlPostSyncAddress(*pipeControlCmd))) {
|
||||
EXPECT_TRUE(pipeControlCmd->getCommandStreamerStallEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), pipeControlCmd->getDcFlushEnable());
|
||||
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, this->device->getNEODevice()->getRootDeviceEnvironment()), pipeControlCmd->getDcFlushEnable());
|
||||
EXPECT_EQ(PIPE_CONTROL::POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA, pipeControlCmd->getPostSyncOperation());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ HWTEST_F(EventPoolCreate, givenTimestampEventsThenEventSizeSufficientForAllKerne
|
||||
|
||||
uint32_t maxPacketCount = EventPacketsCount::maxKernelSplit * NEO::TimestampPacketSizeControl::preferredPacketCount;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
maxPacketCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
maxPacketCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
uint32_t packetsSize = maxPacketCount *
|
||||
static_cast<uint32_t>(NEO::TimestampPackets<typename FamilyType::TimestampPacketType>::getSinglePacketSize());
|
||||
@@ -1012,7 +1012,7 @@ TEST_F(EventCreate, givenEventWhenSignaledAndResetFromTheHostThenCorrectDataAndO
|
||||
uint32_t *eventCompletionMemory = reinterpret_cast<uint32_t *>(event->getCompletionFieldHostAddress());
|
||||
uint32_t maxPacketsCount = EventPacketsCount::maxKernelSplit * NEO::TimestampPacketSizeControl::preferredPacketCount;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
maxPacketsCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
maxPacketsCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < maxPacketsCount; i++) {
|
||||
@@ -2317,7 +2317,7 @@ HWTEST_F(EventSizeTests, whenCreatingEventPoolThenUseCorrectSizeAndAlignment) {
|
||||
|
||||
uint32_t packetCount = EventPacketsCount::eventPackets;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
packetCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
packetCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
auto expectedAlignment = static_cast<uint32_t>(gfxCoreHelper.getTimestampPacketAllocatorAlignment());
|
||||
@@ -2353,7 +2353,7 @@ HWTEST_F(EventSizeTests, givenDebugFlagwhenCreatingEventPoolThenUseCorrectSizeAn
|
||||
|
||||
uint32_t packetCount = EventPacketsCount::eventPackets;
|
||||
if (l0GfxCoreHelper.useDynamicEventPacketsCount(hwInfo)) {
|
||||
packetCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
packetCount = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
{
|
||||
@@ -2734,7 +2734,7 @@ struct EventDynamicPacketUseFixture : public DeviceFixture {
|
||||
EXPECT_EQ(expectedMaxKernelCount, eventPool->getMaxKernelCount());
|
||||
|
||||
auto eventPoolMaxPackets = eventPool->getEventMaxPackets();
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
if constexpr (multiTile == 1) {
|
||||
expectedPoolMaxPackets *= 2;
|
||||
}
|
||||
@@ -2795,7 +2795,7 @@ struct EventDynamicPacketUseFixture : public DeviceFixture {
|
||||
EXPECT_EQ(expectedMaxKernelCount, eventPool->getMaxKernelCount());
|
||||
|
||||
auto eventPoolMaxPackets = eventPool->getEventMaxPackets();
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(expectedPoolMaxPackets, eventPoolMaxPackets);
|
||||
|
||||
@@ -2821,8 +2821,6 @@ struct EventDynamicPacketUseFixture : public DeviceFixture {
|
||||
|
||||
void testSignalAllPackets(uint32_t eventValueAfterSignal, uint32_t queryRetAfterPartialReset, ze_event_pool_flags_t flags, bool signalAll) {
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
auto &hwInfo = device->getHwInfo();
|
||||
auto &l0GfxCoreHelper = device->getNEODevice()->getRootDeviceEnvironment().getHelper<L0GfxCoreHelper>();
|
||||
|
||||
ze_event_pool_desc_t eventPoolDesc = {
|
||||
@@ -2836,7 +2834,7 @@ struct EventDynamicPacketUseFixture : public DeviceFixture {
|
||||
ASSERT_NE(nullptr, eventPool);
|
||||
|
||||
auto eventPoolMaxPackets = eventPool->getEventMaxPackets();
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo);
|
||||
auto expectedPoolMaxPackets = l0GfxCoreHelper.getEventBaseMaxPacketCount(device->getNEODevice()->getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(expectedPoolMaxPackets, eventPoolMaxPackets);
|
||||
|
||||
|
||||
@@ -712,7 +712,7 @@ HWTEST2_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperWhenGettingMaxKernelAndMaxPac
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_EQ(1u, l0GfxCoreHelper.getEventMaxKernelCount(hwInfo));
|
||||
EXPECT_EQ(1u, l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo));
|
||||
EXPECT_EQ(1u, l0GfxCoreHelper.getEventBaseMaxPacketCount(*executionEnvironment.rootDeviceEnvironments[0]));
|
||||
}
|
||||
|
||||
template <int32_t usePipeControlMultiPacketEventSync, int32_t compactL3FlushEventPacket>
|
||||
@@ -737,12 +737,12 @@ HWTEST2_F(L0GfxCoreHelperEventMultiKernelEnabledL3FlushCompactDisabledTest,
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
|
||||
uint32_t expectedPacket = 3;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, hwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *executionEnvironment.rootDeviceEnvironments[0])) {
|
||||
expectedPacket++;
|
||||
}
|
||||
|
||||
EXPECT_EQ(3u, l0GfxCoreHelper.getEventMaxKernelCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(*executionEnvironment.rootDeviceEnvironments[0]));
|
||||
}
|
||||
|
||||
using L0GfxCoreHelperEventMultiKernelEnabledL3FlushCompactEnabledTest = Test<L0GfxCoreHelperMultiPacketEventFixture<0, 1>>;
|
||||
@@ -755,7 +755,7 @@ HWTEST2_F(L0GfxCoreHelperEventMultiKernelEnabledL3FlushCompactEnabledTest,
|
||||
uint32_t expectedPacket = 3;
|
||||
|
||||
EXPECT_EQ(3u, l0GfxCoreHelper.getEventMaxKernelCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(*executionEnvironment.rootDeviceEnvironments[0]));
|
||||
}
|
||||
|
||||
using L0GfxCoreHelperEventMultiKernelDisabledL3FlushCompactDisabledTest = Test<L0GfxCoreHelperMultiPacketEventFixture<1, 0>>;
|
||||
@@ -766,12 +766,12 @@ HWTEST2_F(L0GfxCoreHelperEventMultiKernelDisabledL3FlushCompactDisabledTest,
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
|
||||
uint32_t expectedPacket = 1;
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, hwInfo)) {
|
||||
if (NEO::MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *executionEnvironment.rootDeviceEnvironments[0])) {
|
||||
expectedPacket++;
|
||||
}
|
||||
|
||||
EXPECT_EQ(1u, l0GfxCoreHelper.getEventMaxKernelCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(*executionEnvironment.rootDeviceEnvironments[0]));
|
||||
}
|
||||
|
||||
using L0GfxCoreHelperEventMultiKernelDisabledL3FlushCompactEnabledTest = Test<L0GfxCoreHelperMultiPacketEventFixture<1, 1>>;
|
||||
@@ -784,7 +784,7 @@ HWTEST2_F(L0GfxCoreHelperEventMultiKernelDisabledL3FlushCompactEnabledTest,
|
||||
uint32_t expectedPacket = 1;
|
||||
|
||||
EXPECT_EQ(1u, l0GfxCoreHelper.getEventMaxKernelCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(hwInfo));
|
||||
EXPECT_EQ(expectedPacket, l0GfxCoreHelper.getEventBaseMaxPacketCount(*executionEnvironment.rootDeviceEnvironments[0]));
|
||||
}
|
||||
|
||||
TEST_F(L0GfxCoreHelperTest, givenL0GfxCoreHelperWhenGettingDefaultValueForSignalAllEventPacketThenReturnTrue) {
|
||||
|
||||
Reference in New Issue
Block a user