Skip to content

Commit 81b480d

Browse files
mmereckiigcbot
authored andcommitted
Add shader metadata for extra GRFs for latency scheduling
New metadata field to allow setting extra GRFs to be used for latency scheduling.
1 parent 7106daa commit 81b480d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3622,6 +3622,9 @@ void CEncoder::InitVISABuilderOptions(TARGET_PLATFORM VISAPlatform, bool canAbor
36223622

36233623
if (uint32_t Val = IGC_GET_FLAG_VALUE(VISAPreSchedExtraGRF)) {
36243624
SaveOption(vISA_preRA_ScheduleExtraGRF, Val);
3625+
} else if (context->type == ShaderType::COMPUTE_SHADER &&
3626+
context->getModuleMetaData()->csInfo.VISAPreSchedScheduleExtraGRF > 0) {
3627+
SaveOption(vISA_preRA_ScheduleExtraGRF, context->getModuleMetaData()->csInfo.VISAPreSchedScheduleExtraGRF);
36253628
}
36263629

36273630
if (uint32_t Val = IGC_GET_FLAG_VALUE(VISAScheduleStartBBID)) {

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ enum class ShaderTypeMD
537537
unsigned int forceTotalGRFNum = 0; // 0 means not forced
538538
unsigned int VISAPreSchedRPThreshold = 0; // 0 means use the default
539539
unsigned int VISAPreSchedCtrl = 0; // 0 means use the default
540+
unsigned int VISAPreSchedScheduleExtraGRF = 0; // additional GRF for latency scheduling
540541
unsigned int SetLoopUnrollThreshold = 0; // 0 means use the default
541542
bool forceSpillCompression = false;
542543
bool allowLowerSimd = false;

0 commit comments

Comments
 (0)