Skip to content

Add rounding mode options to mx_github #2933

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

Closed
wants to merge 1 commit into from

Conversation

summerdengfb
Copy link
Contributor

Summary: We found the rounding mode when selecting the block scales in MX formats is critical to numeric accuracies. Josh has added rounding mode options in the fp32 to mx4 conversion kernels in D59562029. Here is to add the options to mx_github library which supports more mx formats. To use different options from the default 'floor' method in the cuda kernel, need to specify custom_cuda=False in the mx specs.

Differential Revision: D60682029

Summary: We found the rounding mode when selecting the block scales in MX formats is critical to numeric accuracies. Josh has added rounding mode options in the fp32 to mx4 conversion kernels in D59562029. Here is to add the options to mx_github library which supports more mx formats. To use different options from the default 'floor' method in the cuda kernel,  need to specify custom_cuda=False in the mx specs.

Differential Revision: D60682029
Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 8eebf64
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/66ad60c1660d400008d93574
😎 Deploy Preview https://deploy-preview-2933--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.

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b0c16d7.

q10 pushed a commit to q10/FBGEMM that referenced this pull request Apr 10, 2025
Summary:
Pull Request resolved: facebookresearch/FBGEMM#34

X-link: pytorch#2933

We found the rounding mode when selecting the block scales in MX formats is critical to numeric accuracies. Josh has added rounding mode options in the fp32 to mx4 conversion kernels in D59562029. Here is to add the options to mx_github library which supports more mx formats. To use different options from the default 'floor' method in the cuda kernel,  need to specify custom_cuda=False in the mx specs.

Reviewed By: jwfromm

Differential Revision: D60682029

fbshipit-source-id: 561d668b96cdcf02cd4b9673c3dffe523cf4d577
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.

2 participants