NVIDIA / NVIDIA/CUDALibrarySamples

Question about leading dimension handling for quantization scales in cuBLASLt matmul

Open
#305 2 comments 0 reactions 1 assignee View on GitHub

@hbabak is already working on this.

Since Feb 12, 2026.

cuBLASLt
Dominant language
Cuda
Stars
2.5k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I have a question regarding how to handle leading dimensions for quantization scales in cuBLASLtMatmul when the input matrices are not tightly packed.

Suppose the leading dimensions of matrices A and B are larger than their logical sizes (M, N, K), i.e., they are strided / padded layouts rather than contiguous M×K or K×N.

For quantized matmul using:

A_scale = CUBLASLT_MATMUL_MATRIX_SCALE_VEC128_32F

B_scale = CUBLASLT_MATMUL_MATRIX_SCALE_BLK128x128_32F

How should the leading dimensions of the corresponding scale tensors be handled?

Specifically:

1.Are scale tensors always expected to be contiguous in memory?

2.Or do scale tensors also support their own leading dimensions / strides similar to matrices A and B?

3.If A or B has padding due to larger leading dimensions, should the scales reflect the padded layout or only the logical tile layout?

I couldn’t find clear documentation on how scale tensor strides relate to matrix strides, so any clarification would be appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.