Add SchedulerGWS debug variable

- SchedulerGWS forces gws for scheduler kernel - useful when using
TBX server
- Fix misaligned scattered write in scheduler kernel when
SchedulerSimulationReturnInstance is set to value > 1
- Fix copy_test_files dependecy - modification of files in test_files
triggers copy_test_files targets

Change-Id: Ieee2ddec67f6c61ab942d764c7ad076b3b6ca887
This commit is contained in:
Hoppe, Mateusz
2018-06-06 11:38:45 +02:00
committed by sys_ocldev
parent 3bfbcad8c6
commit 52209b5487
6 changed files with 28 additions and 6 deletions

View File

@ -30,6 +30,7 @@ DECLARE_DEBUG_VARIABLE(bool, AddPatchInfoCommentsForAUBDump, false, "Dump commen
/*DEBUG FLAGS*/
DECLARE_DEBUG_VARIABLE(int32_t, InitializeMemoryInDebug, 0x10, "Memory initialization in debug")
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerSimulationReturnInstance, 0, "prints execution model related debug information")
DECLARE_DEBUG_VARIABLE(int32_t, SchedulerGWS, 0, "Forces gws of scheduler kernel, only multiple of 24 allowed or 0 - default selected")
DECLARE_DEBUG_VARIABLE(bool, EnableDebugBreak, true, "Enable DEBUG_BREAKs")
DECLARE_DEBUG_VARIABLE(bool, FlushAllCaches, false, "pipe controls between enqueues flush all possible caches")
DECLARE_DEBUG_VARIABLE(bool, MakeEachEnqueueBlocking, false, "equivalent of finish after each enqueue")

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -2838,7 +2838,8 @@ void SchedulerParallel20(
secondaryBatchBuffer[ DwordOffset ] = OCLRT_BATCH_BUFFER_BEGIN_CMD_DWORD0;
DwordOffset++;
//BB_START 2nd DWORD - Address, 3rd DWORD Address high
*( ( __global ulong * )&secondaryBatchBuffer[ DwordOffset ] ) = pQueue->m_controls.m_CleanupSectionAddress;
secondaryBatchBuffer[ DwordOffset++ ] = (uint)(pQueue->m_controls.m_CleanupSectionAddress & 0xFFFFFFFF);
secondaryBatchBuffer[ DwordOffset ] = (uint)((pQueue->m_controls.m_CleanupSectionAddress >> 32) & 0xFFFFFFFF);
}
return;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -61,5 +61,10 @@ void SchedulerKernel::computeGws() {
wkgsPerSubSlice = std::min(wkgsPerSubSlice, helper.getMaxBarrierRegisterPerSlice());
gws = wkgsPerSubSlice * hwInfo.pSysInfo->SubSliceCount * PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
if (DebugManager.flags.SchedulerGWS.get() != 0) {
DEBUG_BREAK_IF(DebugManager.flags.SchedulerGWS.get() % 24 != 0);
gws = DebugManager.flags.SchedulerGWS.get();
}
}
} // namespace OCLRT

View File

@ -132,6 +132,7 @@ function(neo_copy_test_files target product)
COMMAND echo copying test files from ${IGDRCL_SOURCE_DIR}/unit_tests/test_files to ${outputdir}/test_files
COMMAND ${CMAKE_COMMAND} -E copy_directory ${IGDRCL_SOURCE_DIR}/unit_tests/test_files ${outputdir}/test_files
COMMAND WORKING_DIRECTORY ${TargetDir}
DEPENDS ${IGDRCL_SOURCE_DIR}/unit_tests/test_files
)
add_dependencies(${target} copy_compiler_files)
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TARGETS_FOLDER}/${product}")

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -259,4 +259,17 @@ TEST(SchedulerKernelTest, getCurbeSizeWithNullKernelInfo) {
uint32_t expectedCurbeSize = alignUp(SCHEDULER_DYNAMIC_PAYLOAD_SIZE, 64);
EXPECT_GE((size_t)expectedCurbeSize, kernel.getCurbeSize());
}
}
TEST(SchedulerKernelTest, givenForcedSchedulerGwsByDebugVariableWhenSchedulerKernelIsCreatedThenGwsIsSetToForcedValue) {
DebugManagerStateRestore dbgRestorer;
DebugManager.flags.SchedulerGWS.set(48);
MockProgram program;
MockDevice device(*platformDevices[0]);
KernelInfo info;
MockSchedulerKernel kernel(&program, info, device);
size_t gws = kernel.getGws();
EXPECT_EQ(static_cast<size_t>(48u), gws);
}

View File

@ -62,4 +62,5 @@ FlattenBatchBufferForAUBDump = false
PrintDispatchParameters = false
AddPatchInfoCommentsForAUBDump = false
HwQueueSupported = false
DisableZeroCopyForUseHostPtr = false
DisableZeroCopyForUseHostPtr = false
SchedulerGWS = 0