RFC-0046-python-backend-registration-api.md#83
Conversation
|
Hi @qihqi! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
| * Is the API look-and-feel OK? Any improvement on those? | ||
|
|
||
| The questions to community is: | ||
| * Do you see yourself using something like this, if yes what are the usecases? |
There was a problem hiding this comment.
While I cannot comment about the technical aspect of this proposal as I don't know much about pytorch's internals, I can say that I'm really interested in making a custom device + a torch.compile backend in pure python. I'm working with Modular's folks on a Mojo backend for Pytorch here.
I currently rely on pytorch nightly and here is how I setup the device
from torch.utils.backend_registration import _setup_privateuseone_for_python_backend
_setup_privateuseone_for_python_backend("max_device")
# Register all collected aten operations
for op_name, func in _aten_ops_registry:
torch.library.impl(op_name, "privateuseone")(func)While it works well, it doesn't integrate well with torch.compile yet. But I must say, the UX is really good. Having to implement just a list of torch.library.impl is quite easy and the error messages are often really clear. I look forward to a better integration with torch.compile() ;)
rendered: https://github.com/qihqi/pytorch-rfcs/blob/rfcs/RFC-0046-python-backend-registration-api.md