Error when Load GPU-trained Model to CPU

Question:
Hi all,
Here are the piece of code when I try to load a gpu-trained model to cpu (and want to use CPU for evaluation):
model_conv.load_state_dict(torch.load(model_file, map_location='cpu'))
model_conv = model_conv.cpu()

and the error message is:
Traceback (most recent call last):
  File "prediction.py", line 269, in <module>
    model_conv.load_state_dict(torch.load(resume_file, map_location='cpu'))
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 229, in load
    return _load(f, map_location, pickle_module)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 377, in _load
    result = unpickler.load()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 348, in persistent_load
    data_type(size), location)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 246, in restore_location
    result = map_location(storage, location)
TypeError: 'str' object is not callable

My pytorch version is 0.1.12_1. Any idea how to fix this? I have checked https://stackoverflow.com/questions/55511857/how-to-load-the-gpu-trained-model-into-the-cpu 2 but the solution seems not work in my case.
Without map_location argument, the error msg is
Traceback (most recent call last):
  File "prediction.py", line 268, in <module>
    model_conv.load_state_dict(torch.load(resume_file))
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 229, in load
    return _load(f, map_location, pickle_module)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 377, in _load
    result = unpickler.load()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 348, in persistent_load
    data_type(size), location)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 85, in default_restore_location
    result = fn(storage, location)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/serialization.py", line 67, in _cuda_deserialize
    return obj.cuda(device_id)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/_utils.py", line 57, in _cuda
    with torch.cuda.device(device):
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/cuda/__init__.py", line 124, in __enter__
    _lazy_init()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/cuda/__init__.py", line 84, in _lazy_init
    _check_driver()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/torch/cuda/__init__.py", line 58, in _check_driver
    http://www.nvidia.com/Download/index.aspx""")
AssertionError:
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx

Any idea how to fix this problem? Any suggestion is appreciated!

Context:
PyTorch 0.1.12_1 is one of the earliest releases, so I would strongly recommend to update to the latest stable release (1.5.1).
In 0.1.12, you had to pass a function to map_location via:
torch.load(..., map_location=lambda storage, location: 'cpu')


Easier method for model inference and deployment

Question: I have been looking into ways to deploy and use models after they are trained. I originally started machine/deep learning using Keras/Tensorflow, and one of the options with them is the ability to save the model architecture as a .json file and loading the weights into that. Is there any plans on doing something like with with PyTorch? For a lot of use cases, it isn’t ideal to use the same development project to rebuild the model architecture to load the weights into in the deployment use-case.

Context: Have you tried using Torchscript or exporting the model to onnx? They are self contained with weights and model structure.


Question:
Hi Everyone,
I’m having trouble with this error. The error message is not quite clear to me, in one part it says NVIDIA driver, and in the other part it says CUDA driver, and each time I am not sure what they are referring to as it is too generic.

“The NVIDIA driver on your system is too old (found version 10010)”

How do I interpret found version 10010? Is this the GPU driver (which has version 25.21.14.2531),
or is it the version of CUDA (10.2.89), or something else?

“go to: https://pytorch.org to install a PyTorch version that has been co
mpiled with your version of the CUDA driver.”

Is this PyTorch version compatible with CUDA 10.2.89 or with whatever is version 10010?
Environment Details:
Python

python --version
3.9.7

Pytorch

print(torch.__version__)

1.10.1
Installed with:

conda installpytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

CUDA - installed

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

GPU Card

NVIDIA GeForce GTX 670MX
Driver Version: 25.21.14.2531
Driver Date: 9/04/2019

OS

Windows 8.1 SP 3
Version 6.3.9600

Where the error is occurring:
Python 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)] :: Ana
conda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
C:\anaconda3\lib\site-packages\torch\cuda\__init__.py:80
: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old
(found version 10010). Please update your GPU driver by downloading and installi
ng a new version from the URL: http://www.nvidia.com/Download/index.aspx Alterna
tively, go to: https://pytorch.org to install a PyTorch version that has been co
mpiled with your version of the CUDA driver. (Triggered internally at  ..\c10\cu
da\CUDAFunctions.cpp:112.)
  return torch._C._cuda_getDeviceCount() > 0
False

I used the table on Start Locally | PyTorch to obtain the installation command as follows:

conda installpytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Thank you

Context: Could you check the driver version via nvidia-smi, as 10010 would indicate 10.1 while your nvcc compiler is 10.2.


DLL backend_with_compiler initialization routine failed

Question:
Hi,
I tackle with a lot of difficulties to compile Pytorch  libraries on my Windows 10, it is a PC with a NVIDIA QUADRO K4200 (with compute capability. 3.0). The CUDA driver on the graphic board is CUDA 11.4.94 but the runtime library library is 10.2.89. I have installed VS 2019 with MSVC v140-VS 2015 c++ build tools (v14.00), MSVC v142-VS 2019 (v14.27) and (v14.28-16.8), also I installed MSVC v140 - VS 2015 C++ build tools (v14.00) and last Windows 10 SDK. Honestly, I don’t know if any of these VS libraries are redundant or not for the compilation of the pytorch. After 6 hours of compilation (set CMAKE_GENERATOR=Visual Studio 15 2017) I installed pytorch library on python and I see follwing error:
c:\Users\PC\python

import torch
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\PC\anaconda3\envs\rnnenv\lib\site-packages\torch_init_.py”, line 125, in
raise err
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed. Error loading “C:\Users\PC\anaconda3\envs\rnnenv\lib\site-packages\torch\lib\backend_with_compiler.dll” or one of its dependencies.

Other print-out is the following:

import ctypes
ctype.CDLL(r"C:\Users\PC\vcomp140.dll")
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘ctype’ is not defined

ctypes.CDLL(r"C:\Users\PC\vcomp140.dll")
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\PC\anaconda3\envs\rnnenv\lib\ctypes_init_.py”, line 382, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module ‘C:\Users\PC\vcomp140.dll’ (or one of its dependencies). Try using the full path with constructor syntax.

ctypes.CDLL(r"C:\Users\PC\anaconda3\vcomp140.dll")
<CDLL ‘C:\Users\PC\anaconda3\vcomp140.dll’, handle 7ff8a7ec0000 at 0x26561a54eb0>

Please, any idea before starting again all the installation process?
Br/Luis

Context: Hi, I bumped into the same error while building PyTorch from source on my Windows (Installation on Mac was successful btw). Did you figure out how to solve it? Thank you!


How to use pytoch for AMD graphics card?

Question: I use amd graphics card, but now I want to learn pytoch. Is there a way to solve this problem?

Context:
You need to install the right Pytorch for ROCm. You can find more info on it here:

      pytorch.org

PyTorch 4

  An open source machine learning framework that accelerates the path from research prototyping to production deployment.


PyTorch installation problems with stable, windows, pip, python and cpu

Question:
Hello,
I have been struggling with the installation of PyTorch on my windows 10 laptop for quite a while. After selecting the appropriate entry in the installation matrix: stable(1.10), windows, pip, Python, cpu, I have got the recomended command: pip3 install torch torchvision torchaudio.
Running this command in DOS mode without administrator rights gives the following error message:
Errormessage:
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: no matching distribution found for torch
I have tried older versions such as:
pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html 1  with similar error message.
What can I do?
Ivo van Baren
Further information:
I have re-installed Python to the latest version:
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
The Python libraries are:
Package         Version

colorama        0.4.4
cycler          0.11.0
fonttools       4.28.2
fvcore          0.1.5.post20211023
iopath          0.1.9
kiwisolver      1.3.2
matplotlib      3.5.0
numpy           1.21.4
opencv-python   4.5.4.60
packaging       21.3
parameterized   0.8.1
Pillow          8.4.0
pip             21.3.1
portalocker     2.3.2
pyparsing       3.0.6
python-dateutil 2.8.2
PyWavelets      1.2.0
pywin32         302
PyYAML          6.0
scipy           1.7.3
setuptools      58.1.0
setuptools-scm  6.3.2
six             1.16.0
tabulate        0.8.9
termcolor       1.1.0
tomli           1.2.2
tqdm            4.62.3
wheel           0.37.0
yacs            0.1.8
System Info
|—|—|
|Processor|Intel(R) Core™ i5-4200M CPU @ 2.50GHz   2.50 GHz|
|Geïnstalleerd RAM-geheugen|8,00 GB|
|Type systeem|64-bits besturingssysteem, x64-processor|
Operating system:

Editie
Windows 10 Home

Versie
21H1

Installatiedatum
13-8-2020

Build van besturingssysteem
19043.1348

Ervaring
Windows Feature Experience Pack 120.2212.3920.0

Context:
Hi,
I have the exact same problem with similar configuration. I’ve been looking everywhere for a way to download torch. I’m completely lost. Please help
Olivier


Question: I went to Anaconda Prompt (32-bit) and got a prompt “(base)”. There I entered the command “conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch”. After 5-10 minutes, I got the message “The following packages are not available from current channels: cudatoolkit=10.2, pytorch, torchaudio”. I was suggested to look at other “channels”. Am I supposed to do something else? This is not explained.

Context: In case you are using a 32bit Python environment, update to 64bit Python and try to install PyTorch again.


Looking for PyTorch Binaries for Older GPUs

Question:
I have GT 710. It has compute capability of 3.5. Unfortunately, since version 1.3.1 PyTorch does not support cc < 3.7. This means PyTorch > 1.3.0 does not support my GPU. When I try to use PyTorch 1.6.0 I get the error:

RuntimeError: CUDA error: no kernel image is available for execution on the device

In this case, @peterjc123 recommends to build PyTorch from source.  I tried to build PyTorch from source, but it turned out to be not so easy. I gave up after a few days. Then I began to look for someone who succeeded and I found it. Nelson Liu built PyTorch Binaries that support old GPUs. Newer PyTorch Binaries for Older GPUs 1 These binaries for Linux but I need Windows binaries.
I didn’t find any binaries for Windows, but I’m sure they exist.
If anyone has built or found PyTorch Binaries for Windows, please share here.

Context:
I added missing files. torch-1.6.0a0+b31f58d-cp37-cp37m-win_amd64.whl 1
I have been tested this file on my computer in another Windows (Windows 7).


