@@ -7151,7 +7151,7 @@ unsigned int getBinOffsetNextBB(G4_Kernel& kernel, G4_BB* bb)
7151
7151
return (unsigned int )(*iter)->getGenOffset ();
7152
7152
}
7153
7153
7154
- uint8_t gtPinData::getNumBytesScratchUse ()
7154
+ uint32_t gtPinData::getNumBytesScratchUse ()
7155
7155
{
7156
7156
if (gtpin_init)
7157
7157
{
@@ -7190,7 +7190,7 @@ void* gtPinData::getGTPinInfoBuffer(unsigned int &bufferSize)
7190
7190
memset (&t, 0 , sizeof (t));
7191
7191
7192
7192
t.version = gtpin::igc::GTPIN_IGC_INTERFACE_VERSION;
7193
- // t.igc_init_size = sizeof(t);
7193
+ t.igc_init_size = sizeof (t);
7194
7194
if (gtpinInitFromL0)
7195
7195
{
7196
7196
if (kernel.getOption (vISA_GetFreeGRFInfo))
@@ -7244,6 +7244,9 @@ void* gtPinData::getGTPinInfoBuffer(unsigned int &bufferSize)
7244
7244
// For payload offsets
7245
7245
numTokens++;
7246
7246
7247
+ // Report #GRFs
7248
+ numTokens++;
7249
+
7247
7250
writeBuffer (buffer, bufferSize, &t, sizeof (t));
7248
7251
writeBuffer (buffer, bufferSize, &numTokens, sizeof (uint32_t ));
7249
7252
@@ -7279,13 +7282,24 @@ void* gtPinData::getGTPinInfoBuffer(unsigned int &bufferSize)
7279
7282
writeBuffer (buffer, bufferSize, &scratchSlotData, sizeof (scratchSlotData));
7280
7283
}
7281
7284
7282
- // Write payload offsets
7283
- gtpin::igc::igc_token_kernel_start_info_t offsets;
7284
- offsets.token = gtpin::igc::GTPIN_IGC_TOKEN_KERNEL_START_INFO;
7285
- offsets.per_thread_prolog_size = getPerThreadNextOff ();
7286
- offsets.cross_thread_prolog_size = getCrossThreadNextOff () - offsets.per_thread_prolog_size ;
7287
- offsets.token_size = sizeof (offsets);
7288
- writeBuffer (buffer, bufferSize, &offsets, sizeof (offsets));
7285
+ {
7286
+ // Write payload offsets
7287
+ gtpin::igc::igc_token_kernel_start_info_t offsets;
7288
+ offsets.token = gtpin::igc::GTPIN_IGC_TOKEN_KERNEL_START_INFO;
7289
+ offsets.per_thread_prolog_size = getPerThreadNextOff ();
7290
+ offsets.cross_thread_prolog_size = getCrossThreadNextOff () - offsets.per_thread_prolog_size ;
7291
+ offsets.token_size = sizeof (offsets);
7292
+ writeBuffer (buffer, bufferSize, &offsets, sizeof (offsets));
7293
+ }
7294
+
7295
+ {
7296
+ // Report num GRFs
7297
+ gtpin::igc::igc_token_num_grf_regs_t numGRFs;
7298
+ numGRFs.token = gtpin::igc::GTPIN_IGC_TOKEN_NUM_GRF_REGS;
7299
+ numGRFs.token_size = sizeof (numGRFs);
7300
+ numGRFs.num_grf_regs = kernel.getNumRegTotal ();
7301
+ writeBuffer (buffer, bufferSize, &numGRFs, sizeof (numGRFs));
7302
+ }
7289
7303
7290
7304
void * gtpinBuffer = allocCodeBlock (bufferSize);
7291
7305
0 commit comments