Skip to content

Commit

Permalink
Changes in code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sodment authored and igcbot committed Aug 30, 2024
1 parent ec4c755 commit ba1357c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion IGC/Compiler/CISACodeGen/CISABuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5644,7 +5644,7 @@ namespace IGC
// and Slot0 is used for IGC private memory
if (m_program->m_Platform->hasScratchSurface() &&
m_program->m_DriverInfo->supportsSeparatingSpillAndPrivateScratchMemorySpace() &&
!m_program->GetContext()->getModuleMetaData()->disableSeparateSpillPvtScratchSpace)
m_program->GetContext()->getModuleMetaData()->enableSeparateSpillPvtScratchSpace)
{
V(vKernel->AddKernelAttribute("SepSpillPvtSS", 0, nullptr));
}
Expand Down
4 changes: 2 additions & 2 deletions IGC/Compiler/CISACodeGen/CShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CShader::CShader(Function* pFunc, CShaderProgram* pProgram)

bool SepSpillPvtSS = m_ctx->platform.hasScratchSurface() &&
m_ctx->m_DriverInfo.supportsSeparatingSpillAndPrivateScratchMemorySpace() &&
!m_ctx->getModuleMetaData()->disableSeparateSpillPvtScratchSpace;
m_ctx->getModuleMetaData()->enableSeparateSpillPvtScratchSpace;
bool SeparateScratchWA =
IGC_IS_FLAG_ENABLED(EnableSeparateScratchWA) &&
!m_ctx->getModuleMetaData()->disableSeparateScratchWA;
Expand Down Expand Up @@ -4081,7 +4081,7 @@ bool CShader::CompileSIMDSizeInCommon(SIMDMode simdMode)

if (m_ctx->platform.hasScratchSurface() &&
m_ctx->m_DriverInfo.supportsSeparatingSpillAndPrivateScratchMemorySpace() &&
!m_ctx->getModuleMetaData()->disableSeparateSpillPvtScratchSpace)
m_ctx->getModuleMetaData()->enableSeparateSpillPvtScratchSpace)
{
ret = ((m_simdProgram.getScratchSpaceUsageInSlot0() <= maxPerThreadScratchSpace) &&
(m_simdProgram.getScratchSpaceUsageInSlot1() <= maxPerThreadScratchSpace));
Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/ModuleAllocaAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ bool ModuleAllocaAnalysis::safeToUseScratchSpace() const
// which can hold more pvt_data to avoid error out.
if (Ctx.platform.hasScratchSurface() &&
Ctx.m_DriverInfo.supportsSeparatingSpillAndPrivateScratchMemorySpace() &&
!Ctx.getModuleMetaData()->disableSeparateSpillPvtScratchSpace &&
Ctx.getModuleMetaData()->enableSeparateSpillPvtScratchSpace &&
!supportsStatelessSpacePrivateMemory)
simd_size = numLanes(Ctx.platform.getMinDispatchMode());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ attributes #0 = { convergent nounwind }
!292 = !{!"statefulResourcesNotAliased", i1 false}
!293 = !{!"disableMixMode", i1 false}
!294 = !{!"genericAccessesResolved", i1 false}
!295 = !{!"disableSeparateSpillPvtScratchSpace", i1 false}
!295 = !{!"enableSeparateSpillPvtScratchSpace", i1 false}
!296 = !{!"disableSeparateScratchWA", i1 false}
!297 = !{!"PrivateMemoryPerFG", !298, !299}
!298 = !{!"PrivateMemoryPerFGMap[0]", void (<8 x i32>, <8 x i32>)* @test}
Expand Down
2 changes: 1 addition & 1 deletion IGC/Compiler/tests/EmitVISAPass/wavebarrier.ll
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ attributes #0 = { convergent nounwind }
!292 = !{!"statefulResourcesNotAliased", i1 false}
!293 = !{!"disableMixMode", i1 false}
!294 = !{!"genericAccessesResolved", i1 false}
!295 = !{!"disableSeparateSpillPvtScratchSpace", i1 false}
!295 = !{!"enableSeparateSpillPvtScratchSpace", i1 false}
!296 = !{!"disableSeparateScratchWA", i1 false}
!297 = !{!"PrivateMemoryPerFG", !298, !299}
!298 = !{!"PrivateMemoryPerFGMap[0]", void (<8 x i32>, <8 x i32>)* @test}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ attributes #6 = { argmemonly nounwind writeonly }
!324 = !{!"statefulResourcesNotAliased", i1 false}
!325 = !{!"disableMixMode", i1 false}
!326 = !{!"genericAccessesResolved", i1 false}
!327 = !{!"disableSeparateSpillPvtScratchSpace", i1 false}
!327 = !{!"enableSeparateSpillPvtScratchSpace", i1 false}
!328 = !{!"disableSeparateScratchWA", i1 false}
!329 = !{!"PrivateMemoryPerFG", !330, !331}
!330 = !{!"PrivateMemoryPerFGMap[0]", void (<3 x i64> addrspace(1)*, i64 addrspace(1)*, <8 x i32>, <8 x i32>, <3 x i32>, i16, i16, i16, i8*, i32, i32, i32, i32)* @test_kernel}
Expand Down
4 changes: 2 additions & 2 deletions IGC/common/MDFrameWork.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ namespace IGC
// some memory accesses.
bool genericAccessesResolved = false;

//when true, compiler disables separate spill pvt scratch space
bool disableSeparateSpillPvtScratchSpace = false;
//when true, compiler separates spill and IGC private scratch spaces
bool enableSeparateSpillPvtScratchSpace = false;

//when true, compiler disables scratch space slot0/slot1 sizes workaround
bool disableSeparateScratchWA = false;
Expand Down

0 comments on commit ba1357c

Please sign in to comment.