performance: Enable timestamp wait for queues on Xe2

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-12-12 14:42:05 +00:00
committed by Compute-Runtime-Automation
parent 8151224501
commit 093d987e33
3 changed files with 8 additions and 9 deletions

View File

@@ -1332,6 +1332,8 @@ bool CommandQueue::isWaitForTimestampsEnabled() const {
auto enabled = CommandQueue::isTimestampWaitEnabled(); auto enabled = CommandQueue::isTimestampWaitEnabled();
enabled &= gfxCoreHelper.isTimestampWaitSupportedForQueues(); enabled &= gfxCoreHelper.isTimestampWaitSupportedForQueues();
enabled &= !productHelper.isDcFlushAllowed(); enabled &= !productHelper.isDcFlushAllowed();
enabled &= !getDevice().getRootDeviceEnvironment().isWddmOnLinux();
enabled &= !this->isOOQEnabled(); // TSP for OOQ dispatch is optional. We need to wait for task count.
switch (debugManager.flags.EnableTimestampWaitForQueues.get()) { switch (debugManager.flags.EnableTimestampWaitForQueues.get()) {
case 0: case 0:
@@ -1371,12 +1373,9 @@ WaitStatus CommandQueue::waitForAllEngines(bool blockedQueue, PrintfHandler *pri
auto waitStatus = WaitStatus::notReady; auto waitStatus = WaitStatus::notReady;
bool waitedOnTimestamps = false; bool waitedOnTimestamps = false;
// TSP for OOQ dispatch is optional. We need to wait for task count. waitedOnTimestamps = waitForTimestamps(activeBcsStates, waitStatus, this->timestampPacketContainer.get(), this->deferredTimestampPackets.get());
if (!isOOQEnabled()) { if (waitStatus == WaitStatus::gpuHang) {
waitedOnTimestamps = waitForTimestamps(activeBcsStates, waitStatus, this->timestampPacketContainer.get(), this->deferredTimestampPackets.get()); return WaitStatus::gpuHang;
if (waitStatus == WaitStatus::gpuHang) {
return WaitStatus::gpuHang;
}
} }
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this); TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);

View File

@@ -100,7 +100,7 @@ uint32_t GfxCoreHelperHw<Family>::getMocsIndex(const GmmHelper &gmmHelper, bool
template <> template <>
bool GfxCoreHelperHw<Family>::isTimestampWaitSupportedForQueues() const { bool GfxCoreHelperHw<Family>::isTimestampWaitSupportedForQueues() const {
return false; return true;
} }
template <> template <>

View File

@@ -31,9 +31,9 @@ XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenGfxCoreHelperWhenAskingFor
EXPECT_EQ(expectedAlignment, gfxCoreHelper.getTimestampPacketAllocatorAlignment()); EXPECT_EQ(expectedAlignment, gfxCoreHelper.getTimestampPacketAllocatorAlignment());
} }
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenGfxCoreHelperWhenCheckTimestampWaitSupportThenReturnFalse) { XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenGfxCoreHelperWhenCheckTimestampWaitSupportThenReturnTrue) {
auto &gfxCoreHelper = getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
EXPECT_FALSE(gfxCoreHelper.isTimestampWaitSupportedForQueues()); EXPECT_TRUE(gfxCoreHelper.isTimestampWaitSupportedForQueues());
} }
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenXe2HpgCoreWhenAskedForMinimialSimdThen16IsReturned) { XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenXe2HpgCoreWhenAskedForMinimialSimdThen16IsReturned) {