Skip to content

Preshuffled BF16I4 Gemm Kernel#3913

Closed
jwfromm wants to merge 1 commit into
pytorch:mainfrom
jwfromm:export-D72270467
Closed

Preshuffled BF16I4 Gemm Kernel#3913
jwfromm wants to merge 1 commit into
pytorch:mainfrom
jwfromm:export-D72270467

Conversation

@jwfromm

@jwfromm jwfromm commented Apr 2, 2025

Copy link
Copy Markdown
Contributor

Summary: This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas.

Differential Revision: D72270467

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72270467

@netlify

netlify Bot commented Apr 2, 2025

Copy link
Copy Markdown

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 2ac7e7d
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/67edaee3820297000850e6f7
😎 Deploy Preview https://deploy-preview-3913--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

jwfromm added a commit to jwfromm/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas.

Differential Revision: D72270467
@jwfromm jwfromm force-pushed the export-D72270467 branch from 3260bd3 to f4c60d4 Compare April 2, 2025 00:59
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72270467

@jwfromm jwfromm force-pushed the export-D72270467 branch from f4c60d4 to fc2e0a8 Compare April 2, 2025 02:27
jwfromm added a commit to jwfromm/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas. Notably, this preshuffle approach is 1.5-2X faster than the standard bf16i4 gemm for most shapes.

Differential Revision: D72270467
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72270467

jwfromm added a commit to jwfromm/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas. Notably, this preshuffle approach is 1.5-2X faster than the standard bf16i4 gemm for most shapes.

Differential Revision: D72270467
@jwfromm jwfromm force-pushed the export-D72270467 branch from fc2e0a8 to 38fb7bb Compare April 2, 2025 02:32
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72270467

jwfromm added a commit to jwfromm/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas. Notably, this preshuffle approach is 1.5-2X faster than the standard bf16i4 gemm for most shapes.

Compared to other mixed dtype kernels like marlin and machete, we see that this new kernel is probably the best average performer.

{F1976677491}

Reviewed By: jianyuh

Differential Revision: D72270467
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas. Notably, this preshuffle approach is 1.5-2X faster than the standard bf16i4 gemm for most shapes.

Compared to other mixed dtype kernels like marlin and machete, we see that this new kernel is probably the best average performer.

{F1976677491}

Reviewed By: jianyuh

Differential Revision: D72270467
@jwfromm jwfromm force-pushed the export-D72270467 branch from 38fb7bb to 2ac7e7d Compare April 2, 2025 21:40
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D72270467

jwfromm added a commit to jwfromm/FBGEMM that referenced this pull request Apr 2, 2025
Summary:
X-link: facebookresearch/FBGEMM#1003


This diff adds a preshuffled BF16I4 mixed dtype kernel using cutlass. Performance is quite compelling and shows substantial speedups for some shapes compared to bf16 x bf16 gemm backed by cublas. Notably, this preshuffle approach is 1.5-2X faster than the standard bf16i4 gemm for most shapes.

Compared to other mixed dtype kernels like marlin and machete, we see that this new kernel is probably the best average performer.

{F1976677491}

Reviewed By: jianyuh, jiawenliu64

Differential Revision: D72270467
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 8cbb32c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants