PyTorch Contribution

username: rohit-manav
cooked: <p>Hi, I found 2 types of contributions to PyTorch.</p>
<ol>
<li>
<p>Tools which are part of Pytorch codebase.<br>
for example: torch.onnx<br>
(<a href="https://pytorch.org/docs/stable/onnx.html" class="inline-onebox" rel="noopener nofollow ugc">torch.onnx — PyTorch 2.3 documentation</a>)<br>
This is available as part of PyTorch codebase.</p>
</li>
<li>
<p>Tools available as part of PyTorch ecosystem tools(not part of PyTorch codebase).</p>
</li>
</ol>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/a/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22.png" data-download-href="https://discuss.pytorch.org/uploads/default/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22_2_690x419.png" alt="image" data-base62-sha1="zGDLdjnM0KG9UKVBtMEmP6dcPg6" width="690" height="419" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22_2_690x419.png, https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22_2_1035x628.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fa1e0e3e89bc84890490eedc3175b83fcbb3ab22_2_1380x838.png 2x" data-dominant-color="F4F4F7"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1542×938 59.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Questions related to this.</p>
<ol>
<li>Is there a different process for contribution for above 2 ways.</li>
<li>When we should go for 1st option and when for 2nd option.</li>
<li>For 1st Option my assumption is that language supported is Python or C++. Correct?</li>
<li>for 2nd option is there any list of supported languages to be eligible for contribution?</li>
</ol>
<p>Please provide your insight on these.</p>

username: ptrblck
cooked: <ol>
<li>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.</li>
<li>It depends on the feature and if it makes sense to be part of PyTorch Core.</li>
<li>Yes, as well as CUDA (and Markdown for READMEs).</li>
<li>Whatever allows you to create a Python binary compatible with PyTorch.</li>
</ol>

username: rohit-manav
cooked: <p><a class="mention" href="/u/ptrblck">@ptrblck</a>  Thank you for your answers. Is there any code structure or design guidelines that is mandatory be followed in both cases:</p>
<ol>
<li>features land in the PyTorch repository directly.</li>
<li>uses standalone repositories installable next to and compatible with PyTorch.</li>
</ol>
<p>How to decide between the 2 option which one to choose. Is the contribution process different for ways?</p>
<p>If yes, what is the starting point. Is creating RFC is common to both?</p>

username: ptrblck
cooked: <p>Yes, for features landing in PyTorch the <a href="https://pytorch.org/docs/stable/community/contribution_guide.html">Contribution Guide</a> should be followed; 3rd party extensions are free to use whatever they want.</p>
<aside class="quote no-group" data-username="rohit-manav" data-post="3" data-topic="202402">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/3ec8ea/48.png" class="avatar"> rohit-manav:</div>
<blockquote>
<p>How to decide between the 2 option which one to choose. Is the contribution process different for ways?</p>
</blockquote>
</aside>
<p>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.</p>