mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Enable implicit flush control by default for XE_HPG family
[1/3] - enable implicit flush for GPU idle Related-To: NEO-6827 Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6c09b8cbbc
commit
c9936a4cbd
@@ -1453,7 +1453,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenGpuIsIdleWhenCsrIsEnabledToFl
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
commandStreamReceiver.dispatchMode = DispatchMode::BatchedDispatch;
|
||||
commandStreamReceiver.useGpuIdleImplicitFlush = true;
|
||||
commandStreamReceiver.taskCount = 1u;
|
||||
commandStreamReceiver.latestFlushedTaskCount = 1u;
|
||||
*commandStreamReceiver.getTagAddress() = 1u;
|
||||
|
||||
flushTask(commandStreamReceiver);
|
||||
|
||||
@@ -174,10 +174,18 @@ HWTEST2_F(CommandStreamReceiverHwTestDg2AndLater, givenNotXE_HP_COREWhenChecking
|
||||
EXPECT_FALSE(commandStreamReceiver.checkPlatformSupportsNewResourceImplicitFlush());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandStreamReceiverHwTestDg2AndLater, givenNotXE_HP_COREWhenCheckingNewResourceGpuIdleThenReturnFalse, IsAtLeastXeHpgCore) {
|
||||
HWTEST2_F(CommandStreamReceiverHwTestDg2AndLater, givenNotXE_HPG_COREWhenCheckingGpuIdleImplicitFlushThenReturnFalse, IsNotXeHpgCore) {
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto osContext = pDevice->getDefaultEngine().osContext;
|
||||
commandStreamReceiver.setupContext(*osContext);
|
||||
|
||||
EXPECT_FALSE(commandStreamReceiver.checkPlatformSupportsGpuIdleImplicitFlush());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandStreamReceiverHwTestDg2AndLater, givenXE_HPG_COREWhenCheckingGpuIdleImplicitFlushThenReturnTrue, IsXeHpgCore) {
|
||||
MockCsrHw<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
auto osContext = pDevice->getDefaultEngine().osContext;
|
||||
commandStreamReceiver.setupContext(*osContext);
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.checkPlatformSupportsGpuIdleImplicitFlush());
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ void CommandStreamReceiver::checkForNewResources(TaskCountType submittedTaskCoun
|
||||
|
||||
bool CommandStreamReceiver::checkImplicitFlushForGpuIdle() {
|
||||
if (useGpuIdleImplicitFlush) {
|
||||
if (this->taskCount == *getTagAddress()) {
|
||||
if (this->latestFlushedTaskCount == *getTagAddress()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@ namespace NEO {
|
||||
|
||||
bool OSInterface::osEnabled64kbPages = true;
|
||||
bool OSInterface::newResourceImplicitFlush = false;
|
||||
bool OSInterface::gpuIdleImplicitFlush = false;
|
||||
bool OSInterface::gpuIdleImplicitFlush = true;
|
||||
bool OSInterface::requiresSupportForWddmTrimNotification = true;
|
||||
|
||||
bool OSInterface::isDebugAttachAvailable() const {
|
||||
|
||||
@@ -24,7 +24,7 @@ static auto gfxCore = IGFX_XE_HPG_CORE;
|
||||
template <>
|
||||
bool ImplicitFlushSettings<Family>::defaultSettingForNewResource = false;
|
||||
template <>
|
||||
bool ImplicitFlushSettings<Family>::defaultSettingForGpuIdle = false;
|
||||
bool ImplicitFlushSettings<Family>::defaultSettingForGpuIdle = true;
|
||||
template class ImplicitFlushSettings<Family>;
|
||||
|
||||
template <>
|
||||
|
||||
@@ -1475,7 +1475,7 @@ TEST(CommandStreamReceiverSimpleTest, givenGpuIdleImplicitFlushCheckEnabledWhenG
|
||||
|
||||
csr.useGpuIdleImplicitFlush = true;
|
||||
csr.mockTagAddress[0] = 1u;
|
||||
csr.taskCount = 1u;
|
||||
csr.latestFlushedTaskCount = 1u;
|
||||
EXPECT_TRUE(csr.checkImplicitFlushForGpuIdle());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -44,6 +44,6 @@ TEST_F(OsInterfaceTest, GivenWindowsOsWhenCheckForNewResourceImplicitFlushSuppor
|
||||
EXPECT_FALSE(OSInterface::newResourceImplicitFlush);
|
||||
}
|
||||
|
||||
TEST_F(OsInterfaceTest, GivenWindowsOsWhenCheckForGpuIdleImplicitFlushSupportThenReturnFalse) {
|
||||
EXPECT_FALSE(OSInterface::gpuIdleImplicitFlush);
|
||||
TEST_F(OsInterfaceTest, GivenWindowsOsWhenCheckForGpuIdleImplicitFlushSupportThenReturnTrue) {
|
||||
EXPECT_TRUE(OSInterface::gpuIdleImplicitFlush);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user