File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -522,6 +522,11 @@ void gtPinData::setScratchNextFree(unsigned next) {
522522 nextScratchFree = ((next + kernel.numEltPerGRF <Type_UB>() - 1 ) / kernel.numEltPerGRF <Type_UB>()) * kernel.numEltPerGRF <Type_UB>();
523523}
524524
525+ unsigned int gtPinData::getScratchNextFree () const
526+ {
527+ return nextScratchFree;
528+ }
529+
525530uint32_t gtPinData::getNumBytesScratchUse () const
526531{
527532 if (gtpin_init)
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ class gtPinData
106106 void * getGTPinInfoBuffer (unsigned &bufferSize);
107107
108108 void setScratchNextFree (unsigned next);
109+ unsigned int getScratchNextFree () const ;
109110
110111 uint32_t getNumBytesScratchUse () const ;
111112
Original file line number Diff line number Diff line change @@ -1870,6 +1870,7 @@ void Optimizer::reRAPostSchedule()
18701870 if (builder.getIsPayload())
18711871 return;
18721872 auto freeGRFsBeforeReRA = gtpin->getNumFreeGlobalRegs();
1873+ auto nextScratchFreeBeforeReRA = gtpin->getScratchNextFree();
18731874
18741875 storeGRFAssignments(kernel.Declares, assignments);
18751876 // This pass is run for gtpin since they need re-allocation after
@@ -1944,6 +1945,7 @@ void Optimizer::reRAPostSchedule()
19441945 computeGlobalFreeGRFs(kernel);
19451946 }
19461947
1948+ gtpin->setScratchNextFree(nextScratchFreeBeforeReRA);
19471949 *builder.getJitInfo() = finalizerInfo;
19481950}
19491951
You can’t perform that action at this time.
0 commit comments