Skip to content

Commit 1283e0c

Browse files
jgu222igcbot
authored andcommitted
CS loacl id uniform
Only do uniform analysis for cs local IDs when it is linear walkOrder and ID layout is linear. Skip TileY and QuadTile as their semantice and implmentation needs to be clarified first.
1 parent 82a6156 commit 1283e0c

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

IGC/Compiler/CISACodeGen/WIAnalysis.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,6 +2100,14 @@ void WIAnalysisRunner::CS_checkLocalIDs(Function *F)
21002100
IGC_IS_FLAG_DISABLED(OverrideCsTileLayoutEnable))
21012101
return;
21022102

2103+
auto walkOrder = (CS_WALK_ORDER)IGC_GET_FLAG_VALUE(OverrideCsWalkOrder);
2104+
auto idLayout = (ThreadIDLayout)IGC_GET_FLAG_VALUE(OverrideCsTileLayout);
2105+
if (idLayout == ThreadIDLayout::TileY ||
2106+
idLayout == ThreadIDLayout::QuadTile) {
2107+
// Need clarification on semantics. Skip for now.
2108+
return;
2109+
}
2110+
21032111
Module *M = F->getParent();
21042112
uint32_t X = 0, Y = 0, Z = 0;
21052113
if (GlobalVariable *pX = M->getGlobalVariable("ThreadGroupSize_X")) {
@@ -2130,8 +2138,6 @@ void WIAnalysisRunner::CS_checkLocalIDs(Function *F)
21302138
m_localIDzUniform = true;
21312139
}
21322140

2133-
auto walkOrder = (CS_WALK_ORDER)IGC_GET_FLAG_VALUE(OverrideCsWalkOrder);
2134-
auto idLayout = (ThreadIDLayout)IGC_GET_FLAG_VALUE(OverrideCsTileLayout);
21352141
constexpr uint32_t simdSize = 32;
21362142
if (idLayout == ThreadIDLayout::X)
21372143
{
@@ -2194,15 +2200,6 @@ void WIAnalysisRunner::CS_checkLocalIDs(Function *F)
21942200
}
21952201
return;
21962202
}
2197-
2198-
bool isTileY = (idLayout == ThreadIDLayout::TileY &&
2199-
walkOrder == CS_WALK_ORDER::WO_YXZ);
2200-
bool isQuadTile = (idLayout == ThreadIDLayout::QuadTile &&
2201-
walkOrder == CS_WALK_ORDER::WO_XYZ);
2202-
if ((isTileY || isQuadTile) && ((X * Y) % simdSize) == 0) {
2203-
// combination of first and second dims is multiple of simd siz
2204-
m_localIDzUniform = true;
2205-
}
22062203
}
22072204

22082205
// Set IsLxUniform/IsLyUniform/IsLxUniform to true if they are uniform;

0 commit comments

Comments
 (0)