Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
SWDEV-382359 - Workaround a non-uniform launch in MIOpen
Browse files Browse the repository at this point in the history
Change-Id: Idee06494a67e641301890863b376d9ef5965837d
  • Loading branch information
gandryey authored and gargrahul committed Mar 28, 2023
1 parent bb2b6bb commit c1741e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hip_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
if (status != hipSuccess) {
return status;
}

// Make sure the app doesn't launch a workgroup bigger than the global size
if (globalWorkSizeX < blockDimX) blockDimX = globalWorkSizeX;
if (globalWorkSizeY < blockDimY) blockDimY = globalWorkSizeY;
if (globalWorkSizeZ < blockDimZ) blockDimZ = globalWorkSizeZ;

amd::Command* command = nullptr;
amd::HostQueue* queue = hip::getQueue(hStream);
status = ihipLaunchKernelCommand(command, f, globalWorkSizeX, globalWorkSizeY, globalWorkSizeZ,
Expand Down

0 comments on commit c1741e9

Please sign in to comment.