Report to StreamProperties whether large grf should be programmed with SCM

Add helper method to UnitTestHelper to query programmed grf values.

Related-To: NEO-6659

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-04-26 14:28:18 +00:00
committed by Compute-Runtime-Automation
parent 903cf766b3
commit 3900c9d24a
14 changed files with 87 additions and 12 deletions

View File

@@ -12,6 +12,8 @@
namespace NEO {
class CommandStreamReceiver;
class LinearStream;
struct KernelDescriptor;
struct HardwareInfo;
@@ -71,6 +73,8 @@ struct UnitTestHelper {
static void setPipeControlHdcPipelineFlush(typename GfxFamily::PIPE_CONTROL &pipeControl, bool hdcPipelineFlush);
static void adjustKernelDescriptorForImplicitArgs(KernelDescriptor &kernelDescriptor);
static std::vector<bool> getProgrammedLargeGrfValues(CommandStreamReceiver &csr, LinearStream &linearStream);
};
} // namespace NEO

View File

@@ -66,4 +66,10 @@ inline void UnitTestHelper<GfxFamily>::adjustKernelDescriptorForImplicitArgs(Ker
kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs = true;
kernelDescriptor.payloadMappings.implicitArgs.implicitArgsBuffer = 0u;
}
template <typename GfxFamily>
std::vector<bool> UnitTestHelper<GfxFamily>::getProgrammedLargeGrfValues(CommandStreamReceiver &csr, LinearStream &linearStream) {
return {};
}
} // namespace NEO

View File

@@ -6,8 +6,10 @@
*/
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/kernel/kernel_descriptor.h"
#include "shared/test/common/cmd_parse/hw_parse.h"
#include "shared/test/common/helpers/unit_test_helper.h"
namespace NEO {
@@ -83,4 +85,19 @@ template <typename GfxFamily>
inline void UnitTestHelper<GfxFamily>::adjustKernelDescriptorForImplicitArgs(KernelDescriptor &kernelDescriptor) {
kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs = true;
}
template <typename GfxFamily>
std::vector<bool> UnitTestHelper<GfxFamily>::getProgrammedLargeGrfValues(CommandStreamReceiver &csr, LinearStream &linearStream) {
using STATE_COMPUTE_MODE = typename GfxFamily::STATE_COMPUTE_MODE;
std::vector<bool> largeGrfValues;
HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(csr, linearStream);
auto commands = hwParser.getCommandsList<STATE_COMPUTE_MODE>();
for (auto &cmd : commands) {
largeGrfValues.push_back(reinterpret_cast<STATE_COMPUTE_MODE *>(cmd)->getLargeGrfMode());
}
return largeGrfValues;
}
} // namespace NEO

View File

@@ -347,4 +347,17 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::useChannelRedForUnusedShaderChannels() const
return false;
}
} // namespace NEO
template <>
void HwInfoConfigHw<IGFX_UNKNOWN>::updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) {
}
template <>
void HwInfoConfigHw<IGFX_UNKNOWN>::updateIddCommand(void *const commandPtr, uint32_t numGrf) {
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::isGrfNumReportedWithScm() const {
return false;
}
} //namespace NEO