Question:
I have GT 710. It has compute capability of 3.5. This means that if I want to use PyTorch with a GPU, I have to build PyTorch from source.
I have already made several attempts but unsuccessfully. I didn’t expect the build process to take hours, in addition CPU is 100% busy. I work on Windows and this makes the installation process even more complicated. I have a few questions and would like to have some answers before I proceed to the next attempt.
I use Unity mlagents toolkit. It requires pytorch >=1.6.0,<1.9.0. I chose the minimum configuration (pytorch 1.6, CUDA 9.2, cuDNN v7) to ease the build process.
Question 1: Is it justified to use the minimal configuration?
I found the pytorch 1.6 repository at https://github.com/pytorch/pytorch/tree/release/1.6 2 but I’m not sure if this is correct.
Question 2: Where should I look for pytorch repositories of different versions?
I have Visual Studio 2019 16.11.7 and I can’t install toolset 14.11. The instructions say:
“There is no guarantee of the correct building with VC++ 2017 toolsets, others than version 15.4 v14.11.”
Does this apply to Studio 2019?
Question 3: Can I use Visual Studio 2019 to build?
I do not see how I can specify the desired compute capability. May be

set TORCH_CUDA_ARCH_LIST=“3.5”

Question 4: How do I specify the desired compute capability?
Let’s say I built the pytorch binaries successfully. Where are these binaries located? How do I install these binaries?
Question 5: How do I install new pytorch binaries?

Context:
You can pick any PyTorch tag, which would support your setup (e.g. CUDA9.2). The currently required min. CUDA toolkit version is 10.2, so you should double check if PyTorch 1.6.0 supports 9.2. Yes, the release/1.6 branch is correct. You could alternatively use git checkout v1.6.0.

The different release versions are all tagged in the GitHub repository. I don’t know which VisuaStudio versions are required as I’m not using Windows.

See 2.

Using TORCH_CUDA_ARCH_LIST is correct. The source build will be installed into your current environment if you use python setup.py install and will be usable there. The installed package will be located in your env also. E.g. if you are using conda to manage your environments, you would find the package in e.g. /opt/conda/lib/python3.8/site-packages/torch if you install it in the base environment.

See 4.


(Updated) NVIDIA RTX A6000 INCOMPATIBLE WITH PYTORCH

Question:
Hello！
Several days ago I posted a issue about pytorch with NVIDIA RTX A6000 GPU, here is the origianl link:
Nvidia rtx a6000 gpu incompatible with pytorch - windows - PyTorch Forums 10
Many thanks to ptrblck, and I have tried to uninstall CUDA on our workstation and built CUDA 11.3 toolkit and pytorch from source using the following command:
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
But before the finishing of first epoch, the same error occured:

image850×364 15.8 KB

Could you please offer any other suggestions about this issue? Thanks a lot.
PS: My classmates and I think the problem described by ptrblck was rather fancy, because we uninstalled CUDA 10.2 and installed CUDA 11.1 using binary file from MVIDIA official site. We then uninstalled CUDA 11.1 on windows 10 and built cuda and pytorch from source, but it didn’t solve the problem. We tried to run the same program on CUDA 11.1 and pytorch 1.8.1, it can run three epoches, and the error :RuntimeError: CUDA error: an illegal memory access was encountered would pop out.

Context:
Solved by tjk in post #27

                Well, I think I figure out the reasons. The problem was caused by the conflict between nvidia driver and cuda 11.1. Install the nvidia driver with –no-opengl-files flag and cuda11.1 with runfile will make this A6000 GPU run smoothly on ubuntu 16.04LTS with desktop GUI and no error is reported.
If n…


Question:
Hello
I have to train deep learning models on videos that require time consuming augmentations.
I found that most of the training and testing  time is related to the preprocessing on the CPU.
Currently, I have Intel 10700k processor. I use Nvidia RTX 3080 GPU for training and testing with pytorch.
My question is:
If I switch to using AMD processor does that affect pytorch in any way?
Can I train on Nvidia GPU while using AMD processor for the videos augmentations?
Many Thanks
Hussein

Context: Main bottleneck here is actually Python itself and how it manages CPU (GIL for example). If you can parallelize your calculations I would advise you to implement multiprocessing for the CPU part. 10700k is rather fast 8-core CPU, switching to AMD won’t give you significant speed improvements (except switching to something fast and with a lot of cores, like 5650x or threadripper)


Question:
Hi everyone
I’m having a problem on my laptop, where the task manager shows the GPU utilization is fairly low (mostly below 38%) during training, but the power consumption is very high. I’m fairly new to pytorch and programming with GPU and use it mostly for academic assignments. Is it possible to improve the utilization of the GPU to make the training more efficient?
I’ll try to provide as much info as I can:
OS: windows 10
CPU: Intel(R) Core™ i7-7500U
RAM: 8.00 GB
GPU: Nvidia Geforece GTX 950M
I’m working on Pycharm pro and sometimes Jupyter Notebook on chrome.
During training the task manager shows the GPU is < 38%, Memory is ~83% and CPU ~34%.
I’ve checked that my GPU is available, and during training I see my .py file on the Nvidia control panel.

Context:
I would recommend to check the Performance Guide 6 and check if you could enable e.g. cudnn.benchmark or use automatic mixed-precision training.
Also, you could profile the code using the PyTorch Profiler and see where the bottlenecks are (e.g. in the data loading or the model itself).


PyTorch installs the CPU version no matter what

Question:
I’ve been trying to install PyTorch with CUDA support enabled, but have been unsuccessful no matter what I try.
GPU: GTX 1080 Ti
OS: Windows 10
Environment: Anaconda
Python: 3.9.8
I installed Anaconda and ran the following command in the Anaconda Prompt:
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch.
As far as I can tell, this is how I download the version of PyTorch with GPU support.
This is the output of nvidia-smi:
NVIDIA-SMI 496.49       Driver Version: 496.49       CUDA Version: 11.5
This is what happens when I try to access PyTorch from within the Python3 interpreter:
import torch

torch.cuda.is_available()
> False

torch.__version__
> '1.10.0+cpu'

torch.cuda.device_count()
> 0

torch.cuda.init()
> AssertionError: Torch not compiled with CUDA enabled

It appears that the CPU version is installed, even though I didn’t select the CPU version on the PyTorch website. What can I do to ensure I install the GPU version? Thanks for all your help!

Context: I ended up solving my own issue through lots of trial and error. It turns out that python3 on my machine is linked to a different python3 environment, not the one that was installed in my conda environment. Launching python with the command python instead of python3 fixed the issue. I’ll leave this post up in case anyone else runs into this in the future


Question:
Hello, a few days ago i decided to follow a tutorial that was using pytorch. I installed pytorch with the cuda command even though i didnt previously have CUDA installed. Today i got to the GPU part, and it seemed to go awfully slow, even though in the video it went much faster than me. I have a gtx 1070 and it was a simple MNIST example with 1 hidden layer. I did something similar on octave before and it went MUCH faster. So, i thought that probably not having cuda was the problem, i googled and i came to this: Is it required to set-up CUDA on PC before installing CUDA enabled pytorch?
I then installed cuda 11.5 on my machine. I tried the pytorch code again and it still had the same speed. Am i doing something wrong here?

Context: If you are already pushing the input tensor as well as the model to the GPU via .cuda() or .to('cuda') then your GPU should already be used the the util. in nvidia-smi as well as the memory usage would also verify it. To further isolate your bottleneck, profile your code and try to narrow down which part of your code is the slowest.


Are there any plans for a fix for CUDA 11?

Question:
There has been a problem for a very long time. CUDA 11 is slower than CUDA 10.
GitHub - issue 2
My 5-year-old laptop with an Nvidia 940M (CUDA 10) video card works better than the 3070TI (CUDA 11) - This is nonsense!
For such a long time, this has not been fixed, that I already regretted that I bought the 3070ti

Context:
The issue is most likely not caused by CUDA, but cuDNN as described in this and other issues.
You could check the 1.9.0 binaries, which fixed some missing cutlass kernels while statically linking cuDNN, build from source with the latest release, or try the nightly binaries with cuDNN8.2.2.


Nvidia rtx a6000 gpu incompatible with pytorch

Question:
Hello guys:
I try to run a machine learning program with NVIDIA RTX A6000 graphical cards and Pytorch, but confronted with the following problem:
Traceback (most recent call last):
File"D:\jktong\LCNIl-FIT-exp-size\250by250\Train_directions_complex_gpu_large_u7.3.py", line 223, in loss.backward()
File “c: \Users \hplanaconda3\libisite-packages \torch\tensor.py " , line 245,in backward torch.autograd.backward(self, gradient,retain_graph,create_graph，inputs=inputs)
File"c:\Users\hplanaconda3\liblsite-packages \torchlautogradl_init_.py",line 145,in backward variable._execution_engine.run_backward(
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED
The program can be run smoothly on three NVIDIA RTX 2080Ti graphical cards, so it seems that our program has no problems.
The cuda version of our workstation is 11.1, cudnn version is 11.3 and pytorch version is 1.8.2.
I have tried to search for the recommended version of pytorch with this graphical cards, but it seems this card is too new, could you please give us some suggestions to solve the problem (like recommend a suitable version of pytorch for this GPU)? Thank you!

Context:
I guess you might be using the PyTorch binaries with the CUDA 10.2 runtime, while you would need CUDA>=11.0. Check the shipped CUDA version via print(torch.version.cuda) and make sure it’s 11.

 tjk:

The cuda version of our workstation is 11.1, cudnn version is 11.3 and pytorch version is 1.8.2.

Your local CUDA toolkit won’t be used if you’ve installed the binaries, as they ship with their own CUDA runtime, cuDNN, NCCL etc., unless you are building from source or a custom CUDA extension (also cuDNN is currently at version 8, so you might have read the wrong version tag).


Question:
Hey all, not sure if this is the best place to post but it does seem at least potentially related to windows (or so I hope). I’ve been working on a project recently and seemingly out of nowhere I’ve hit a bottleneck where after a little training my ssd starts to max out and cuda utilization drops to low percentages as in the pic below (windows 10 pro):

image973×725 35 KB

Worried I pushed this ssd a little too hard and its dying now, but wanted another opinion on why this could be occurring. My external SSDs are still a little slower, however this ssd was capable of consistently utilizing cuda at 90% or so for the entirety of training only a couple days ago. This project is using mixed precision training, although I don’t imagine that would be all that relevant here (perhaps I’m wrong though). any value from 0 to 12 for num_workers has the same result after differing periods of training (although all less than one minute)
The project encountering the bottleneck is going through around 30,500 spectrogram pairs with each pair being 8MB. I tried another one of my projects which uses midi encoded into sequences of tokens where each file is 9kb, this one is able to max out cuda without issue which seems to point to the ssd being the issue. Is this in line with other peoples experiences after training for a while on an ssd? Are there any tips people might have to alleviate this issue? Not exactly a huge problem as I have free slots in my machine and can buy another ssd, but certainly something I’d like to avoid if not necessary.

Context:
I don’t know if there is a similar Windows tool, but I would try to check iotop to see the disk usage and all processes using IO operations (or are you already seeing the processes in the task manager and are sure that Python is indeed using the SSD)?
I’m not using Windows for real workloads, but have seen a high SSD usage in the past whenever Windows thought about updates performed in the background, which also decreased the overall performance massively without a warning.


Question:
Hi everyone, I’m trying to get some software i got from GitHub working.
Here is the GitHub link: GitHub - wonjongg/StyleCariGAN: Official implementation of "StyleCariGAN: Caricature Generation via StyleGAN Feature Map Modulation" (SIGGRAPH 2021)
I got almost everything working up until i  enter:
python test.py --ckpt checkpoint/StyleCariGAN/001000.pt --input_dir examples/samples --output_dir examples/results --invert_images"
However, I receive the error:
C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py:316: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\cuda\__init__.py:143: UserWarning:
NVIDIA GeForce RTX 3080 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 3080 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
  File "test.py", line 10, in <module>
    from invert import *
  File "C:\Users\nicol\StyleCariGAN\invert.py", line 12, in <module>
    from exaggeration_model import StyleCariGAN
  File "C:\Users\nicol\StyleCariGAN\exaggeration_model.py", line 7, in <module>
    from model import PixelNorm, EqualLinear, ConstantInput, StyledConv, ToRGB, ExaggerationLayer
  File "C:\Users\nicol\StyleCariGAN\model.py", line 13, in <module>
    from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
  File "C:\Users\nicol\StyleCariGAN\op\__init__.py", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "C:\Users\nicol\StyleCariGAN\op\fused_act.py", line 15, in <module>
    os.path.join(module_path, "fused_bias_act_kernel.cu"),
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1136, in load
    keep_intermediates=keep_intermediates)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1347, in _jit_compile
    is_standalone=is_standalone)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1445, in _write_ninja_file_and_build_library
    is_standalone=is_standalone)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 1885, in _write_ninja_file_to_build_library
    with_cuda=with_cuda)
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\cpp_extension.py", line 2001, in _write_ninja_file
    'cl']).decode(*SUBPROCESS_DECODE_ARGS).split('\r\n')
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "C:\Users\nicol\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

