P4 to Git Change 1524559 by asalmanp@asalmanp-ocl-stg on 2018/03/08 14:18:24
SWDEV-132899 - [gfx10][OCL]- Adding support for forcing WaveSize32 from runtime for testing on gfx10 HW emulator
Motivation: During testing ocltst on Windows on PAL/HSAIL/SC path on gfx10 HW emulator, it was found that SC uses WaveSize64 by default for compute kernels.
SC also has an interface that can be used for forcing the WaveSize to 32 or 64.
- Adding the "-force-wave-size-32" into compiler to be passed down to Finalizer/SC
- Adding environment variable "GPU_FORCE_WAVE_SIZE_32" that can be used from runtime to force WaveSize32 compilation in HSAIL/SC path
ReviewBoardURL = http://ocltc.amd.com/reviews/r/14364/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#138 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#284 edit
[ROCm/clr commit: 3c0e80074b]
This commit is contained in:
@@ -1226,6 +1226,15 @@ OPTION(OT_BOOL, \
|
||||
false, 0, 0, NULL, \
|
||||
"Do round-trip translation of SPIR-V in pre-linking for testing purpose.")
|
||||
|
||||
// -force-wave-size-32
|
||||
OPTION(OT_BOOL, \
|
||||
OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED|OFA_NORMAL, \
|
||||
"force-wave-size-32", NULL, \
|
||||
SCForceWaveSize32, \
|
||||
false, 0, 0, NULL, \
|
||||
"Force wave size 32 for compute shader compilation")
|
||||
|
||||
|
||||
/*
|
||||
Do not remove the following line. Any option should be
|
||||
added above this line.
|
||||
|
||||
@@ -598,6 +598,10 @@ bool HSAILProgram::linkImpl(amd::option::Options* options) {
|
||||
if (dev().settings().svmFineGrainSystem_) {
|
||||
fin_options.append(" -sc-xnack-iommu");
|
||||
}
|
||||
if (dev().settings().gfx10Plus_ && GPU_FORCE_WAVE_SIZE_32) {
|
||||
fin_options.append(" -force-wave-size-32");
|
||||
}
|
||||
|
||||
errorCode = aclCompile(dev().compiler(), binaryElf_, fin_options.c_str(), ACL_TYPE_CG,
|
||||
ACL_TYPE_ISA, nullptr);
|
||||
buildLog_ += aclGetCompilerLog(dev().compiler());
|
||||
|
||||
@@ -213,6 +213,9 @@ release_on_stg(bool, PAL_DISABLE_SDMA, false, \
|
||||
"1 = Disable SDMA for PAL") \
|
||||
release_on_stg(uint, PAL_RGP_DISP_COUNT, 10, \
|
||||
"The number of dispatches for RGP capture with SQTT") \
|
||||
release(bool, GPU_FORCE_WAVE_SIZE_32, false, \
|
||||
"Forces WaveSize32 compilation in SC") \
|
||||
|
||||
|
||||
namespace amd {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user