Skip to content

Commit a218bdd

Browse files
fix(tensilelite): revert Stream-K launch limit changes (#12022)
Revert the Stream-K launch limit changes from #11518. TheRock Multi-Arch CI showed that the rocm-libraries #8183 bump failed the standard TensileLite test job on both gfx94X and gfx950. Restoring the three files changed by #11518 on top of that failing pin made both targeted jobs pass. Fixes #12021
1 parent b99d0fb commit a218bdd

3 files changed

Lines changed: 120 additions & 252 deletions

File tree

projects/hipblaslt/tensilelite/src/ContractionSolution.cpp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5454,9 +5454,7 @@ namespace TensileLite
54545454
{
54555455
// Limit workgroups per CU to 3
54565456
// TODO Verify this limit is best
5457-
const size_t occupancy
5458-
= std::max(self.sizeMapping.CUOccupancy, static_cast<int>(1));
5459-
auto kernelOccupancy = std::min(occupancy, size_t{3});
5457+
auto kernelOccupancy = std::min(self.sizeMapping.CUOccupancy, 3);
54605458
auto maxGrid = cuCount * kernelOccupancy;
54615459
if(pAMDGPU->skMaxCUs > 0)
54625460
{
@@ -5680,22 +5678,11 @@ namespace TensileLite
56805678
{
56815679
size_t itersPerTile = problem.getItersPerTile(self.sizeMapping);
56825680
size_t itersPerWG = tiles * itersPerTile / skGrid;
5683-
// numWorkItems = skGrid * threadsPerWorkGroup
5684-
// the largest grid this fallback can express is
5685-
// UINT32_MAX / threadsPerWorkGroup -- 2^24 tiles at 256 threads
5686-
// but 2^25 at 128 and 2^22 at 1024.
5687-
const size_t threadsPerWorkGroup = self.sizeMapping.workGroupSize.x
5688-
* self.sizeMapping.workGroupSize.y
5689-
* self.sizeMapping.workGroupSize.z;
5690-
const size_t maxTiles = (size_t{std::numeric_limits<uint32_t>::max()} + 1)
5691-
/ std::max(threadsPerWorkGroup, size_t{1});
56925681

56935682
if(itersPerTile >= 65536 || itersPerWG >= 65536
5694-
|| (tiles * itersPerTile) >= maxTiles)
5683+
|| (tiles * itersPerTile) >= 16777216)
56955684
{
5696-
const size_t occupancy
5697-
= std::max(self.sizeMapping.CUOccupancy, static_cast<int>(1));
5698-
skGrid = (tiles >= maxTiles) ? cuCount * occupancy : tiles;
5685+
skGrid = tiles;
56995686
if(outTreeBoundsFallback)
57005687
*outTreeBoundsFallback = true;
57015688
}

0 commit comments

Comments
 (0)