Skip to content

Move Shape Registration back to CPP #3340

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

jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Nov 7, 2024

Summary:
In D64147797, I attempted to modernize our custom function shape registration using torch's register_fake, which has a bit better support than cpp meta registration. Although I think the motivation still is good, this diff introduced a significant number of complexities due to python being more brittle.

Ultimately, I think it was a failure and made fbgemm custom ops harder to integrate broadly. In this diff, I revert custom operator shape registration to using CPP. We still are a bit improved over our previous state as we dropped the catch-all registration that prevented custom op compatibility with torch.export.

Differential Revision: D65615437

@facebook-github-bot
Copy link
Contributor

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

Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit ba6a7e7
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/672d2da340ecf1000973150f
😎 Deploy Preview https://deploy-preview-3340--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.

Summary:

X-link: facebookresearch/FBGEMM#434

In D64147797, I attempted to modernize our custom function shape registration using torch's register_fake, which has a bit better support than cpp meta registration. Although I think the motivation still is good, this diff introduced a significant number of complexities due to python being more brittle.

Ultimately, I think it was a failure and made fbgemm custom ops harder to integrate broadly. In this diff, I revert custom operator shape registration to using CPP. We still are a bit improved over our previous state as we dropped the catch-all registration that prevented custom op compatibility with torch.export.

Reviewed By: sryap, jianyuh

Differential Revision: D65615437
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f79508e.

q10 pushed a commit to q10/FBGEMM that referenced this pull request Apr 10, 2025
Summary:
X-link: pytorch#3340

Pull Request resolved: facebookresearch/FBGEMM#434

In D64147797, I attempted to modernize our custom function shape registration using torch's register_fake, which has a bit better support than cpp meta registration. Although I think the motivation still is good, this diff introduced a significant number of complexities due to python being more brittle.

Ultimately, I think it was a failure and made fbgemm custom ops harder to integrate broadly. In this diff, I revert custom operator shape registration to using CPP. We still are a bit improved over our previous state as we dropped the catch-all registration that prevented custom op compatibility with torch.export.

Reviewed By: sryap, jianyuh

Differential Revision: D65615437

fbshipit-source-id: 24bf5eee9125ee975b6921028705439b42a809b5
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