mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Add debug flag to dump dispatch parameters.
- Also refactor debug manager tests , they now check for default value in igdrcl.config file - There is no need to write dedicated tests now , so I remove them. Change-Id: Ib338ca05b6059302c29469c673239e7886dc4b9b
This commit is contained in:
committed by
sys_ocldev
parent
76dd4ac1f3
commit
7644209288
@@ -158,6 +158,15 @@ cl_int CommandQueueHw<GfxFamily>::enqueueKernel(
|
||||
return err;
|
||||
}
|
||||
|
||||
DBG_LOG(PrintDispatchParameters, "Kernel: ", kernel.getKernelInfo().name,
|
||||
",LWS:, ", localWorkSizeIn ? localWorkSizeIn[0] : 0,
|
||||
",", localWorkSizeIn ? localWorkSizeIn[1] : 0,
|
||||
",", localWorkSizeIn ? localWorkSizeIn[2] : 0,
|
||||
",GWS:,", globalWorkSizeIn[0],
|
||||
",", globalWorkSizeIn[1],
|
||||
",", globalWorkSizeIn[2],
|
||||
",SIMD:, ", kernel.getKernelInfo().getMaxSimdSize());
|
||||
|
||||
enqueueHandler<CL_COMMAND_NDRANGE_KERNEL>(
|
||||
surfaces,
|
||||
false,
|
||||
|
||||
@@ -43,6 +43,7 @@ DECLARE_DEBUG_VARIABLE(bool, ResidencyDebugEnable, 0, "enables debug messages an
|
||||
DECLARE_DEBUG_VARIABLE(bool, EventsDebugEnable, 0, "enables debug messages for events, virtual events, blocked enqueues, events trees etc.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintEMDebugInformation, false, "prints execution model related debug information")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintLWSSizes, false, "prints driver choosen local workgroup sizes")
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintDispatchParameters, false, "prints dispatch paramters of kernels passed to clEnqueueNDRangeKernel")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, PrintDriverDiagnostics, -1, "prints driver diagnostics messages to standard output, value corresponds to hint level")
|
||||
/*PERFORMANCE FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(bool, EnableNullHardware, false, "works on Windows only, sets the Null Hardware flag that makes all Command buffers completed while GPU does nothing")
|
||||
@@ -55,9 +56,9 @@ DECLARE_DEBUG_VARIABLE(bool, UseNewHeapAllocator, true, "Custom 4GB heap allocat
|
||||
DECLARE_DEBUG_VARIABLE(bool, UseNoRingFlushesKmdMode, true, "Windows only, passes flag to KMD that informs KMD to not emit any ring buffer flushes.")
|
||||
/*SIMULATION FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, SetCommandStreamReceiver, 0, "Set command stream receiver")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, TbxServer, "127.0.0.1", "TCP-IP address of TBX server")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, TbxServer, std::string("127.0.0.1"), "TCP-IP address of TBX server")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, TbxPort, 4321, "TCP-IP port of TBX server")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ProductFamilyOverride, "unk", "Specify product for use in AUB/TBX")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ProductFamilyOverride, std::string("unk"), "Specify product for use in AUB/TBX")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableAUBBufferDump, false, "Avoid dumping buffers in AUB files")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableAUBImageDump, false, "Avoid dumping images in AUB files")
|
||||
DECLARE_DEBUG_VARIABLE(bool, FlattenBatchBufferForAUBDump, false, "Dump multi-level batch buffers to AUB as single, flat batch buffer")
|
||||
|
||||
@@ -665,11 +665,3 @@ TEST(localWorkSizeTest, givenMaxWorkgroupSizeEqualToSimdSizeWhenLwsIsCalculatedT
|
||||
EXPECT_EQ(workGroupSize[1], 1u);
|
||||
EXPECT_EQ(workGroupSize[2], 1u);
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenDebugVariableEnableComputeWorkSizeNDWhenCheckValueExpectTrue) {
|
||||
EXPECT_TRUE(DebugManager.flags.EnableComputeWorkSizeND.get());
|
||||
}
|
||||
|
||||
TEST(localWorkSizeTest, givenDefaultDebugVariablesWhenEnableComputeWorkSizeSquaredIsCheckdThenTrueIsReturned) {
|
||||
EXPECT_FALSE(DebugManager.flags.EnableComputeWorkSizeSquared.get());
|
||||
}
|
||||
@@ -29,7 +29,3 @@ using namespace OCLRT;
|
||||
TEST(debugBreak, whenDebugBreakCalledInTestThenNothingIsThrown) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
}
|
||||
|
||||
TEST(debugBreak, givenEnableDebugBreakWhenFlagIsEnabledThenReturnTrue) {
|
||||
EXPECT_EQ(true, DebugManager.flags.EnableDebugBreak.get());
|
||||
}
|
||||
|
||||
@@ -109,7 +109,3 @@ TEST(BufferTests, doPinIsSetForHostPtr) {
|
||||
alignedFree(bff);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(BufferTests, ForcePinFlagIsTrue) {
|
||||
EXPECT_TRUE(DebugManager.flags.EnableForcePin.get());
|
||||
}
|
||||
|
||||
@@ -40,10 +40,6 @@ class MyCsr : public UltCommandStreamReceiver<Family> {
|
||||
void CL_CALLBACK emptyDestructorCallback(cl_mem memObj, void *userData) {
|
||||
}
|
||||
|
||||
TEST(MemObjDebugFlags, givenDefaultDebugFlagsWhenMemObjDestructorIsCalledThenMemObjDestroysAllocationsSynchronously) {
|
||||
EXPECT_TRUE(DebugManager.flags.EnableAsyncDestroyAllocations.get());
|
||||
}
|
||||
|
||||
class MemObjDestructionTest : public ::testing::TestWithParam<bool> {
|
||||
public:
|
||||
void SetUp() override {
|
||||
|
||||
@@ -20,8 +20,8 @@ Force32bitAddressing = 0
|
||||
InitializeMemoryInDebug = 16
|
||||
UseNewHeapAllocator = 1
|
||||
EnableVaLibCalls = 1
|
||||
EnableNV12 = 0
|
||||
EnablePackedYuv = 0
|
||||
EnableNV12 = 1
|
||||
EnablePackedYuv = 1
|
||||
EnableIntelVme = 1
|
||||
EnableAdvancedIntelVme = 1
|
||||
DisableStatelessToStatefulOptimization = 0
|
||||
@@ -35,14 +35,14 @@ EnableStatelessToStatefulBufferOffsetOpt = 0
|
||||
TbxPort = 4321
|
||||
TbxServer = 127.0.0.1
|
||||
EnableDeferredDeleter = 1
|
||||
EnableAsyncDestroyAllocations = 0
|
||||
EnableAsyncDestroyAllocations = 1
|
||||
EnableAsyncEventsHandler = 1
|
||||
EnableForcePin = false
|
||||
CsrDispatchMode = 0
|
||||
OverrideEnableKmdNotify = -1
|
||||
OverrideKmdNotifyDelayMs = -1
|
||||
Enable64kbpages = -1
|
||||
NodeOrdinal = 0
|
||||
NodeOrdinal = -1
|
||||
ProductFamilyOverride = unk
|
||||
EnableDebugBreak = true
|
||||
EnableComputeWorkSizeND = true
|
||||
@@ -57,3 +57,4 @@ UseNoRingFlushesKmdMode = false
|
||||
OverrideThreadArbitrationPolicy = -1
|
||||
PrintDriverDiagnostics = -1
|
||||
FlattenBatchBufferForAUBDump = false
|
||||
PrintDispatchParameters = false
|
||||
|
||||
@@ -71,14 +71,17 @@ TEST(SettingsFileReader, CreateFileReaderWithoutFile) {
|
||||
EXPECT_EQ(0u, reader->getStringSettingsCount());
|
||||
}
|
||||
|
||||
TEST(SettingsFileReader, CreateFileReaderWithSettingsFile) {
|
||||
TEST(SettingsFileReader, givenTestFileWithDefaultValuesWhenTheyAreQueriedThenDefaultValuesMatch) {
|
||||
|
||||
// Use test settings file
|
||||
std::unique_ptr<TestSettingsFileReader> reader = unique_ptr<TestSettingsFileReader>(new TestSettingsFileReader(TestSettingsFileReader::testPath));
|
||||
ASSERT_NE(nullptr, reader);
|
||||
|
||||
size_t debugVariableCount = 0;
|
||||
#define DECLARE_DEBUG_VARIABLE(dataType, variableName, defaultValue, description) \
|
||||
bool compareSuccessful = false;
|
||||
#define DECLARE_DEBUG_VARIABLE(dataType, variableName, defaultValue, description) \
|
||||
compareSuccessful = defaultValue == reader->getSetting(#variableName, defaultValue); \
|
||||
EXPECT_TRUE(compareSuccessful) << #variableName; \
|
||||
debugVariableCount++;
|
||||
#include "runtime/os_interface/DebugVariables.inl"
|
||||
#undef DECLARE_DEBUG_VARIABLE
|
||||
|
||||
Reference in New Issue
Block a user