I was using the VS shell you recommended here:
But I think there was some error when I fixed the program to my task bar, where it did not start properly. The first output used to be
Der Befehl "C:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
C:\WINDOWS\system32>
And I could confirm with where cl.exe
that the shell can indeed not find the program.
When opening the shell correctly, the first lines look a lot better, and it can find cl.exe:
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.0
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>where cl.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>
On the other hand, the latter message also ocurred a bit later in the ābrokenā prompt, so I will use the standart Command Prompt from now on.
I switched to the separated version, because I thought it would help determining, wether the problem is related to building or installation. But I will use python setup.py install
then. Is --cmake
redundant?
Ok, that makes sense. Thank you.
I will now try to build again, using the same routine as I did when generating the full log, but using the Standart Command Prompt and only python setup.py install
. The full routine is thus:
cd C:\Users\gooog\Downloads
cd Pytorch
cd pytorch-1.7.0
conda create --name gputorch
y
conda activate gputorch
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
y
conda install -c conda-forge libuv=1.39
y
set TMP_DIR_WIN=C:\Users\gooog\Downloads
C:/Users/gooog/Downloads/Use_mkl.bat > build.log 2>&1
C:/Users/gooog/Downloads/Use_sccache.bat > build.log 2>&1
set USE_NINJA=OFF
set CMAKE_VERBOSE_MAKEFILE=1
set CMAKE_GENERATOR=Visual Studio 16 2019
set CMAKE_GENERATOR_TOOLSET_VERSION=14.29
set DISTUTILS_USE_SDK=1
set PATH=%TMP_DIR_WIN%\bin;%PATH%
sccache --stop-server > build.log 2>&1
sccache --start-server > build.log 2>&1
sccache --zero-stats > build.log 2>&1
set CC=sccache-cl
set CXX=sccache-cl
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION%
set CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64\cl.exe
set MAX_JOBS=1
set USE_GLOG=0
set USE_GLOO=0
python setup.py install > build.log 2>&1
Hopfully, it will work this time.