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

Suppose I have a PyTorch Nightly installed on my system:

>>> import torch
>>> torch.__version__
'2.4.0.dev20240530+cu121'

Which is the nightly released on 30th of June, 2024.
I was wondering what is the corresponding commit hash in the main PyTorch Github repository based on which this particular nightly was built?

I tried looking into the last commit id of 30th of June, 2024 on the main github page:

If we take the lastest commit of 30th June, 2024, and view the PyTorch repository corresponding to that commit:

I see that files in ~/pytorch-venv/lib/python3.10/site-packages/torch on my local machine (i.e. the 30th June, 2024 nightly), is different from the files under:

Any documentation on how nightlies are released?

@Abhishek_Ghosh some additional information around this is available here

For your nightly release , the matching commit is this one
https://hud.pytorch.org/pytorch/pytorch/commit/0bbe39cc0e93abcde8ca1efa435c13bbe484b36b

1 Like

Thanks @anantguptadbl for your answer.

Just curious about something:

I can understand that the d66f1267... is the required commit hash on the pytorch github repository.

Any idea about the hash 0bbe39cc0...? Like what is that?

You can check the nightly branch which shows the actual nightly commit with the date into the nightly branch (this is the 0bbe39 commit) as well as the corresponding main/viable/strict commit (this is the d66f12 commit).

The link also points to May, 30th, while this commit is used for June, 30th.

1 Like

What is the corresponding commit hash of torchvision packaged with a Pytorch nightly?

Check the nightly branch in pytorch/vision.

1 Like

For the sake of completeness: you can also check the commits via:

torch.version.git_version
# '481ceefe2a93a745b8c9f3f8640374cec7f11fda'

torchvision.version.git_version
# '6205fd2b4821c3efc100ea844bdf042ee59f6c89'
1 Like

I’m experiencing performance degradation when I compile a nightly release of PyTorch myself compared to the official nightly release available through pip. I suspect that some environment variables may not be set correctly during my compilation process.

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.

The pytorch/builder 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 torch.__config__.show() first and to check for differences.