I did some googling and tried installing MSCV 14.0 and adding it to PATH, but with no luck. Thank you for any help! I’m very desperate to get this working!

Context: 3080 requires CUDA 11.1+


RuntimeError: CUDA error: no kernel image is available for execution on the device , when I use cuda in Nvidia Geforce 730 GT

Question:
I installed Cuda Toolkit 11.1, cnDNN the latest version, and pytorch for CUDA 11.1 from pip.
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html 13
I use the Anaconda3 last version with Python 3.8.5
And I use a Nvidia Geforce 730 GT 2Gb DDR3 ver. 128bit
(base) C:\Users\MIPC>python
Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.current_device()
0
>>> torch.cuda.device(0)
<torch.cuda.device object at 0x0000019765D4E310>
>>> torch.cuda.device_count()
1
>>> torch.cuda.get_device_name(0)
'NVIDIA GeForce GT 730'
>>> torch.cuda.is_available()
True
>>> t = torch.tensor(1, dtype = torch.int32, device = "cuda")
>>> t = torch.tensor([1.1, 2.2, 3.3], dtype = torch.double64, device = "cuda")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'torch' has no attribute 'double64'
>>> t = torch.tensor([
...     [1,1,1,1],
...     [2,2,2,2],
...     [3,3,3,3]
... ], dtype=torch.float32, device = "cuda")
>>> exit()

apparently it works, right?
And then check that
(base) C:\Users\MIPC\Desktop\MATI\Vtuber_HP\VtuberProject\Assets\TrackingBackend>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_14_22:08:44_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.2, V11.2.152
Build cuda_11.2.r11.2/compiler.29618528_0

