Skip to content

Commit

Permalink
Add GPU_WARP_SIZE_HOST in threads dim constructor.
Browse files Browse the repository at this point in the history
Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
  • Loading branch information
jagadish-amd committed Sep 10, 2024
1 parent 011cecd commit 7b5180f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions onnxruntime/contrib_ops/cuda/quantization/matmul_nbits.cu
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,8 @@ bool TryMatMul4Bits(
if (n % kColsPerThreadBlock != 0 || k % 8 != 0 || m > 1) {
return false;
}
const int kWarpSize = GPU_WARP_SIZE_HOST;
dim3 blocks((n + kColsPerThreadBlock - 1) / kColsPerThreadBlock, m);
dim3 threads(kWarpSize, kColsPerThreadBlock);
dim3 threads(GPU_WARP_SIZE_HOST, kColsPerThreadBlock);
int blocks_per_K = (k + block_size - 1) / block_size;
int shared_mem_size = sizeof(T) * blocks_per_K * kColsPerThreadBlock +
(zero_points != nullptr ? (blocks_per_K + 1) / 2 * kColsPerThreadBlock * 2 : 0);
Expand Down

0 comments on commit 7b5180f

Please sign in to comment.