What is commit hash of [PyTorch](https://github.com/pytorch/pytorch) repository for a particular nightly?

Abhishek_Ghosh: <p>Suppose I have a PyTorch Nightly installed on my system:</p>
<pre><code class="lang-auto">&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.__version__
'2.4.0.dev20240530+cu121'
</code></pre>
<p>Which is the nightly released on 30th of June, 2024.<br>
I was wondering what is the corresponding commit hash in the <a href="https://github.com/pytorch/pytorch" rel="noopener nofollow ugc">main PyTorch Github repository</a> based on which this particular nightly was built?</p>
<p>I tried looking into the last commit id of 30th of June, 2024 on the main github page:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/5/7584dcac665ba891b99e72d6a00d94ff8d9641df.png" data-download-href="https://discuss.pytorch.org/uploads/default/7584dcac665ba891b99e72d6a00d94ff8d9641df" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/7584dcac665ba891b99e72d6a00d94ff8d9641df_2_666x500.png" alt="image" data-base62-sha1="gLCwdfGASGYoiMypX2FWlXhjvBl" width="666" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/7584dcac665ba891b99e72d6a00d94ff8d9641df_2_666x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/7584dcac665ba891b99e72d6a00d94ff8d9641df_2_999x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/7/5/7584dcac665ba891b99e72d6a00d94ff8d9641df.png 2x" data-dominant-color="101316"><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">1074×806 110 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>If we take the lastest commit of 30th June, 2024, and view the PyTorch repository corresponding to that commit:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/e/3/e3fb11949185c915f4d5dc9c2b0cefede9abd255.png" data-download-href="https://discuss.pytorch.org/uploads/default/e3fb11949185c915f4d5dc9c2b0cefede9abd255" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/e/3/e3fb11949185c915f4d5dc9c2b0cefede9abd255_2_690x262.png" alt="image" data-base62-sha1="wwOitihbnZn6JNt4wXnKkBE3lSB" width="690" height="262" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/e/3/e3fb11949185c915f4d5dc9c2b0cefede9abd255_2_690x262.png, https://discuss.pytorch.org/uploads/default/optimized/3X/e/3/e3fb11949185c915f4d5dc9c2b0cefede9abd255_2_1035x393.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/e/3/e3fb11949185c915f4d5dc9c2b0cefede9abd255.png 2x" data-dominant-color="13171A"><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">1066×405 60.5 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>I see that files in <code>~/pytorch-venv/lib/python3.10/site-packages/torch</code> on my local machine (i.e. the 30th June, 2024 nightly), is different from the files under:</p><aside class="onebox githubfolder" data-onebox-src="https://github.com/pytorch/pytorch/tree/5f642579d6996ef2b4892d0f8d1ebf698d99be54/torch">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" width="32" height="32">

      <a href="https://github.com/pytorch/pytorch/tree/5f642579d6996ef2b4892d0f8d1ebf698d99be54/torch" target="_blank" rel="noopener nofollow ugc">github.com</a>
  </header>

  <article class="onebox-body">
    <h3><a href="https://github.com/pytorch/pytorch/tree/5f642579d6996ef2b4892d0f8d1ebf698d99be54/torch" target="_blank" rel="noopener nofollow ugc">pytorch/torch at 5f642579d6996ef2b4892d0f8d1ebf698d99be54 · pytorch/pytorch</a></h3>


  <p><span class="label1">Tensors and Dynamic neural networks in Python with strong GPU acceleration - pytorch/pytorch</span></p>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Any documentation on how nightlies are released?</p>

anantguptadbl: <p><a class="mention" href="/u/abhishek_ghosh">@Abhishek_Ghosh</a> some additional information around this is available here</p><aside class="quote" data-post="6" data-topic="186853">
  <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/y/f0a364/48.png" class="avatar">
    <a href="https://discuss.pytorch.org/t/install-particular-pytorch-nightly/186853/6">Install particular pytorch nightly</a> 
  </div>
  <blockquote>
    Can we somehow list the wheels that can be downloaded? That would greatly help! 
In addition, how do package dependencies work then? e.g. is the corresponding torch-triton included in the wheel?
  </blockquote>
</aside>

<p>For your nightly release , the matching commit is this one<br>
<a href="https://hud.pytorch.org/pytorch/pytorch/commit/0bbe39cc0e93abcde8ca1efa435c13bbe484b36b" class="onebox" target="_blank" rel="noopener nofollow ugc">https://hud.pytorch.org/pytorch/pytorch/commit/0bbe39cc0e93abcde8ca1efa435c13bbe484b36b</a></p>

Abhishek_Ghosh: <p>Thanks <a class="mention" href="/u/anantguptadbl">@anantguptadbl</a> for your answer.</p>
<p>Just curious about something:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/8/18396efefd86141b8f78c142e8518b49117dd3d4.png" data-download-href="https://discuss.pytorch.org/uploads/default/18396efefd86141b8f78c142e8518b49117dd3d4" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/18396efefd86141b8f78c142e8518b49117dd3d4_2_690x186.png" alt="image" data-base62-sha1="3sivD4zAJrFJG7KvoQP4fAQRL5a" width="690" height="186" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/18396efefd86141b8f78c142e8518b49117dd3d4_2_690x186.png, https://discuss.pytorch.org/uploads/default/optimized/3X/1/8/18396efefd86141b8f78c142e8518b49117dd3d4_2_1035x279.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/1/8/18396efefd86141b8f78c142e8518b49117dd3d4.png 2x" data-dominant-color="2C2522"><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">1261×340 47.5 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>I can understand that the <code>d66f1267...</code> is the required commit hash on the pytorch github repository.</p>
<p>Any idea about the hash <code>0bbe39cc0...</code>? Like what is that?</p>

ptrblck: <p>You can check the <a href="https://github.com/pytorch/pytorch/commits/nightly/"><code>nightly</code> branch</a> which shows the actual nightly commit with the date into the <code>nightly</code> branch (this is the <code>0bbe39</code> commit) as well as the corresponding <code>main</code>/<code>viable/strict</code> commit (this is the <code>d66f12</code> commit).</p>
<p>The link also points to May, 30th, while <a href="https://github.com/pytorch/pytorch/commit/9ae78a578caff195821ad535a9e8d8ef59552142">this commit</a> is used for June, 30th.</p>

Abhishek_Ghosh: <p>What is the corresponding commit hash of torchvision packaged with a Pytorch nightly?</p>

ptrblck: <p>Check the <a href="https://github.com/pytorch/vision/commits/nightly/"><code>nightly</code> branch</a> in <code>pytorch/vision</code>.</p>

ptrblck: <p>For the sake of completeness: you can also check the commits via:</p>
<pre data-code-wrap="python"><code class="lang-python">torch.version.git_version
# '481ceefe2a93a745b8c9f3f8640374cec7f11fda'

torchvision.version.git_version
# '6205fd2b4821c3efc100ea844bdf042ee59f6c89'
</code></pre>

Abhishek_Ghosh: <p>I’m experiencing performance degradation when I compile a nightly release of PyTorch myself compared to the official nightly release available through <code>pip</code>. I suspect that some environment variables may not be set correctly during my compilation process.</p>
<p>Could you provide information on the environment used to build a PyTorch nightly release with CUDA 12.1? A pointer to the script used to generate the official nightly release would be very helpful.</p>

ptrblck: <p>The <a href="https://github.com/pytorch/builder"><code>pytorch/builder</code></a> repository is used to define all build scripts and requirements. An easier way than to check which container environment etc. was used would most likely be to check the <code>torch.__config__.show()</code> first and to check for differences.</p>