And check the architecture, but I don’t understand what is this?
(base) C:\Users\MIPC\Desktop\MATI\Vtuber_HP\VtuberProject\Assets\TrackingBackend>python
Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.get_arch_list()
['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'compute_37']
>>>

It’s extrange, because I did not find errors in the installation
(base) C:\Users\MIPC>python
Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

(base) C:\Users\MIPC>pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.8.1+cu111
  Using cached https://download.pytorch.org/whl/cu111/torch-1.8.1%2Bcu111-cp38-cp38-win_amd64.whl (3055.7 MB)
Collecting torchvision==0.9.1+cu111
  Using cached https://download.pytorch.org/whl/cu111/torchvision-0.9.1%2Bcu111-cp38-cp38-win_amd64.whl (1.9 MB)
Collecting torchaudio===0.8.1
  Using cached torchaudio-0.8.1-cp38-none-win_amd64.whl (109 kB)
Requirement already satisfied: typing-extensions in c:\users\mipc\anaconda3\lib\site-packages (from torch==1.8.1+cu111) (3.7.4.3)
Requirement already satisfied: numpy in c:\users\mipc\anaconda3\lib\site-packages (from torch==1.8.1+cu111) (1.19.2)
Requirement already satisfied: pillow>=4.1.1 in c:\users\mipc\anaconda3\lib\site-packages (from torchvision==0.9.1+cu111) (8.0.1)
Installing collected packages: torch, torchvision, torchaudio
Successfully installed torch-1.8.1+cu111 torchaudio-0.8.1 torchvision-0.9.1+

But when i run my code…
Traceback (most recent call last):
  File "main.py", line 41, in <module>
    pose_data = pose_estimator.get_pose_data(img.copy())
  File "C:\Users\MIPC\Desktop\MATI\Vtuber_HP\VtuberProject\Assets\TrackingBackend\utils\pose_estimator.py", line 74, in get_pose_data
    heatmaps, pafs, scale, pad = self.infer_fast(img)
  File "C:\Users\MIPC\Desktop\MATI\Vtuber_HP\VtuberProject\Assets\TrackingBackend\utils\pose_estimator.py", line 49, in infer_fast
    stages_output = self.net(tensor_img)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\MIPC\Desktop\MATI\Vtuber_HP\VtuberProject\Assets\TrackingBackend\emotion_models\with_mobilenet.py", line 134, in forward
    backbone_features = self.model(x)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\container.py", line 119, in forward
    input = module(input)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\container.py", line 119, in forward
    input = module(input)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 399, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "C:\Users\MIPC\anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 395, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: CUDA error: no kernel image is available for execution on the device

what should I do?

Context: The GT 730 has a compute capability 3.5, which isn’t shipped in the prebuilt binaries anymore, so you could build PyTorch from source as described here 185.


PyTorch 1.10 keeps installing in cpu only mode

Question:
I am using anaconda under windows 11.
After fully uninstalling my previous PyTorch 1.9 installation(which worked in CUDA mode),
I tried the following(as per official guidelines):
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
Although this does install the cudatoolkit, pytorch and the other packages installs the CPU version alongside the package “cpuonly”
How do I install the CUDA version of pytorch?

Context:
You might try downloading the tar file from:
https://anaconda.org/pytorch/pytorch/files 41
and installing via the command line:

      stackoverflow.com

  Installing modules to Anaconda from .tar.gz 18

  python-3.x, anaconda

  asked by

    user4550164

  on 01:36AM - 18 Jul 17 UTC


Question:
Trying to install PyTorch with the given command from the homepage with Stable, Windows, Pip, Python and Cuda 11.3.
The command I get is
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
I get the error
ERROR: Could not find a version that satisfies the requirement torch==1.10.0+cu113 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.10.0+cu113

I have Python 3.10.0 installed, in 64 bit (same as my system) with Pip installed with it.
I have CUDA 11.5 installed from NVIDIA’s site.
I have looked multiple places and found no solution, please help.

Context: The issue is with your python version. You need python 3.8 because the repositories aren’t yet available for python 3.10


Quickstart tutorial: __array__() takes 1 positional argument but 2 were given

Question:
I’ve tried the quickstart tutorial 2 on two machines - one without a CUDA-compatible GPU running PyTorch 1.9.0-CPU, and the other with CUDA-compatible GPU running PyTorch 1.9.0+cu111. For the first one (with CPU), the tutorial works fine, however with the second one (with CUDA) it fails in the first section.
I copied and pasted the code in directly from the tutorial:
import torch
from torch import nn
from torch.utils.data import DataLoader
from torchvision import datasets
from torchvision.transforms import ToTensor, Lambda, Compose
import matplotlib.pyplot as plt

# Download training data from open datasets.
training_data = datasets.FashionMNIST(
    root="data",
    train=True,
    download=True,
    transform=ToTensor(),
)

# Download test data from open datasets.
test_data = datasets.FashionMNIST(
    root="data",
    train=False,
    download=True,
    transform=ToTensor(),
)

batch_size = 64

# Create data loaders.
train_dataloader = DataLoader(training_data, batch_size=batch_size)
test_dataloader = DataLoader(test_data, batch_size=batch_size)

for X, y in test_dataloader:
    print("Shape of X [N, C, H, W]: ", X.shape)
    print("Shape of y: ", y.shape, y.dtype)
    break

Running this gives me the error:
TypeError: __array__() takes 1 positional argument but 2 were given

It’s the for loop that causes the error, it runs fine if that for loop is commented out. Looking on this forum and google, it seems a common reason is ommitting the init method from a function, but obviously I haven’t defined any functions yet in this tutorial.
Thanks for any help.

Context:
The issue might be related to PIL==8.3.0 as described here 63 and @tom already provided a fix here 81.
If you are also using PIL==8.3.0, downgrade it to 8.2.0 for now. If that’s not the case, please let us know and we’ll take another look into your issue.


Question:
[WinError 1455] The paging file is too small for this operation to complete. Error loading “C:\Users\gtu\anaconda3\envs\Deeplearning\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll” or one of its dependencies.
How can I overcome this error?

Context: I don’t use Windows, but this issue 199 came as a direct result searching for your error message.


Build Pytorch from source with cuda 9.2 or lower version on windows 10

Question:
I have Cuda 9.2
while building i am getting
-- Caffe2: CUDA toolkit directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2
CMake Error at cmake/public/cuda.cmake:42 (message):
  PyTorch requires CUDA 10.2 or above.
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1191 (include)
  CMakeLists.txt:664 (include)

I want to build it with cuda 9.2 only how to proceed?
on git page I was not able to find any relevant document.

Context: You would need to checkout an older branch, as the current master needs CUDA>=10.2 as seen here 16.


MemoryError when spawning workers under Windows

Question:
Hi,
I am getting a MemoryError when iterating over train_loader in the following code snippet:
    def optimizer_step():
        optimizer.zero_grad()
        losses = []
        print(h.heap())
        for x_batch, y_batch in train_loader:
            # print(f"batch_size: {x_batch.shape}, {y_batch.shape}")
            prediction = model(x_batch)
            loss = loss_function(prediction, y_batch)
            print("Loss: ", loss.item())
            loss.backward()
            losses.append(loss.unsqueeze(0))
        losses = torch.cat(losses, dim=0)
        return torch.sum(losses)

The thing that’s odd is I’m running Python 64-bit under Windows 10 with >30GB free RAM. When I run guppy.hpy.heap() I get see this memory usage:
Partition of a set of 642221 objects. Total size = 72264693 bytes.

And here is the full traceback:
Traceback (most recent call last):
  File "C:\Users\Gili\Documents\myproject\aggregator\src\main\python\com.mycompany.aggregator\pytorch-ours.py", line 181, in <module>
    optimizer.step(optimizer_step)
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\optim\optimizer.py", line 88, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\optim\lbfgs.py", line 311, in step
    orig_loss = closure()
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\Gili\Documents\myproject\aggregator\src\main\python\com.mycompany.aggregator\pytorch-ours.py", line 157, in optimizer_step
    for x_batch, y_batch in train_loader:
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\utils\data\dataloader.py", line 354, in __iter__
    self._iterator = self._get_iterator()
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator
    return _MultiProcessingDataLoaderIter(self)
  File "C:\Users\Gili\Documents\myproject\python\lib\site-packages\torch\utils\data\dataloader.py", line 918, in __init__
    w.start()
  File "C:\Python39\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Python39\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Python39\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Python39\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
MemoryError

How do I go about debugging what is going on? I tried reducing num_workers to 1 and the problem still occurs. Setting num_workers to 0 avoids the problem but this operation is computation-intensive so I want to run across multiple processes.

Context: I eventually caught on that one of my model’s fields was transitively referencing a large amount of samples, all of which were being serializes/unserialized across the worker processes.


Unable to use CUDA after it fails due to an OOM error

Question:
Hi,
I am attempting to train a model on the GPU and if the operation fails due to an out of memory error, I want to reduce the batch size and try again. I posted a testcase at Anomaly detection: Error detected in CudnnRnnBackward0 · Issue #65301 · pytorch/pytorch · GitHub showing that retrying the operation always fails with CUDA error: an illegal memory access was encountered.
I suspect there is a bug in the pytorch C++ implementation but I can’t be certain without further investigation by a pytorch committer.
Is anyone else able to reproduce this error using the testcase?
Am I supposed to somehow reset the CUDA state after an out of memory error?
Is this code doing anything wrong?
Thank you,
Gili

Context: Not sure about illegal access, but check how much of your dataset your are loading and how much memory your model requires.


Commandline hangs when trying to use GPU (CTRL+C doesn’t kill process)

Question:
Hi,
I’m attempting to use Pytorch on a new Windows machine. I can’t seem to get a working pytorch configuration.
I am using Windows 10 with Nvidia RTX A6000. I have tried several driver versions, cuda versions and pytorch versions in various configurations but I can’t seem to use pytorch.
I don’t get an error message. Instead, any time I try to send anything to the GPU, the commandline freezes completely and CTRL+C doesn’t stop execution, I have to CTRL+Pause/Break to stop execution. For example the line torch.rand(3,3,device=‘cuda:0’) causes the cmd to hang. (but torch.rand(3,3) works fine)
My current software versions are:
graphics driver version 460.89
Cuda 11.1
pytorch 1.8.2
torch.cuda.is_available() returns true
torch.version.cuda returns 11.1
Any ideas of what I should try are appreciated.

Context: Hello, I’ve solved my issue and it was caused by the Windows power performance being set to ‘power saving’. Switching it to ‘high performance’ has allowed me to use pytorch normally.


Question:
Hi, I have implemented the following model:
# Solution for CIFAR-10 dataset, using NN with one hidden layer

import torch
import torchvision
import torch.nn as nn
import matplotlib.pyplot as plt
import torch.nn.functional as F
import torchvision.transforms as transforms
from torch.backends import cudnn
from torchvision.datasets import CIFAR10
from torch.utils.data import random_split
from torch.utils.data import DataLoader

dtype = torch.cuda.FloatTensor
cudnn.benchmark = True

# Hyperparmeters
batch_size = 100
learning_rate1 = 0.01
learning_rate2 = 0.003
epochs1 = 7
epochs2 = 10

# Other constants
input_size = 32*32*3
hidden_size = 64
num_classes = 10

# Computing on GPU (if possible)
def get_default_device():
    """Pick GPU if available, else CPU"""
    if torch.cuda.is_available():
        return torch.device('cuda')
    else:
        return torch.device('cpu')

def to_device(data, device):
    # Move tensor(s) to chosen device
    if isinstance(data, (list,tuple)):
        return [to_device(x, device) for x in data]
    return data.to(device, non_blocking=True)

class DeviceDataLoader():
    """Wrap a dataloader to move data to a device"""

    def __init__(self, dl, device):
        self.dl = dl
        self.device = device

    def __iter__(self):
        """Yield a batch of data after moving it to device"""
        for b in self.dl:
            yield to_device(b, self.device)

    def __len__(self):
        """Number of batches"""
        return len(self.dl)

# Download dataset and split for validation
dataset = CIFAR10(root='data/', train=True, transform=transforms.ToTensor(), download=True)
test_ds = CIFAR10(root='data/', train=False, transform=transforms.ToTensor(), download=True)
train_ds, val_ds = random_split(dataset, [40000, 10000])

train_dl = DeviceDataLoader(DataLoader(train_ds, batch_size, shuffle=True, pin_memory=True), get_default_device())
val_dl = DeviceDataLoader(DataLoader(val_ds, batch_size, shuffle=True, pin_memory=True), get_default_device())

# Define accuracy function (for programmer):
def accuracy(outputs, labels):
    _, preds = torch.max(outputs, dim=1)
    return torch.tensor(torch.sum(preds == labels).item() / len(preds))

# Define the model:
class CifarModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(input_size, hidden_size)
        self.linear2 = nn.Linear(hidden_size, num_classes)

    def forward(self, xb):
        xb = xb.view(xb.size(0), -1)
        out = self.linear1(xb)
        # activate function:
        out = F.relu(out)
        out = self.linear2(out)
        return out

    def training_step(self, batch):
        images, labels = batch
        out = self(images)  # Generate predictions
        loss = F.cross_entropy(out, labels)  # Calculate loss
        return loss

    def validation_step(self, batch):
        images, labels = batch
        out = self(images)  # Generate predictions
        loss = F.cross_entropy(out, labels)  # Calculate loss
        acc = accuracy(out, labels)  # Calculate accuracy
        return {'val_loss': loss.detach(), 'val_acc': acc.detach()}

    def validation_epoch_end(self, outputs):
        batch_losses = [x['val_loss'] for x in outputs]
        epoch_loss = torch.stack(batch_losses).mean()  # Combine losses
        batch_accs = [x['val_acc'] for x in outputs]
        epoch_acc = torch.stack(batch_accs).mean()  # Combine accuracies
        return {'val_loss': epoch_loss.item(), 'val_acc': epoch_acc.item()}

    def epoch_end(self, epoch, result):
        print("Epoch [{}], val_loss: {:.4f}, val_acc: {:.4f}".format(epoch, result['val_loss'], result['val_acc']))

model = CifarModel()
to_device(model, get_default_device())

# Training functions:

def evaluate(model, val_dl):
    outputs = [model.validation_step(batch) for batch in val_dl]
    return model.validation_epoch_end(outputs)

def fit(epochs, lr, model, train_dl, val_dl, opt_func=torch.optim.SGD):
    history = []
    optimizer = opt_func(model.parameters(), lr)
    for epoch in range(epochs):
        # Training Phase
        for batch in train_dl:

            loss = model.training_step(batch)
            loss.backward()
            optimizer.step()
            optimizer.zero_grad()
        # Validation phase
        result = evaluate(model, val_dl)
        model.epoch_end(epoch, result)
        history.append(result)
    return history

history = fit(epochs1, learning_rate1, model, train_dl, val_dl)
history += fit(epochs2, learning_rate2, model, train_dl, val_dl)

print(history)

and I have checked that indeed all the data has moved to the GPU. however, when I run that code I still have a 100% CPU utilization and 4% GPU.
I have used this tutorial 1 .
Thanks.

Context:
The GPU is already used for the model forward and badckward passes.
However, since your model is really small, the CPU workload might be the bottleneck and would thus cause a low GPU utilization.
E.g. using some imaginary numbers:

GPU forward + backward pass takes 1s
data loading and processing as well as accuracy calculation takes 10s on the CPU

In this case, the CPU workload would be the bottleneck.


Installation problem (OSError: [Errno 2])

Question:
Hello!
I am having trouble installing torch. Here is the error:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\h_bas\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\caffe2\\python\\serialized_test\\data\\operator_test\\collect_and_distribute_fpn_rpn_proposals_op_test.test_collect_and_dist.zip'

OS: Windows 10 21H1 (build 19043.1202)
pip version: 21.2.3
Python version: 3.9.7
I’ve been looking for fixes, but I couldn’t find anything.
Would anyone have a solution? (Sorry if this as already been posted somewhere here)
If anyone has more questions on my setup I’ll be happy to provide more info.
Thank you.
PS: This is what I am running to install
pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

NVIDIA-SMI: 471.96
CUDA Version: 11.4

Context:
@frenchbones
Hi, this usually happens because the file path is too big. You can try the following link 219 to increase the acceptable length of file path.
C:\\Users\\h_bas\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\caffe2\\python\\serialized_test\\data\\operator_test\\collect_and_distribute_fpn_rpn_proposals_op_test.test_collect_and_dist.zip'


‘Conv2d’ object has no attribute ‘weight’ when debugging on Visual Studio 2017

Question:
Dear all.
When I run my code in debug mode on Visual Studio 2017, I get the following error message.

torch.nn.modules.module.ModuleAttributeError: ‘Conv2d’ object has no attribute ‘weight’

This error did not occur, when the code was run in release mode on Visual Studio 2017.
This error did not occur, when the code was run at the command prompt.
module.py
Line 778

    raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
        type(self).__name__, name))

My environment is as follows.

Windows 10.
Visual Studio 2017 Professional.

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 4

python -V

Python 3.7.1

python -c “import torch;print(torch.version);”

1.7.1+cu101

python -c “import torch;print(torch.cuda.is_available())”

True

python -c “import torch;print(torch.cuda.get_device_name());”

GeForce GTX 1080 Ti

python -c “import torch;print(torch.cuda.get_device_capability());”

(6, 1)

