Skip to content
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

Add CUTLASS-based row-wise scaled sparse FP8 kernel #1671

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexsamardzic
Copy link
Collaborator

No description provided.

Copy link

pytorch-bot bot commented Feb 5, 2025

🔗 Helpful Links

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

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

❌ 6 New Failures

As of commit e1c9bd0 with merge base 867a91f (image):

NEW FAILURES - The following jobs have failed:

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

@facebook-github-bot facebook-github-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 Feb 5, 2025
@alexsamardzic
Copy link
Collaborator Author

The kernel is ready and passes smoke test.

Remaining tasks:

  • Write a converter to SM90 sparse semi-structured format
  • Validate the kernel on proper test inputs
  • Check compile warnings about the performance loss, write the benchmark
  • Write Python-side code: sparsify/quantize method, Llama generator extension, etc.
  • Provide that kernel is built with SM90a flags when torchao detects H100 card as SM90
  • Further unify CUDA code with rowwise_scaled_linear_cutlass code
  • Implement a meaningful config selection

@cpuhrsch @drisspg

@cpuhrsch cpuhrsch requested a review from jcaip February 5, 2025 21:00
@alexsamardzic alexsamardzic added float8 sparsity topic: new feature Use this tag if this PR adds a new feature labels Feb 6, 2025
@alexsamardzic alexsamardzic force-pushed the rowwise-scaled-sparse-fp8-cutlass branch 2 times, most recently from 5bbcc49 to 6d34b7e Compare February 6, 2025 23:41
)


def rand_sparse_semi_structured(r, c, dtype, device, choice=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: I think we have a variant of this in here:

def create_semi_structured_tensor(r, c, dtype):

@alexsamardzic alexsamardzic force-pushed the rowwise-scaled-sparse-fp8-cutlass branch from 6d34b7e to e1c9bd0 Compare February 7, 2025 11:12
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. float8 sparsity topic: new feature Use this tag if this PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants