PyTorch Contribution

Hi, I found 2 types of contributions to PyTorch.

  1. Tools which are part of Pytorch codebase.
    for example: torch.onnx
    (torch.onnx — PyTorch 2.3 documentation)
    This is available as part of PyTorch codebase.

  2. Tools available as part of PyTorch ecosystem tools(not part of PyTorch codebase).

Questions related to this.

  1. Is there a different process for contribution for above 2 ways.
  2. When we should go for 1st option and when for 2nd option.
  3. For 1st Option my assumption is that language supported is Python or C++. Correct?
  4. for 2nd option is there any list of supported languages to be eligible for contribution?

Please provide your insight on these.

  1. Yes. In the first one features land in the PyTorch repository directly, while the second approach uses standalone repositories installable next to and compatible with PyTorch.
  2. It depends on the feature and if it makes sense to be part of PyTorch Core.
  3. Yes, as well as CUDA (and Markdown for READMEs).
  4. Whatever allows you to create a Python binary compatible with PyTorch.

@ptrblck Thank you for your answers. Is there any code structure or design guidelines that is mandatory be followed in both cases:

  1. features land in the PyTorch repository directly.
  2. uses standalone repositories installable next to and compatible with PyTorch.

How to decide between the 2 option which one to choose. Is the contribution process different for ways?

If yes, what is the starting point. Is creating RFC is common to both?

Yes, for features landing in PyTorch the Contribution Guide should be followed; 3rd party extensions are free to use whatever they want.

Yes, of course. Implementing a feature in PyTorch needs discussions and sign-offs of code owners while you are free to develop your custom extension as you wish.