Call history:

    Module.__getattr__ line 779 Python symbols have been read.
    Module.__getattr__ line 779 Python symbol loaded.
    Module.register_parameter line 315 Python symbol loaded.
    Module.__setattr__ line 796 Python symbols have been read.
   _ConvNd.__init__ line 78 Python symbols have been loaded.
    Conv2d.__init__ line 412 Python symbols have been loaded.

watch:

                      self.__dict__       {'_backward_hooks': OrderedDict([]), '_buffers': OrderedDict([]), '_forward_hooks': OrderedDict([]), '_forward_pre_hooks': OrderedDict([]), '_load_state_dict_pre_hooks': OrderedDict([]), '_modules': OrderedDict([]), '_non_persistent_buffers_set': {}, '_parameters': OrderedDict([]), '_reversed_padding_r...ted_twice': (1, 1, 1, 1), '_state_dict_hooks': OrderedDict([]), 'dilation': (1, 1), 'groups': 1, 'in_channels': 3, 'kernel_size': (3, 3), ...}              dict
                     items()
                        ['training']           True       bool
                        ['_parameters']  OrderedDict([]) OrderedDict
                        ['_buffers']         OrderedDict([]) OrderedDict
                        ['_non_persistent_buffers_set']   {}           set
                        ['_backward_hooks']       OrderedDict([]) OrderedDict
                        ['_forward_hooks']          OrderedDict([]) OrderedDict
                        ['_forward_pre_hooks']   OrderedDict([]) OrderedDict
                        ['_state_dict_hooks']       OrderedDict([]) OrderedDict
                        ['_load_state_dict_pre_hooks']    OrderedDict([]) OrderedDict
                        ['_modules']       OrderedDict([]) OrderedDict
                        ['in_channels']   3            int
                        ['out_channels'] 64          int
                     ['kernel_size']    (3, 3)     tuple
                     ['stride']              (1, 1)     tuple
                     ['padding']          (1, 1)     tuple
                     ['dilation']           (1, 1)     tuple
                        ['transposed']    False     bool
                     ['output_padding']           (0, 0)     tuple
                        ['groups']            1            int
                        ['padding_mode']            'zeros'    str

I confirmed more.
conv.py
Conv2d.init
Line 412

    super(Conv2d, self).__init__(
        in_channels, out_channels, kernel_size, stride, padding, dilation,
        False, _pair(0), groups, bias, padding_mode)

conv.py
_ConvNd.init
Line 78

        self.weight = Parameter(torch.Tensor(
            out_channels, in_channels // groups, *kernel_size))

module.py
Module.setattr
Line 796

        self.register_parameter(name, value)

module.py
Module.register_parameter
Line 315

    elif hasattr(self, name) and name not in self._parameters:
        raise KeyError("attribute '{}' already exists".format(name))

module.py
Module.getattr
Line 779

    raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
        type(self).__name__, name))

Module.register_parameter method was calling hasattr method.
But getattr method was called.
So the error happened.
How can I fix it?

Context:
I found that I can continue debugging the code even when the error occurs.
I think hasattr method is catching the error.


Question:
Hi. I am struggling to compile many pre-build packages for windows, which are compiled with different cuda versions and torch versions.
example:

package_name-package_version-torch1.8.0-cu102-cp36-cp36m-win_amd64.whl
package_name-package_version-torch1.8.0-cu110-cp36-cp36m-win_amd64.whl
package_name-package_version-torch1.8.0-cu111-cp36-cp36m-win_amd64.whl

Context: I’m not sure I understand the issue correctly, so could you explain what “compile pre-built packages” would mean? Are you having trouble installing the Windows pip wheels or building wheels from source?


Fail to download LibTorch 1.8.2 for windows

Question:
I tried to download this link from the official website.
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-1.8.2%2Bcu111.zip 4
But I got Access Denied, please help.
The full message is:

AccessDenied
Access Denied
5PN39BYB7FAMTEF4
EMCyED2fW54u7BEqOJI9xq7xnxi5FwWNe/OySd1kA4kldglzp9IoGAQro6tZP4Jw6GXDiYHTVdY=

Context:
Your link is invalid, as PyTorch 1.8.2 doesn’t exist.
Change the link to the 1.8.1 or 1.9.0 version and it should work:
1.8.1 1
1.9.0 1


Question:
I’m currently trying to install pytorch 1.9.0 on windows 10 through conda on python3 with cuda 11.3
Everything installed but at the end of installation I get these errors:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package ‘conda-forge::cudatoolkit-11.1.1-heb2d755_7’.
Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::cudatoolkit-11.1.1-heb2d755_7
location of failed script: C:\Users\iLikeBuns\anaconda3\Scripts.cudatoolkit-post-link.bat
==> script messages <==

==> script output <==
stdout:
stderr: Access is denied.
return code: 1
()
I’ve been googling but I couldn’t find issues similar to mine.

Context: Did you resolve it? I have a same problem.


Stack overflow - conv1d.forward in DLL on CUDA

Question:
I faced a problem with calling conv1d.forward in DLL on CUDA.  In the following C++ code snippet line 4 ‘conv1d.forward’ crashes with stack overflow. The full CPP file (27 lines) is at the bottom of this message.
auto Net = torch::nn::Conv1d(torch::nn::Conv1dOptions(21, 2, 3));
Net->to(device);
torch::Tensor X = torch::rand({ 5,21,25 }).to(device);
torch::Tensor Y = Net->forward(X);

Having experimented on two PCs with different GPU types I found the problem is consistently reproduced if all of the following criteria are met:

DLL. The same code in console EXE application runs normally.
GPU/CUDA. There is no problem running the same code on CPU
Convolutional layer. No problem with other layer types, e.g. linear.

I tried debugging DLL in Visual Studio (debugger window screenshot attached). Call stack suggests that stack overflow happens inside cudnn_cnn_infer64_8.dll module. This is part of Nvidia CUDNN library.
I am not sure if this error is part of Pytorch or Nvidia CUDNN. If anyone has any suggestion on how to resolve this please respond.

screenshot2112×1188 339 KB

#include <torch/torch.h>
#define XLExport extern "C" __declspec(dllexport)
XLExport int _stdcall MLP_DLL();

int _stdcall MLP_DLL()
{
	std::ofstream log("output.txt");

	torch::Device device(torch::kCPU);
	if (torch::cuda::is_available()) {
		log << "Cuda found" << std::endl;
		device = torch::Device(torch::kCUDA);
	}

	auto Net = torch::nn::Conv1d(torch::nn::Conv1dOptions(21, 2, 3));
	Net->to(device);
	torch::Tensor X = torch::rand({ 5,21,25 }).to(device);

	log << " starting forward" << std::endl;

	torch::Tensor Y = Net->forward(X);
	log << "Y = " << std::endl;
	log << Y << std::endl;

	return 0;
}

Context:
UPDATE: this was my mistake. I used rundll32.exe to execute my DLL. Apparently, as rundll32 was originally designed to run Windows modules it is not suitable for custom-made DLL libraries.
My DLL runs normally if called not by rundll32.


Using `multiprocessing’ in PyTorch on Windows10 got error-RuntimeError: Couldn’t open shared file mapping: <torch_13684_4004974554>, error code: <0>

Question:
Hi,
I am currently running a PyTorch code on Windows10 using PyCharm. This code firstly utilised DataLoader' function (num_workers’=4) to load training data:
train_loader = DataLoader(train_dset, batch_size, shuffle=True,
                                  num_workers=4, collate_fn=trim_collate)

Then, in training process, it utilised a `for’ loop to load training data and train the model:
for i, (v, norm_bb, q, target, _, _, bb, spa_adj_matrix,
                        sem_adj_matrix) in enumerate(train_loader):

Error: I got the following error messages when running above `for’ loop:
0%|          | 0/6934 [00:00<?, ?it/s]Traceback (most recent call last):
  File "E:\PyTorch_env\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
    reduction.dump(process_obj, to_child)
  File "E:\PyTorch_env\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
  File "E:\PyTorch_env\lib\site-packages\torch\multiprocessing\reductions.py", line 286, in reduce_storage
    metadata = storage._share_filename_()
RuntimeError: Couldn't open shared file mapping: <torch_13684_4004974554>, error code: <0>
python-BaseException
Traceback (most recent call last):
  File "E:\PyTorch_env\lib\multiprocessing\spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
python-BaseException
  0%|          | 0/6934 [00:07<?, ?it/s]

It seems that there are some issues with the `multiprocessing’ function on Windows system. Could you please let me know if there are any possible solutions for this?
The environment settings:

Windows10, PyCharm
PyTorch v1.0.1, torchvision v0.2.2, Python 3.7.11
One GPU node

Many thanks!

Context: For the sake of completeness: issue is also tracked here 5.


Pytorch installation with AMD Ryzen CPU and Nvidia GPU

Question:
Hello there, I’m about to buy a laptop with AMD Ryzen 7 Octa Core 4800H and GPU NVIDIA GeForce GTX 1660 Ti.
I’m just wanna make sure that I wouldn’t face any issue with Torch cuda installation on this system (windows). Are there any issues that I could face later?

Context: Just something i want to add from personal experience, keep in mind gpu memory when buying a 1660Ti, 4gb / 6gb is reasonable for simple models but you might face a lot of hurdles in working with projects like medical imaging where you’ll be limited to using a batch size of 1 or 2.


Pytorch with Windows 7 dose not support training in multi-GPUs?

Question:
When I used “model = nn.DataParaller(model)” to use 3 GPUS(RTX2080TI)  to training my model, there were a warning showing that “PyTorch is not compiled with NCCL support”.
Dose  not  Pytorch with Windows 7 support training in multi-GPUs ?

Context: Based on this comment 2 it seems that the latest NCCL release (2.10.3) is supporting WSL2 partially, but I don’t think that a native Windows NCCL version exits, so you might need to check other distributed backends.


Pytorch 0.3.0 or 0.3.1 not available for windows now

Question: Is it impossible to install version 0.3.0 or 0.3.1 of pytorch on Windows now?

Context:
Hi Shuai!

 EricPengShuai:

Is it impossible to install version 0.3.0 or 0.3.1 of pytorch on Windows now?

I was able to install and run pytorch 0.3.0 on windows 10.  (My
motivation was to run pytorch on an old laptop gpu, and 0.3.0
was the newest version of pytorch I could find that was pre-built
with support for my old gpu.)
See this post from @ptrblck where he gives a link to some “legacy”
binaries built by @peterjc123 (but do read through the entire thread
for context):

    Pre-built pytorch for CUDA [compute capability] 3.0 on windows?

    Hi Frank,
