Skip to content

Commit d8e3194

Browse files
PawelJureksys_zuul
authored andcommitted
Flag to override the value imposed on the kernel by CL_DEVICE_MAX_PARAMETER_SIZE.
Change-Id: I55b72ac20b6a01a7ffbeabb6664febd45f764db3
1 parent 8d40bbf commit d8e3194

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ CPlatform(PLATFORM platform) {
5353
CPlatform() {}
5454

5555
void setOclCaps(OCLCaps& caps) { m_OCLCaps = caps; }
56-
uint32_t getMaxOCLParameteSize() const { return m_OCLCaps.MaxParameterSize; }
56+
uint32_t getMaxOCLParameteSize() const {
57+
uint32_t limitFromFlag = IGC_GET_FLAG_VALUE(OverrideOCLMaxParamSize);
58+
return limitFromFlag ? limitFromFlag : m_OCLCaps.MaxParameterSize;
59+
}
5760
void OverrideRevId(unsigned short newRevId)
5861
{
5962
m_platformInfo.usRevId = newRevId;

IGC/common/igc_flags.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ DECLARE_IGC_REGKEY(bool, EmitDebugRanges, false, "Emit .debug_ranges section whe
410410
DECLARE_IGC_REGKEY(bool, EmitDebugLoc, false, "Enable generation of .debug_loc section", false)
411411
DECLARE_IGC_REGKEY(bool, EnableA64WA, true, "Guarantee A64 load/store addres-hi is uniform", false)
412412
DECLARE_IGC_REGKEY(bool, EnableZEBinary, false, "Enable output in ZE binary format", true)
413+
DECLARE_IGC_REGKEY(bool, OverrideOCLMaxParamSize, 0, "Override the value imposed on the kernel by CL_DEVICE_MAX_PARAMETER_SIZE. Value in bytes, if value==0 no override happens.", true)
413414

414415
DECLARE_IGC_GROUP("Generating precompiled headers")
415416
DECLARE_IGC_REGKEY(bool, ApplyConservativeRastWAHeader, true, "Apply WaConservativeRasterization for the platforms enabled", false)

0 commit comments

Comments
 (0)