How to install this?

Hello, I’m using docker image from Nvidia:nvcr.io/nvidia/pytorch:21.06-py3, where I found the torch version is torch==1.11.0a0+b6df043, I am wondering how can I install this package locally rather than in docker ? thanks so much

You could clone the repository, git checkout the commit mentioned in the version, and build PyTorch locally.

Hi, thanks so much for your reply.
I did clone the repository and using git log to find the commitment id starting with b6df043. But after install pytorch from source, I find it is still not the exact version I want. This is what I got from git:


But in the docker, I got

And one of the different between this two is that they got different function signature of torch.nn.functional.gelu:


could you please help me out ? thanks so much !

The gelu difference is an internal cherry-pick to allow nvfuser as the JIT backend to fuse this operation.
I would recommend to rebuild from the current master branch, as these changes were already merged (with some refactoring).

Hi, I rebuild from the master branch, and using approximate='tanh' rather than True. And it works. Thanks so much for your proficiency and detailed reply !!