Skip to content

Commit 83f352f

Browse files
gulfemsavrunyeniceriZuul
authored andcommitted
Fixed the regression caused in luxmark.
If a kernel has some non-inlined functions, check if a group simd size is available. If group simd size is not available, only compile with SIMD8. Otherwise, compile with SIMD8 or SIMD16. Change-Id: I195b8084fc09f5e7c603cfacb6ebb914167c2186
1 parent 96b9a20 commit 83f352f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,20 @@ bool EmitPass::canCompileCurrentShader(llvm::Function& F)
275275
}
276276
else
277277
{
278-
// Can't support SIMD32 due to slicing
279-
return m_SimdMode != SIMDMode::SIMD32;
278+
// Check if there is a required sub group size specified
279+
MetaDataUtils* pMdUtils = getAnalysis<MetaDataUtilsWrapper>().getMetaDataUtils();
280+
FunctionInfoMetaDataHandle funcInfoMD = pMdUtils->getFunctionsInfoItem(&F);
281+
int simd_size = funcInfoMD->getSubGroupSize()->getSIMD_size();
282+
if (simd_size)
283+
{
284+
// Can't support SIMD32 due to slicing
285+
return m_SimdMode != SIMDMode::SIMD32;
286+
}
287+
// If no sub group size is specified, only allow SIMD8
288+
else
289+
{
290+
return m_SimdMode == SIMDMode::SIMD8;
291+
}
280292
}
281293
}
282294
else if(m_moduleMD->compOpt.IsLibraryCompilation == true)

0 commit comments

Comments
 (0)