Skip to content

Commit

Permalink
[Autobackout][FunctionalRegression]Revert of change: 3b07e3f: Set 128…
Browse files Browse the repository at this point in the history
… grf size by default

.
  • Loading branch information
sys-igc authored and igcbot committed Nov 16, 2024
1 parent 99d957e commit 070e5aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,7 @@ static void addKernelAttrsFromMetadata(VISAKernel &Kernel,
Kernel.AddKernelAttribute("NBarrierCnt", sizeof(BarrierCnt), &BarrierCnt);
}

// Default number of registers.
unsigned NumGRF = 128;
int NumGRF = -1;
// Set by compile option.
if (BC->isAutoLargeGRFMode())
NumGRF = 0;
Expand All @@ -962,7 +961,9 @@ static void addKernelAttrsFromMetadata(VISAKernel &Kernel,
if (NumGRFPerKernel == 0 || Subtarget->isValidGRFSize(NumGRFPerKernel))
NumGRF = NumGRFPerKernel;
}
Kernel.AddKernelAttribute("NumGRF", sizeof(NumGRF), &NumGRF);

if (NumGRF != -1)
Kernel.AddKernelAttribute("NumGRF", sizeof(NumGRF), &NumGRF);
}

// Legalize name for using as filename or in visa asm
Expand Down
4 changes: 2 additions & 2 deletions IGC/VectorCompiler/test/CisaBuilder/grf_size.ll
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ define dllexport spir_kernel void @test_auto(i32 %arg) #0 {
ret void
}

; CHECK: .kernel_attr NumGRF=128
; CHECK-NOT: .kernel_attr NumGRF
define dllexport spir_kernel void @test_default(i32 %arg) #0 {
ret void
}

; CHECK: .kernel_attr NumGRF=128
; CHECK-NOT: .kernel_attr NumGRF
define dllexport spir_kernel void @test_invalid(i32 %arg) #0 {
ret void
}
Expand Down

0 comments on commit 070e5aa

Please sign in to comment.