I assume you are referring to the compute capability 3.0, which should work with CUDA6.0 - CUDA10.1.
If I’m not mistaken, the minimal compute capability for the current binaries is >=3.5, so you could build from source to support this older GPU.
However, if you would like to play around with some legacy PyTorch version, you might get lucky finding some supported binaries here (built by @peterjc123).
Since these binaries are quite old by now, I would recommend building from source. …

Please be aware, however, that newer versions of pytorch are much
better – they have numerous new and improved features, bug fixes,
performance enhancements, etc.  So you will encounter significant
disadvantages using an old version such as 0.3.0.
Good luck!
K. Frank


Torch.cuda.is_available return False, even though the driver is up to date

Question:
I’ve been trying to use GPU (notebook version of GTX 1650 Ti in Lenovo ideapad gaming 3 81Y4015PCK) in pytorch, but when I check for CUDA support by torch.cuda.is_available(), it returns False. I’m running under windows 10 with latest nvidia driver (installed a week ago), nvidia-smi reports driver version 471.41, cuda version 11.4. Pytorch is installed using pip, as shown on pytorch’s website
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
The weird thing is that I also tried to use Anaconda, that didn’t work either. I tried installing different versions of pytorch and cuda (10.2 and 11.1), I tried booting live images of Ubuntu, Pop OS (with preinstalled NVIDIA driver) and some other linux distros, and installing torch there, again with no success. I would’ve thought the GPU is dead, but all my games are running perfectly using that same GPU. Any clue, what might be the problem here?

Context:
Could you check the reported CUDA verison via print(torch.version.cuda) and make sure the specified binary was indeed installed?
If that’s the case, I would recommend to check your notebook for some power saving options, which could disable the GPU, and force it to run in a “performance” mode.


Question: Hello friends. I can’t install pytorch on my Windows 10 computer. Just showing “error opening file for writing” error. I don’t understand why this error is showing and how to solve this problem. Any suggestions will be appreciated.

Context: Could you check, if the entire error message mentions a specific folder and then check the permissions in it, as you might be running into a permission issue where Python isn’t allowed to move files to the desired location?


Question: Is their any way to install  detectron 2 on windows ?

Context:
Based on this information from the repository 41:

Although detectron2 can be installed on windows with some effort (similar to these 76), we do not provide official support for it.
PRs that improves code compatibility on windows are welcome.

it doesn’t seem that Windows is supported out of the box.


Question:
Hi, I’m trying to run a project within a conda env. I have a rtx 3070ti installed in my machine and it seems that the initialization function is causing issues in the program.
Error:
File "sTrain.py", line 37, in <module>                                                                   torch.cuda.set_device(gpuid)                                                                                File "/home/user/miniconda3/envs/deeplearningenv/lib/python3.6/site-packages/torch/cuda/__init__.py", line 263, in set_device                                                                                torch._C._cuda_setDevice(device)                                                                                File "/home/user/miniconda3/envs/deeplearningenv/lib/python3.6/site-packages/torch/cuda/__init__.py", line 172, in _lazy_init                                                                                torch._C._cuda_init()                                                                                RuntimeError: No CUDA GPUs are available
Any guidance would be very helpful. I tried uninstalling cudatookit, pytorch, and torchvision and reinstalling with conda install pytorch torchvision cudatoolkit=10.1 but I get the same error. I also the GPU appears in the device manager menu.
I’m not sure if this will aid in finding a solution but, trying torch.cuda.is_available() prints false.
Thank you in advance.

Context:
It seems you’ve installed a new driver while an older CUDA toolkit was still installed.
Try to compile CUDA examples and execute them to make sure your setup is working fine.
If that’s not the case, uninstall the driver and CUDA toolkit and reinstall it.


Import torch fails - duplicate CUDA device?

Question:
Pytorch keeps failing. Error message below when I run “import torch”

import torch
[F …\c10\core\CopyBytes.cpp:24] Check failed: g_copy_bytes[0][from][to] == nullptr && g_copy_bytes[1][from][to] == nullptr Duplicate registration for device type pair CUDA, CUDA

I have the following installed on top of Python 3.8.5
torch                   1.8.1+cu111
torchaudio              0.8.1
torchvision             0.9.1+cu102
I note that Torchvision does not seem to be compatible with CUDA 11.1.  There is not another verson of torchvision available.  Suggestions?
Note that after this error, the python interpreter crashes.
Running on windows 10 under Anaconda
Thanks
Francis

Context: Hello bro. Have you fixed that? I am currently encountering that issue also.


Installation of PyTorch with CUDA (RTX 2080 Ti, CUDA 11.1)

Question:
Hi guys, I have following issue and I hope I’m in the right category.
So I have following setup:

RTX2080 Ti
Python 3.9.4
NVIDIA-SMI Driver Version 461.33

When I run nvidia-smi, it returns said driver version and CUDA Version 11.2 (which, as I understand, is the most recent CUDA version my GPU supports, right?). When I run nvcc -V it returns:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Tue_Sep_15_19:12:04_Pacific_Daylight_Time_2020
Cuda compilation tools, release 11.1, V11.1.74
Build cuda_11.1.relgpu_drvr455TC455_06.29069683_0

which seems to be right since I’ve installed CUDA Toolkit 11.1 because I want it to work with PyTorch. I’m installing PyTorch (from the “getting started” page) with:
pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
Now when I start CMD or run any IDE/Editor and try to import torch, I’m getting following error:
Error loading "C:\Users\myusername\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\lib\cudnn_cnn_train64_8.dll" or one of its dependencies.
I don’t exactly understand what I’m doing wrong. Is there any chance that it’s not working because there is an “ü” in my username which I’ve replaced by “myusername” for privacy purposes? However, when I install the non-CUDA-version, I can import torch just fine.

Context:
GOOD luck man, I just passed one week to try to fix cuda (rtx3090). Finally I followed this tuto: Installing Pytorch with CUDA support on Windows 10 | by Eugenia Anello | Towards AI 102
I used cuda 11.0
pytorch: 1.7.1
and it works good now!


Torchvision and torchaudio for Windows missing on PyPI?

Question:
Hello everybody!
I’m a little puzzled by the current status of the PyTorch wheels for Windows on PyPI. I’m aware the “official” way of installing PyTorch through pip on Windows is to use the index from pytorch.
I noticed the wheel for the CPU build of the main torch package is available on PyPI, while the win wheels for torchvision and torchaudio packages are not.
I cannot find any recent helpful information about this, only some discussions in GitHub issues (mainly this and this) about binary size constraints from PyPI. Looking at the torchvision and torchaudio whls from the pytorch index, this should not be an issue, though, as they are both < 1 MB.
Also, the torchvision builds used to be pushed to PyPI (up until version 0.5.0) which makes me wonder even more why they are not anymore. On the other hand, torchaudio has never had any Windows wheels pushed.
I understand the binary size problems related to the CUDA builds with NVIDIA not providing a global CUDA PyPI package but I do not really see a reason why the CPU builds could not be pushed to PyPI?
Does somebody have more information about whether this is intended or if it’s just a bug?

Context:
Just as a quick update:
Starting with the

torch: 1.8.0,

torchvision: 0.9.0 and

torchaudio: 0.8.0

releases, the Windows (CPU) builds are available on PyPI again


Pytorch cuda 11.2 build from source: RuntimeError: CUDA error: no kernel image is available for execution on the device

Question:
Hello,
I am trying to install pytorch with cuda by following the build from source method.
I have cuda 11.2, nvtx11.2, cuDNN 8.1.1.33 nvidia cuda visual studio integration 11.2 and visual studio community ediiton 2019 16.6.30204.135. My GPU is compute 7.5 compatible (RTX 2070)
I am trying to build pytorch from a conda environment and I installed all the pre-requisites mentioned in the guide 8.
Before running setup.py install --cmake, I tried to set the following env variables:

MAGMA_HOME                     F:\pytorch-source\pytorch.jenkins\pytorch\win-test-helpers\installation-helpers\magma
LIB                            F:\pytorch-source\pytorch.jenkins\pytorch\win-test-helpers\installation-helpers\mkl\lib
CMAKE_GENERATOR                Ninja
TORCH_CUDA_ARCH_LIST           7.5
CMAKE_INCLUDE_PATH             F:\pytorch-source\pytorch.jenkins\pytorch\win-test-helpers\installation-helpers\mkl\include

The build and installation is working and it finishes successfully, however, when I try to actually create a tensor on the gpu, i get the following behavior:

import torch
torch.cuda.is_available()
True

torch.cuda.current_device()
0

torch.cuda.device(0)
<torch.cuda.device object at 0x000002731D947640>

torch.cuda.device_count()
1

torch.cuda.get_device_name(0)
‘GeForce RTX 2070’

torch.randn(1, device=“cuda”)
Traceback (most recent call last):
File “”, line 1, in
RuntimeError: CUDA error: no kernel image is available for execution on the device

Can someone please guide me further on troubleshooting this? It seems to me like maybe I am missing some configuration parameters when building? Also, I am struggling to find where the build logs are getting written in order to check in more detail how the build process is doing.
Below, you can find the beginning of the build log that should show the environment details and config options used for build:

