Skip to content

Commit f1f6a1e

Browse files
Jay-Jiewu-Lusys_zuul
authored andcommitted
minor refactor
Change-Id: I27a77b1d6e100c6e9dbb4461ed7ef6d547b00744
1 parent a74490c commit f1f6a1e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ namespace IGC
391391
return m_platformInfo.eRenderCoreFamily >= IGFX_GEN11_CORE && IGC_IS_FLAG_ENABLED(EnableIntegerMad);
392392
}
393393

394+
unsigned int getMaxNumberHWThreadForEachWG() const
395+
{
396+
return getMaxNumberThreadPerSubslice();
397+
}
398+
394399
// ***** Below go accessor methods for testing WA data from WA_TABLE *****
395400

396401
bool WaDoNotPushConstantsForAllPulledGSTopologies() const

IGC/Compiler/CISACodeGen/helper.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,10 @@ namespace IGC
370370

371371
inline unsigned GetHwThreadsPerWG(const IGC::CPlatform& platform)
372372
{
373-
unsigned hwThreadPerWorkgroup = platform.getMaxNumberThreadPerSubslice();
374-
373+
unsigned hwThreadPerWorkgroup = platform.getMaxNumberHWThreadForEachWG();
375374
if (platform.supportPooledEU())
376375
{
377-
hwThreadPerWorkgroup = platform.getMaxNumberThreadPerWorkgroupPooledMax();
376+
hwThreadPerWorkgroup = std::min(platform.getMaxNumberThreadPerWorkgroupPooledMax(), (unsigned)64);
378377
}
379378
return hwThreadPerWorkgroup;
380379
}
@@ -385,8 +384,7 @@ namespace IGC
385384
{
386385
hwThreadPerWorkgroup = 42; //On GT1 HW, there are 7 threads/EU and 6 EU/subslice, 42 is the minimum threads/workgroup any HW can support
387386
}
388-
if ((threadGroupSize <= hwThreadPerWorkgroup * 8) &&
389-
threadGroupSize <= 512)
387+
if (threadGroupSize <= hwThreadPerWorkgroup * 8)
390388
{
391389
return SIMDMode::SIMD8;
392390
}

0 commit comments

Comments
 (0)