Skip to content

Rename Sparse2x4CUTLASSFloat8Tensor to Float8Sparse2x4_2DData2DMetadataTensor (#4343)#4343

Open
bbeckca wants to merge 2 commits intopytorch:mainfrom
bbeckca:export-D102374347
Open

Rename Sparse2x4CUTLASSFloat8Tensor to Float8Sparse2x4_2DData2DMetadataTensor (#4343)#4343
bbeckca wants to merge 2 commits intopytorch:mainfrom
bbeckca:export-D102374347

Conversation

@bbeckca
Copy link
Copy Markdown
Contributor

@bbeckca bbeckca commented Apr 27, 2026

Summary:

Rename the CUTLASS float8 sparse tensor class to describe the memory layout:

  • Class: Sparse2x4CUTLASSFloat8Tensor → Float8Sparse2x4_2DData2DMetadataTensor
  • Enum: SPARSE_CUTLASS → SPARSE_2D_DATA_2D_METADATA (old value kept for backward compatibility)

The old identifiers to Sparse2x4CUTLASSFloat8Tensor will remain importable using backward compatible aliases.

Reviewed By: RandySheriff

Differential Revision: D102374347

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 27, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4343

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 2 New Failures

As of commit 92e86c5 with merge base 6529fca (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 27, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just remove this file?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or print a warning here and direct to then new path

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Will redirect using an alias and delete this file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an error? why do we have 1d_data_1d_metadata tensor here


This packing format will dispatch to torch._cslt_sparse_mm for matmul, with per-tensor scaling passed as alpha.
"""
SPARSE_1D_DATA_1D_METADATA = "sparse_1d_data_1d_metadata"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this is added in a separate PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh it's probably because of the PR is exported from stacked diffs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right. Will publish from OSS next time to avoid this.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 28, 2026

@bbeckca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102374347.

@bbeckca
Copy link
Copy Markdown
Contributor Author

bbeckca commented Apr 28, 2026

@pytorchbot label "module: not user facing"

@pytorch-bot pytorch-bot Bot added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Apr 28, 2026
@meta-codesync meta-codesync Bot changed the title Rename Sparse2x4CUTLASSFloat8Tensor to Float8Sparse2x4_2DData2DMetadataTensor Rename Sparse2x4CUTLASSFloat8Tensor to Float8Sparse2x4_2DData2DMetadataTensor (#4343) Apr 28, 2026
bbeckca added a commit to bbeckca/ao that referenced this pull request Apr 28, 2026
…taTensor (pytorch#4343)

Summary:

Rename the CUTLASS float8 sparse tensor class to describe the memory layout:
- Class: Sparse2x4CUTLASSFloat8Tensor → Float8Sparse2x4_2DData2DMetadataTensor
- Enum: SPARSE_CUTLASS → SPARSE_2D_DATA_2D_METADATA (old value kept for backward compatibility)

The old identifiers to Sparse2x4CUTLASSFloat8Tensor will remain importable using backward compatible aliases.

Reviewed By: RandySheriff

Differential Revision: D102374347
@bbeckca bbeckca force-pushed the export-D102374347 branch from bcd204e to e452c2c Compare April 28, 2026 19:36
bbeckca added a commit to bbeckca/ao that referenced this pull request Apr 28, 2026
…taTensor (pytorch#4343)

Summary:

Rename the CUTLASS float8 sparse tensor class to describe the memory layout:
- Class: Sparse2x4CUTLASSFloat8Tensor → Float8Sparse2x4_2DData2DMetadataTensor
- Enum: SPARSE_CUTLASS → SPARSE_2D_DATA_2D_METADATA (old value kept for backward compatibility)

The old identifiers to Sparse2x4CUTLASSFloat8Tensor will remain importable using backward compatible aliases.

Reviewed By: RandySheriff

Differential Revision: D102374347
@bbeckca bbeckca force-pushed the export-D102374347 branch from e452c2c to f0135d7 Compare April 28, 2026 19:42
bbeckca added 2 commits April 28, 2026 12:45
Summary:
X-link: pytorch/pytorch#180312


What: Adding a new tensor subclass for FP8 2:4 sparsity via hipSPARSELt (ROCm only). Packs compressed values + metadata into a single tensor with `_cslt_compress` and dispatches through `_cslt_sparse_mm` with `A_scale * B_scale` as `alpha`.

Why: This hipSPARSELt path differs enough in packing and kernel routing from CUTLASS to warrant a dedicated path.

Reference: https://rocm.blogs.amd.com/artificial-intelligence/introduce_hipsparselt/README.html

Reviewed By: RandySheriff

Differential Revision: D100640267
…taTensor (pytorch#4343)

Summary:

Rename the CUTLASS float8 sparse tensor class to describe the memory layout:
- Class: Sparse2x4CUTLASSFloat8Tensor → Float8Sparse2x4_2DData2DMetadataTensor
- Enum: SPARSE_CUTLASS → SPARSE_2D_DATA_2D_METADATA (old value kept for backward compatibility)

The old identifiers to Sparse2x4CUTLASSFloat8Tensor will remain importable using backward compatible aliases.

Reviewed By: RandySheriff

Differential Revision: D102374347
@bbeckca bbeckca force-pushed the export-D102374347 branch from f0135d7 to 92e86c5 Compare April 28, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported module: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants