Installing pytorch 1.2 to get return_counts in torch.unique

As the title says I am trying to get a newer version of pytorch to get this option in the torch.unique function. However when I do
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

I do not get the latest version of pytorch (just the 1.0), which apparently does not include this option.
How can I get the correct version ?

EDIT :
I of course tried :
conda install pytorch=1.2 torchvision cudatoolkit=10.1 -c pytorch
but I cannot compile C++ extension as it says the cuda installation is not found and there is no cuda_make_macros.h

Could you try to use cudatoolkit=10.0?
If I’m not mistaken, conda will try to install PyTorch 1.0.0 with CUDA9.0 if you specify a wrong cudatoolkit version.

Alright that was the solution, so it is ok to use a different toolkit than the one installed on the system apparently, which is nice.
Thank you very much

Yes, the binaries ship with their own CUDA and cudnn, so that you would just need to install the NVIDIA drivers locally.

1 Like