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

[not for land] hook up MX to CUDA 12.8 cuBLAS MX gemm #1625

Open
wants to merge 13 commits into
base: gh/vkuzo/21/head
Choose a base branch
from

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Jan 27, 2025

Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Status:

performance

  • [done] torch._scaled_mm performance as expected: seeing about 2x speedup from bf16 to mxfp8, and 4x from bf16 to nvfp4
  • [not in this PR] fast scaling kernels

numerics - mxfp8

  • [done] hello world
  • [done] check numerics with A and B set to eye-one and scales set to all-ones
  • [done] numerics match fp32 baseline and mx emulation with a single tile (M == K == N == 128), with torch.randn inputs
  • [done] numerics match fp32 baseline for multiple tiles, of various shapes
  • [done] (not in this PR) train llama with real MX gemm and get decent numerics

numerics - nvfp4

  • [done] hello world
  • [not done] repeat all steps of mxfp8 numerics testing

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Jan 27, 2025

Copy link

pytorch-bot bot commented Jan 27, 2025

🔗 Helpful Links

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

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

❌ 9 New Failures

As of commit c8d768e with merge base 47f96f1 (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 Jan 27, 2025
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: dcde36f828821be9f38c7bedf5d4e2e6de5827f6
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
@vkuzo vkuzo added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Jan 27, 2025
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 9d7e30784817d9d89dcb98e6a33067928fa5db11
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 5442d55e363958b072357561436db026ea73acdd
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: cd9d044f1e6dd0a1126d83149eca188911cac5cf
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: bebf96fe36e96ea4f0a3385fc1012e728d9ed5c4
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
vkuzo added a commit that referenced this pull request Jan 27, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: bebf96fe36e96ea4f0a3385fc1012e728d9ed5c4
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: af1626e716b8f1cc9b8300457608ef08fec606ef
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
# 11
# 11
#
# for each row in rows of A:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

scale_A

# 11
#
# for each row in rows of A:
# for each ol in cols of A:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

scale_A

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e7a79976f84f3871d20e870e9c5d06166f345841
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 946b39a28673d9a9b7945c4ad51c638bfd3963cc
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e8b0cfb3bb0409cb0d6e4f784ba6dfce0f560cd0
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 8a7803b4ba9cafd03cebbcabb3b58e3719ef7110
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 599acd3c589c9c19e7c76565f4bf11d92dee3843
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: d3762db78db0b868f334358e7a83fc8a9070178a
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Jan 28, 2025
Summary:

Requires https://github.com/pytorch/pytorch/pull/145562/files

None of this is for land - just testing for now as we work on a long
term support plan.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: d24fb5938f8e46f85940dd7cbce04caaacb3173b
ghstack-comment-id: 2616580142
Pull Request resolved: #1625
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. topic: 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