Revert "performance: use RESOURCE_BARRIER as stalling barrier"

This reverts commit 556c0b64c6.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-05-30 13:39:42 +02:00
committed by Compute-Runtime-Automation
parent 13a5e90124
commit 1a50e8e7c0
32 changed files with 80 additions and 215 deletions

View File

@@ -40,6 +40,5 @@ if(TESTS_XE2_AND_LATER)
target_sources(neo_libult_common PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_state_context_data_base_address.inl
${CMAKE_CURRENT_SOURCE_DIR}/hw_parse_xe2_hpg_and_later.inl
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_resource_barrier.inl
)
endif()

View File

@@ -1,22 +0,0 @@
/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
using namespace NEO;
using RESOURCE_BARRIER = GenStruct::RESOURCE_BARRIER;
template <>
RESOURCE_BARRIER *genCmdCast<RESOURCE_BARRIER *>(void *buffer) {
auto pCmd = reinterpret_cast<RESOURCE_BARRIER *>(buffer);
return (0x3 == pCmd->TheStructure.Common.DwordLength &&
0x3 == pCmd->TheStructure.Common.Opcode &&
0x5 == pCmd->TheStructure.Common.CommandType)
? pCmd
: nullptr;
}

View File

@@ -63,9 +63,6 @@ struct HardwareParse : NEO::NonCopyableAndNonMovableClass {
return true;
}
template <typename FamilyType>
bool isStallingBarrier(GenCmdList::iterator &iter);
template <typename FamilyType>
void findHardwareCommands();

View File

@@ -155,22 +155,4 @@ const typename FamilyType::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState(
}
}
template <typename FamilyType>
bool HardwareParse::isStallingBarrier(GenCmdList::iterator &iter) {
PIPE_CONTROL *pipeControlCmd = genCmdCast<PIPE_CONTROL *>(*iter);
if (pipeControlCmd == nullptr) {
return false;
}
EXPECT_EQ(pipeControlCmd->getCommandStreamerStallEnable(), true);
EXPECT_EQ(pipeControlCmd->getDcFlushEnable(), false);
EXPECT_EQ(pipeControlCmd->getRenderTargetCacheFlushEnable(), false);
EXPECT_EQ(pipeControlCmd->getInstructionCacheInvalidateEnable(), false);
EXPECT_EQ(pipeControlCmd->getTextureCacheInvalidationEnable(), false);
EXPECT_EQ(pipeControlCmd->getPipeControlFlushEnable(), false);
EXPECT_EQ(pipeControlCmd->getVfCacheInvalidationEnable(), false);
EXPECT_EQ(pipeControlCmd->getConstantCacheInvalidationEnable(), false);
EXPECT_EQ(pipeControlCmd->getStateCacheInvalidationEnable(), false);
return true;
}
} // namespace NEO

View File

@@ -23,13 +23,4 @@ bool HardwareParse::requiresPipelineSelectBeforeMediaState<GenGfxFamily>() {
return false;
}
template <>
bool HardwareParse::isStallingBarrier<GenGfxFamily>(GenCmdList::iterator &iter) {
GenGfxFamily::RESOURCE_BARRIER *resourceBarrierCmd = genCmdCast<GenGfxFamily::RESOURCE_BARRIER *>(*iter);
EXPECT_EQ(resourceBarrierCmd->getBarrierType(), RESOURCE_BARRIER::BARRIER_TYPE::BARRIER_TYPE_IMMEDIATE);
EXPECT_EQ(resourceBarrierCmd->getWaitStage(), RESOURCE_BARRIER::WAIT_STAGE::WAIT_STAGE_TOP);
EXPECT_EQ(resourceBarrierCmd->getSignalStage(), RESOURCE_BARRIER::SIGNAL_STAGE::SIGNAL_STAGE_GPGPU);
return resourceBarrierCmd != nullptr;
}
} // namespace NEO

View File

@@ -132,6 +132,4 @@ template void HardwareParse::findHardwareCommands<Gen12LpFamily>();
template void HardwareParse::findHardwareCommands<Gen12LpFamily>(IndirectHeap *);
template const void *HardwareParse::getStatelessArgumentPointer<Gen12LpFamily>(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex);
template const typename Gen12LpFamily::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState<Gen12LpFamily>(IndirectHeap *ssh, uint32_t index);
template bool HardwareParse::isStallingBarrier<Gen12LpFamily>(GenCmdList::iterator &iter);
} // namespace NEO

View File

@@ -11,7 +11,6 @@ using GenGfxFamily = NEO::Xe2HpgCoreFamily;
#include "shared/test/common/cmd_parse/cmd_parse_mem_fence.inl"
#include "shared/test/common/cmd_parse/cmd_parse_mem_set.inl"
#include "shared/test/common/cmd_parse/cmd_parse_resource_barrier.inl"
#include "shared/test/common/cmd_parse/cmd_parse_state_context_data_base_address.inl"
#include "shared/test/common/cmd_parse/cmd_parse_state_prefetch.inl"
#include "shared/test/common/cmd_parse/cmd_parse_system_mem_fence_address.inl"
@@ -23,7 +22,6 @@ using STATE_SYSTEM_MEM_FENCE_ADDRESS = GenStruct::STATE_SYSTEM_MEM_FENCE_ADDRESS
using STATE_PREFETCH = GenStruct::STATE_PREFETCH;
using MEM_SET = GenStruct::MEM_SET;
using STATE_CONTEXT_DATA_BASE_ADDRESS = GenStruct::STATE_CONTEXT_DATA_BASE_ADDRESS;
using RESOURCE_BARRIER = GenStruct::RESOURCE_BARRIER;
template <>
size_t CmdParse<GenGfxFamily>::getAdditionalCommandLength(void *cmd) {
@@ -52,11 +50,6 @@ size_t CmdParse<GenGfxFamily>::getAdditionalCommandLength(void *cmd) {
return sizeof(STATE_CONTEXT_DATA_BASE_ADDRESS) / sizeof(uint32_t);
}
}
{
if (genCmdCast<RESOURCE_BARRIER *>(cmd)) {
return sizeof(RESOURCE_BARRIER) / sizeof(uint32_t);
}
}
return 0;
}

View File

@@ -12,7 +12,6 @@ using GenGfxFamily = NEO::Xe3CoreFamily;
#include "shared/test/common/cmd_parse/cmd_parse_mem_fence.inl"
#include "shared/test/common/cmd_parse/cmd_parse_mem_set.inl"
#include "shared/test/common/cmd_parse/cmd_parse_resource_barrier.inl"
#include "shared/test/common/cmd_parse/cmd_parse_state_context_data_base_address.inl"
#include "shared/test/common/cmd_parse/cmd_parse_state_prefetch.inl"
#include "shared/test/common/cmd_parse/cmd_parse_system_mem_fence_address.inl"
@@ -24,7 +23,6 @@ using STATE_SYSTEM_MEM_FENCE_ADDRESS = GenStruct::STATE_SYSTEM_MEM_FENCE_ADDRESS
using STATE_PREFETCH = GenStruct::STATE_PREFETCH;
using MEM_SET = GenStruct::MEM_SET;
using STATE_CONTEXT_DATA_BASE_ADDRESS = GenStruct::STATE_CONTEXT_DATA_BASE_ADDRESS;
using RESOURCE_BARRIER = GenStruct::RESOURCE_BARRIER;
template <>
size_t CmdParse<GenGfxFamily>::getAdditionalCommandLength(void *cmd) {
@@ -53,11 +51,6 @@ size_t CmdParse<GenGfxFamily>::getAdditionalCommandLength(void *cmd) {
return sizeof(STATE_CONTEXT_DATA_BASE_ADDRESS) / sizeof(uint32_t);
}
}
{
if (genCmdCast<RESOURCE_BARRIER *>(cmd)) {
return sizeof(RESOURCE_BARRIER) / sizeof(uint32_t);
}
}
return 0;
}

View File

@@ -71,4 +71,3 @@ const char *CmdParse<GenGfxFamily>::getAdditionalCommandName(void *cmd) {
#include "shared/test/common/cmd_parse/hw_parse_xe_hpg_and_later.inl"
template const typename GenGfxFamily::RENDER_SURFACE_STATE *NEO::HardwareParse::getSurfaceState<GenGfxFamily>(IndirectHeap *ssh, uint32_t index);
template bool NEO::HardwareParse::isStallingBarrier<GenGfxFamily>(GenCmdList::iterator &iter);

View File

@@ -57,4 +57,3 @@ const char *CmdParse<GenGfxFamily>::getAdditionalCommandName(void *cmd) {
#include "shared/test/common/cmd_parse/hw_parse_xe_hpg_and_later.inl"
template const typename GenGfxFamily::RENDER_SURFACE_STATE *NEO::HardwareParse::getSurfaceState<GenGfxFamily>(IndirectHeap *ssh, uint32_t index);
template bool NEO::HardwareParse::isStallingBarrier<GenGfxFamily>(GenCmdList::iterator &iter);