mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
I'd like to propose a new module `Out-of-tree Backend Integration` via `PrivateUse1` device key. The out-of-tree backend integration via `PrivateUse1` device key has been a recommended mechanism of plug-in third-party accelerator devices into PyTorch. There are already quite a few documents/tutorials on the usage with the primary one as https://docs.pytorch.org/docs/main/accelerator/index.html. We also saw more and more HW vendors to leverage the `PrivateUse1` mechanism to support their accelerators. For example: 1. Ascend NPU 2. Microsoft MAIA 3. MooreThreads MUSA 4. Cambricon MLU The scope of `PrivateUse1` based out-of-tree backend integration is composed of two parts: 1. `PrivateUse1` device as an out-of-tree backend that involves: (a) make `PrivateUse1` a function-complete device as other in-tree devices: i.e., device runtime, autograd, autocast, profiling, distributed, quantization etc. (b) a pluggable design to allow out-of-tree integration to extend the functionality of `PrivateUse1` such as a backend registration mechanism that allows user-friendly device naming, runtime extension points with either C++ and Python for third-party to plug-in their runtime implementation, customizable tensor implementation for third-party to add extra info/functionality to the tensor and their serialization. 2. OpenReg: A test suite and documentation effort to guarantee the functional correctness of `PrivateUse1` mechanism and to guide HW vendors with the right implementation. I'm also proposing @FFFrog as the module maintainer for this new module due to his continuous contribution to the design and implementation both parts of the module. Below are the RFCs/Feature Proposals @FFFrog was working on: 1. [An improvement of PrivateUse1 mechanism, facilitating third-party backend integration](https://docs.google.com/document/d/1_2EO5A2Ww3xDwqbhIvs9Nk65-jV0oNYg3XAmNUsHdAY/edit?tab=t.0#heading=h.5vt8c1vo4dc7) 2. [The interoperability Standard of Third-party Backend Integration Mechanism]( |
||
|---|---|---|
| .. | ||
| build_ci_governance.rst | ||
| contribution_guide.rst | ||
| design.rst | ||
| governance.rst | ||
| index.rst | ||
| persons_of_interest.rst | ||