-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matmul_nbits: Use GPU_WARP_SIZE_HOST for host side code #65
matmul_nbits: Use GPU_WARP_SIZE_HOST for host side code #65
Conversation
For ROCm device, the host side code needs to call GPU_WARP_SIZE_HOST to query warpsize of the underlying GPU device. Fixes MatMulNBits tests on Navi. Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
@@ -288,6 +288,7 @@ bool TryMatMul4Bits( | |||
if (n % kColsPerThreadBlock != 0 || k % 8 != 0 || m > 1) { | |||
return false; | |||
} | |||
const int kWarpSize = GPU_WARP_SIZE_HOST; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a #if around this via how we handle things with USE_ROCM and USE_MIGRAPHX
#if USE_MIGRAPHX || USE_ROCM
const int kWarpSize = GPU_WARP_SIZE_HOST;
#endif
That way if once we upstream this change it wouldn't break another EP if this is specific to AMD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to ifdef protect this. CUDA EP also defines GPU_WARP_SIZE_HOST for this reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah then my real curiosity is why redefine it here then if that's the case?
@@ -288,6 +288,7 @@ bool TryMatMul4Bits( | |||
if (n % kColsPerThreadBlock != 0 || k % 8 != 0 || m > 1) { | |||
return false; | |||
} | |||
const int kWarpSize = GPU_WARP_SIZE_HOST; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to ifdef protect this. CUDA EP also defines GPU_WARP_SIZE_HOST for this reason.
Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
d7e1c61
into
ROCm:rocm6.3_internal_testing
@jagadish-amd please file upstream PR for same change. |
For ROCm device, the host side code needs to call GPU_WARP_SIZE_HOST to query warpsize of the underlying GPU device.
Fixes MatMulNBits tests on Navi.