NVIDIA / NVIDIA/cutlass

[BUG] nvpf4 tensor creation looks incorrect

Open
#3,057 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage bug CuTe DSL inactive-30d inactive-90d
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

Which component has the problem?

CuTe DSL

Bug Report

Describe the bug
The functions used for creating tensors , create_tensors_abc_for_all_groups () and create_tensor_and_stride () , in cutlass/examples/python/CuTeDSL/blackwell/grouped_blockscaled_gemm.py seem incorrect for cutlass.Float4E2M1FN and torch.float4_e2m1fn_x2. The 4 bit packing does not appear to have been coded.

Steps/Code to reproduce bug
See above functions

Expected behavior
k//2 vs k , for example in create_tensor_and_stride(l, m, k, a_major == "m", ab_dtype)

Environment details (please complete the following information):
cutlass master

Additional context
N/A

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Read cutlass/examples/python/CuTeDSL/blackwell/grouped_blockscaled_gemm.py, focusing first on create_tensors_abc_for_all_groups() and create_tensor_and_stride(). Reproduce the tensor creation with cutlass.Float4E2M1FN and torch.float4_e2m1fn_x2, then verify that 4-bit packing is reflected in the dimensions and strides, including k//2 rather than k where expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
hpc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.