– Building version 1.9.0a0+git01b1557
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR=Ninja -DCMAKE_INCLUDE_PATH=F:\TAID-Master\MLAV\pytorch-source\pytorch.jenkins\pytorch\win-test-helpers\installation-helpers\mkl\include -DCMAKE_INSTALL_PREFIX=F:\TAID-Master\MLAV\pytorch-source\pytorch\torch -DCMAKE_PREFIX_PATH=C:\ProgramData\Miniconda3\envs\pytorch-source\Lib\site-packages -DCUDNN_LIBRARY=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\lib\x64 -DNUMPY_INCLUDE_DIR=C:\ProgramData\Miniconda3\envs\pytorch-source\lib\site-packages\numpy\core\include -DPYTHON_EXECUTABLE=C:\ProgramData\Miniconda3\envs\pytorch-source\python.exe -DPYTHON_INCLUDE_DIR=C:\ProgramData\Miniconda3\envs\pytorch-source\include -DPYTHON_LIBRARY=C:\ProgramData\Miniconda3\envs\pytorch-source/libs/python38.lib -DTORCH_BUILD_VERSION=1.9.0a0+git01b1557 -DUSE_NUMPY=True F:\TAID-Master\MLAV\pytorch-source\pytorch
– The CXX compiler identification is MSVC 19.26.28806.0
– The C compiler identification is MSVC 19.26.28806.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Not forcing any particular BLAS to be found
CMake Warning at CMakeLists.txt:305 (message):
TensorPipe cannot be used on Windows.  Set it to OFF
– Performing Test COMPILER_WORKS
– Performing Test COMPILER_WORKS - Success
– Performing Test SUPPORT_GLIBCXX_USE_C99
– Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
– Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED
– Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
– std::exception_ptr is supported.
– Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
– Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success
– Current compiler supports avx2 extension. Will build perfkernels.
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS
– Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success
– Current compiler supports avx512f extension. Will build fbgemm.
– Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
– Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Failed
– Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Failed
– Performing Test COMPILER_SUPPORTS_RDYNAMIC
– Performing Test COMPILER_SUPPORTS_RDYNAMIC - Failed
– Building using own protobuf under third_party per request.
– Use custom protobuf build.
– 3.11.4.0
– Looking for pthread.h
– Looking for pthread.h - not found
– Found Threads: TRUE
– Caffe2 protobuf include directory: $<BUILD_INTERFACE:F:/TAID-Master/MLAV/pytorch-source/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
– Trying to find preferred BLAS backend of choice: MKL
– MKL_THREADING = OMP
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of void*
– Check size of void* - done
– Looking for cblas_sgemm
– Looking for cblas_sgemm - found
– MKL libraries: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_intel_lp64.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_intel_thread.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_core.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/libiomp5md.lib
– MKL include directory: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include
– MKL OpenMP type: Intel
– MKL OpenMP library: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/libiomp5md.lib
– The ASM compiler identification is MSVC
– Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
CMake Deprecation Warning at third_party/googletest/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
** AsmJit Summary **
ASMJIT_DIR=F:/TAID-Master/MLAV/pytorch-source/pytorch/third_party/fbgemm/third_party/asmjit
ASMJIT_TEST=FALSE
ASMJIT_TARGET_TYPE=SHARED
ASMJIT_DEPS=
ASMJIT_LIBS=asmjit
ASMJIT_CFLAGS=
ASMJIT_PRIVATE_CFLAGS=-MP;-GF;-Zc:inline;-Zc:strictStrings;-Zc:threadSafeInit-;-W4
ASMJIT_PRIVATE_CFLAGS_DBG=-GS
ASMJIT_PRIVATE_CFLAGS_REL=-GS-;-O2;-Oi
– Using third party subdirectory Eigen.
– Found PythonInterp: C:/ProgramData/Miniconda3/envs/pytorch-source/python.exe (found suitable version “3.8.8”, minimum required is “3.0”)
– Found PythonLibs: C:/ProgramData/Miniconda3/envs/pytorch-source/libs/python38.lib (found suitable version “3.8.8”, minimum required is “3.0”)
– Could NOT find pybind11 (missing: pybind11_DIR)
– Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)
– Using third_party/pybind11.
– pybind11 include dirs: F:/TAID-Master/MLAV/pytorch-source/pytorch/cmake/…/third_party/pybind11/include
– Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
– Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
– Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
Reason given by package: MPI component ‘Fortran’ was requested, but language Fortran is not enabled.
CMake Warning at cmake/Dependencies.cmake:1045 (message):
Not compiling with MPI.  Suppress this warning with -DUSE_MPI=OFF
Call Stack (most recent call first):
CMakeLists.txt:604 (include)
– Adding OpenMP CXX_FLAGS: -openmp:experimental -IF:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include
– Will link against OpenMP libraries: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/libiomp5md.lib
– Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2 (found version “11.2”)
– Caffe2: CUDA detected: 11.2
– Caffe2: CUDA nvcc is: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe
– Caffe2: CUDA toolkit directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
– Caffe2: Header version is: 11.2
– Found CUDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cudnn.lib
– Found cuDNN: v8.1.1  (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cudnn.lib)
– C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/nvrtc.lib shorthash is aa1d5a72
CMake Warning at cmake/public/utils.cmake:365 (message):
In the future we will require one to explicitly pass TORCH_CUDA_ARCH_LIST
to cmake instead of implicitly setting it as an env variable.  This will
become a FATAL_ERROR in future version of pytorch.
Call Stack (most recent call first):
cmake/public/cuda.cmake:483 (torch_cuda_get_nvcc_gencode_flag)
cmake/Dependencies.cmake:1150 (include)
CMakeLists.txt:604 (include)
– Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
– Found CUB: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/include
CMake Warning (dev) at third_party/gloo/CMakeLists.txt:21 (option):
Policy CMP0077 is not set: option() honors normal variables.  Run “cmake
–help-policy CMP0077” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable ‘BUILD_BENCHMARK’.
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at third_party/gloo/CMakeLists.txt:34 (option):
Policy CMP0077 is not set: option() honors normal variables.  Run “cmake
–help-policy CMP0077” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
– MSVC detected
– Set USE_REDIS OFF
– Set USE_IBVERBS OFF
– Set USE_NCCL OFF
– Set USE_RCCL OFF
– Set USE_LIBUV ON
– Only USE_LIBUV is supported on Windows
– Gloo build as SHARED library
– Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2 (found suitable version “11.2”, minimum required is “7.0”)
– CUDA detected: 11.2
CMake Warning at cmake/Dependencies.cmake:1394 (message):
Metal is only used in ios builds.
Call Stack (most recent call first):
CMakeLists.txt:604 (include)
Generated: F:/TAID-Master/MLAV/pytorch-source/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.proto
Generated: F:/TAID-Master/MLAV/pytorch-source/pytorch/build/third_party/onnx/onnx/onnx-operators_onnx_torch-ml.proto
Generated: F:/TAID-Master/MLAV/pytorch-source/pytorch/build/third_party/onnx/onnx/onnx-data_onnx_torch.proto
– ******** Summary ********
–   CMake version         : 3.19.6
–   CMake command         : C:/ProgramData/Miniconda3/envs/pytorch-source/Library/bin/cmake.exe
–   System                : Windows
–   C++ compiler          : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
–   C++ compiler version  : 19.26.28806.0
–   CXX flags             : /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IF:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include
–   Build type            : Release
–   Compile definitions   : WIN32_LEAN_AND_MEAN;TH_BLAS_MKL;_OPENMP_NOFORCE_MANIFEST;ONNX_ML=1;ONNXIFI_ENABLE_EXT=1
–   CMAKE_PREFIX_PATH     : C:\ProgramData\Miniconda3\envs\pytorch-source\Lib\site-packages;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
–   CMAKE_INSTALL_PREFIX  : F:/TAID-Master/MLAV/pytorch-source/pytorch/torch
–   CMAKE_MODULE_PATH     : F:/TAID-Master/MLAV/pytorch-source/pytorch/cmake/Modules;F:/TAID-Master/MLAV/pytorch-source/pytorch/cmake/public/…/Modules_CUDA_fix
–   ONNX version          : 1.8.0
–   ONNX NAMESPACE        : onnx_torch
–   ONNX_BUILD_TESTS      : OFF
–   ONNX_BUILD_BENCHMARKS : OFF
–   ONNX_USE_LITE_PROTO   : OFF
–   ONNXIFI_DUMMY_BACKEND : OFF
–   ONNXIFI_ENABLE_EXT    : OFF
–   Protobuf compiler     :
–   Protobuf includes     :
–   Protobuf libraries    :
–   BUILD_ONNX_PYTHON     : OFF
– ******** Summary ********
–   CMake version         : 3.19.6
–   CMake command         : C:/ProgramData/Miniconda3/envs/pytorch-source/Library/bin/cmake.exe
–   System                : Windows
–   C++ compiler          : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
–   C++ compiler version  : 19.26.28806.0
–   CXX flags             : /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IF:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include
–   Build type            : Release
–   Compile definitions   : WIN32_LEAN_AND_MEAN;TH_BLAS_MKL;_OPENMP_NOFORCE_MANIFEST;ONNX_ML=1;ONNXIFI_ENABLE_EXT=1
–   CMAKE_PREFIX_PATH     : C:\ProgramData\Miniconda3\envs\pytorch-source\Lib\site-packages;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
–   CMAKE_INSTALL_PREFIX  : F:/TAID-Master/MLAV/pytorch-source/pytorch/torch
–   CMAKE_MODULE_PATH     : F:/TAID-Master/MLAV/pytorch-source/pytorch/cmake/Modules;F:/TAID-Master/MLAV/pytorch-source/pytorch/cmake/public/…/Modules_CUDA_fix
–   ONNX version          : 1.4.1
–   ONNX NAMESPACE        : onnx_torch
–   ONNX_BUILD_TESTS      : OFF
–   ONNX_BUILD_BENCHMARKS : OFF
–   ONNX_USE_LITE_PROTO   : OFF
–   ONNXIFI_DUMMY_BACKEND : OFF
–   Protobuf compiler     :
–   Protobuf includes     :
–   Protobuf libraries    :
–   BUILD_ONNX_PYTHON     : OFF
– Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor
– Adding -DNDEBUG to compile flags
– Checking prototype magma_get_sgeqrf_nb for MAGMA_V2
– Checking prototype magma_get_sgeqrf_nb for MAGMA_V2 - True
– Compiling with MAGMA support
– MAGMA INCLUDE DIRECTORIES: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/magma/include
– MAGMA LIBRARIES: F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/magma/lib/magma.lib
– MAGMA V2 check: 1
– Could not find hardware support for NEON on this machine.
– No OMAP3 processor on this machine.
– No OMAP4 processor on this machine.
– Looking for cpuid.h
– Looking for cpuid.h - not found
– Performing Test NO_GCC_EBX_FPIC_BUG
– Performing Test NO_GCC_EBX_FPIC_BUG - Failed
– Performing Test C_HAS_AVX_1
– Performing Test C_HAS_AVX_1 - Success
– Performing Test C_HAS_AVX2_1
– Performing Test C_HAS_AVX2_1 - Success
– Performing Test CXX_HAS_AVX_1
– Performing Test CXX_HAS_AVX_1 - Success
– Performing Test CXX_HAS_AVX2_1
– Performing Test CXX_HAS_AVX2_1 - Success
– AVX compiler support found
– AVX2 compiler support found
– Performing Test BLAS_F2C_DOUBLE_WORKS
– Performing Test BLAS_F2C_DOUBLE_WORKS - Failed
– Performing Test BLAS_F2C_FLOAT_WORKS
– Performing Test BLAS_F2C_FLOAT_WORKS - Success
– Performing Test BLAS_USE_CBLAS_DOT
– Performing Test BLAS_USE_CBLAS_DOT - Success
– Found a library with BLAS API (mkl). Full path: (F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_intel_lp64.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_intel_thread.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/mkl_core.lib;F:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/lib/libiomp5md.lib)
– Found a library with LAPACK API (mkl).
disabling ROCM because NOT USE_ROCM is set
– MIOpen not found. Compiling without MIOpen support
– MKLDNN_CPU_RUNTIME = OMP
CMake Deprecation Warning at third_party/ideep/mkl-dnn/CMakeLists.txt:17 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument  value or use a … suffix to tell
CMake that the project does not need compatibility with older versions.
– Intel MKL-DNN compat: set DNNL_ENABLE_CONCURRENT_EXEC to MKLDNN_ENABLE_CONCURRENT_EXEC with value ON
– Intel MKL-DNN compat: set DNNL_BUILD_EXAMPLES to MKLDNN_BUILD_EXAMPLES with value FALSE
– Intel MKL-DNN compat: set DNNL_BUILD_TESTS to MKLDNN_BUILD_TESTS with value FALSE
– Intel MKL-DNN compat: set DNNL_LIBRARY_TYPE to MKLDNN_LIBRARY_TYPE with value STATIC
– Intel MKL-DNN compat: set DNNL_ARCH_OPT_FLAGS to MKLDNN_ARCH_OPT_FLAGS with value ``
– Intel MKL-DNN compat: set DNNL_CPU_RUNTIME to MKLDNN_CPU_RUNTIME with value OMP
– Found OpenMP_CXX: -openmp:experimental -IF:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include
– GPU support is disabled
– Primitive cache is enabled
– Found MKL-DNN: TRUE
– Performing Test C_HAS_THREAD
– Performing Test C_HAS_THREAD - Success
– Version: 7.0.3
– Build type: Release
– CXX_STANDARD: 14
– Performing Test has_std_14_flag
– Performing Test has_std_14_flag - Failed
– Performing Test has_std_1y_flag
– Performing Test has_std_1y_flag - Failed
– Performing Test SUPPORTS_USER_DEFINED_LITERALS
– Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
– Performing Test FMT_HAS_VARIANT
– Performing Test FMT_HAS_VARIANT - Success
– Required features: cxx_variadic_templates
– Looking for _strtod_l
– Looking for _strtod_l - found
– Not using libkineto in a Windows build.
– CUDA build detected, configuring Kineto with CUPTI support.
– Looking for backtrace
– Looking for backtrace - not found
– Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
– don’t use NUMA
– Performing Test COMPILER_SUPPORTS_NO_AVX256_SPLIT
– Performing Test COMPILER_SUPPORTS_NO_AVX256_SPLIT - Failed
– Using ATen parallel backend: OMP
AT_INSTALL_INCLUDE_DIR include/ATen/core
core header install: F:/TAID-Master/MLAV/pytorch-source/pytorch/build/aten/src/ATen/core/TensorBody.h
– NCCL operators skipped due to no CUDA support
– Excluding FakeLowP operators
– Including IDEEP operators
– Excluding image processing operators due to no opencv
– Excluding video processing operators due to no opencv
– MPI operators skipped due to no MPI support
– Include Observer library
–
– ******** Summary ********
– General:
–   CMake version         : 3.19.6
–   CMake command         : C:/ProgramData/Miniconda3/envs/pytorch-source/Library/bin/cmake.exe
–   System                : Windows
–   C++ compiler          : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
–   C++ compiler id       : MSVC
–   C++ compiler version  : 19.26.28806.0
–   Using ccache if found : OFF
–   CXX flags             : /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IF:/TAID-Master/MLAV/pytorch-source/pytorch/.jenkins/pytorch/win-test-helpers/installation-helpers/mkl/include -DNDEBUG -DUSE_FBGEMM -DUSE_XNNPACK
–   Build type            : Release
–   Compile definitions   : WIN32_LEAN_AND_MEAN;TH_BLAS_MKL;_OPENMP_NOFORCE_MANIFEST;ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;ONNX_NAMESPACE=onnx_torch;_CRT_SECURE_NO_DEPRECATE=1;MAGMA_V2;IDEEP_USE_MKL;USE_EXTERNAL_MZCRC;MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
–   CMAKE_PREFIX_PATH     : C:\ProgramData\Miniconda3\envs\pytorch-source\Lib\site-packages;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
–   CMAKE_INSTALL_PREFIX  : F:/TAID-Master/MLAV/pytorch-source/pytorch/torch
–   TORCH_VERSION         : 1.9.0
–   CAFFE2_VERSION        : 1.9.0
–   BUILD_CAFFE2          : ON
–   BUILD_CAFFE2_OPS      : ON
–   BUILD_CAFFE2_MOBILE   : OFF
–   BUILD_STATIC_RUNTIME_BENCHMARK: OFF
–   BUILD_TENSOREXPR_BENCHMARK: OFF
–   BUILD_BINARY          : OFF
–   BUILD_CUSTOM_PROTOBUF : ON
–     Link local protobuf : ON
–   BUILD_DOCS            : OFF
–   BUILD_PYTHON          : True
–     Python version      : 3.8.8
–     Python executable   : C:/ProgramData/Miniconda3/envs/pytorch-source/python.exe
–     Pythonlibs version  : 3.8.8
–     Python library      : C:/ProgramData/Miniconda3/envs/pytorch-source/libs/python38.lib
–     Python includes     : C:/ProgramData/Miniconda3/envs/pytorch-source/include
–     Python site-packages: Lib/site-packages
–   BUILD_SHARED_LIBS     : ON
–   CAFFE2_USE_MSVC_STATIC_RUNTIME     : OFF
–   BUILD_TEST            : True
–   BUILD_JNI             : OFF
–   BUILD_MOBILE_AUTOGRAD : OFF
–   BUILD_LITE_INTERPRETER: OFF
–   INTERN_BUILD_MOBILE   :
–   USE_BLAS              : 1
–     BLAS                : mkl
–   USE_LAPACK            : 1
–     LAPACK              : mkl
–   USE_ASAN              : OFF
–   USE_CPP_CODE_COVERAGE : OFF
–   USE_CUDA              : ON
–     Split CUDA          : OFF
–     CUDA static link    : OFF
–     USE_CUDNN           : ON
–     CUDA version        : 11.2
–     cuDNN version       : 8.1.1
–     CUDA root directory : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
–     CUDA library        : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cuda.lib
–     cudart library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cudart_static.lib
–     cublas library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cublas.lib
–     cufft library       : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cufft.lib
–     curand library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/curand.lib
–     cuDNN library       : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/cudnn.lib
–     nvrtc               : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/lib/x64/nvrtc.lib
–     CUDA include path   : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/include
–     NVCC executable     : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe
–     NVCC flags          : -Xcompiler;/w;-w;-Xfatbin;-compress-all;-DONNX_NAMESPACE=onnx_torch;–use-local-env;-gencode;arch=compute_75,code=sm_75;-Xcudafe;–diag_suppress=cc_clobber_ignored,–diag_suppress=integer_sign_change,–diag_suppress=useless_using_declaration,–diag_suppress=set_but_not_used,–diag_suppress=field_without_dll_interface,–diag_suppress=base_class_has_different_dll_interface,–diag_suppress=dll_interface_conflict_none_assumed,–diag_suppress=dll_interface_conflict_dllexport_assumed,–diag_suppress=implicit_return_from_non_void_function,–diag_suppress=unsigned_compare_with_zero,–diag_suppress=declared_but_not_referenced,–diag_suppress=bad_friend_decl;–Werror;cross-execution-space-call;–no-host-device-move-forward;-Xcompiler;-MD$<$CONFIG:Debug:d>;–expt-relaxed-constexpr;–expt-extended-lambda;-Xcompiler=/wd4819,/wd4503,/wd4190,/wd4244,/wd4251,/wd4275,/wd4522;-Wno-deprecated-gpu-targets;–expt-extended-lambda;-DCUDA_HAS_FP16=1;-D__CUDA_NO_HALF_OPERATORS__;-D__CUDA_NO_HALF_CONVERSIONS__;-D__CUDA_NO_BFLOAT16_CONVERSIONS__;-D__CUDA_NO_HALF2_OPERATORS__
–     CUDA host compiler  : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
–     NVCC --device-c     : OFF
–     USE_TENSORRT        : OFF
–   USE_ROCM              : OFF
–   USE_EIGEN_FOR_BLAS    :
–   USE_FBGEMM            : ON
–     USE_FAKELOWP          : OFF
–   USE_KINETO            : OFF
–   USE_FFMPEG            : OFF
–   USE_GFLAGS            : OFF
–   USE_GLOG              : OFF
–   USE_LEVELDB           : OFF
–   USE_LITE_PROTO        : OFF
–   USE_LMDB              : OFF
–   USE_METAL             : OFF
–   USE_PYTORCH_METAL     : OFF
–   USE_FFTW              : OFF
–   USE_MKL               : ON
–   USE_MKLDNN            : ON
–   USE_MKLDNN_CBLAS      : OFF
–   USE_NCCL              : OFF
–   USE_NNPACK            : OFF
–   USE_NUMPY             : ON
–   USE_OBSERVERS         : ON
–   USE_OPENCL            : OFF
–   USE_OPENCV            : OFF
–   USE_OPENMP            : ON
–   USE_TBB               : OFF
–   USE_VULKAN            : OFF
–   USE_PROF              : OFF
–   USE_QNNPACK           : OFF
–   USE_PYTORCH_QNNPACK   : OFF
–   USE_REDIS             : OFF
–   USE_ROCKSDB           : OFF
–   USE_ZMQ               : OFF
–   USE_DISTRIBUTED       : ON
–     USE_MPI             : OFF
–     USE_GLOO            : ON
–     USE_TENSORPIPE      : OFF
–   USE_DEPLOY           : OFF
–   Public Dependencies  : Threads::Threads;caffe2::mkl;caffe2::mkldnn
–   Private Dependencies : pthreadpool;cpuinfo;XNNPACK;fbgemm;fp16;gloo;aten_op_header_gen;foxi_loader;fmt::fmt-header-only
– Configuring done
– Generating done

Context:
What does torch.cuda.get_arch_list() print?
The error is usually raised, if your current device needs an architecture, which was not used while building PyTorch.
I’m not familiar with Windows builds so don’t know exactly how sm_75 is passed to the build.


Question:
Hello,
I try to use multiple GPUs (RTX 2080Ti *2) with torch.distributed and pytorch-lightning on WSL2 (windows subsystem for linux).
But I receiving following error:
NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:518, unhandled system error, NCCL version 2.4.8

I can run same process using single GPU.
Thanks for your great help.

Context: Is SLI enabled? What the output of nvidia-smi?


PyTorch installs version 1.7.1 instead of 1.8.0

Question:
Hi, I am trying to install PyTorch 1.8.0 via conda, using the command provided on the main page:

image1303×471 25.6 KB

However, when I get the command to run, I see the following prompt:

image1094×799 26.1 KB

You can notice that it is installing version 1.7.1 instead. Is this expected?

Context: No, that’s not expected and I guess you might need to update your conda base environment so that the latest version can be found.