Using Anaconda Prompt:

(myenv) C:\WINDOWS\system32>cd C:\Users\Admin\Downloads\Pytorch\pytorch
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set “CMAKE_INCLUDE_PATH=C:\Users\Admin\Downloads\Pytorch\mkl\include”
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set “LIB=C:\Users\Admin\Downloads\Pytorch\mkl\lib;%LIB%”
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set USE_NINJA=ON
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set CMAKE_GENERATOR=Ninja
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set USE_MKLDNN=ON
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>set “CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe”
(myenv) C:\Users\Admin\Downloads\Pytorch\pytorch>python setup.py install --cmake

Which makes:
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR=Ninja -DCMAKE_INCLUDE_PATH=C:\Users\Admin\Downloads\Pytorch\mkl\include -DCMAKE_INSTALL_PREFIX=C:\Users\Admin\Downloads\Pytorch\pytorch\torch -DCMAKE_PREFIX_PATH=C:\Users\Admin\anaconda3\envs\dl\Lib\site-packages -DJAVA_HOME=C:\Users\Admin\AppData\Local\Programs\AdoptOpenJDK\ -DNUMPY_INCLUDE_DIR=C:\Users\Admin\anaconda3\envs\dl\lib\site-packages\numpy\core\include -DPYTHON_EXECUTABLE=C:\Users\Admin\anaconda3\envs\dl\python.exe -DPYTHON_INCLUDE_DIR=C:\Users\Admin\anaconda3\envs\dl\include -DPYTHON_LIBRARY=C:\Users\Admin\anaconda3\envs\dl/libs/python38.lib -DTORCH_BUILD_VERSION=1.8.0a0 -DUSE_MKLDNN=ON -DUSE_NINJA=ON -DUSE_NUMPY=True C:\Users\Admin\Downloads\Pytorch\pytorch
And this causes again an error, but at least after many hours and not just in the first minute:
CMake Error at torch_cuda_generated_SpectralOps.cu.obj.Release.cmake:281 (message):
  Error generating file
  C:/Users/Admin/Downloads/Pytorch/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_SpectralOps.cu.obj


[2365/3377] Building NVCC (Device) object caffe2/CMakeFile...en/native/cuda/torch_cuda_generated_SortingKthValue.cu.obj
SortingKthValue.cu
SortingKthValue.cu
[2366/3377] Building NVCC (Device) object caffe2/CMakeFile...n/src/ATen/native/cuda/torch_cuda_generated_SoftMax.cu.obj
SoftMax.cu
SoftMax.cu
[2367/3377] Building NVCC (Device) object caffe2/CMakeFile...c/ATen/native/cuda/torch_cuda_generated_ScanKernels.cu.obj
ScanKernels.cu
ScanKernels.cu
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 727, in <module>
    build_deps()
  File "setup.py", line 314, in build_deps
    build_caffe2(version=version,
  File "C:\Users\Admin\Downloads\Pytorch\pytorch\tools\build_pytorch_libs.py", line 62, in build_caffe2
    cmake.build(my_env)
  File "C:\Users\Admin\Downloads\Pytorch\pytorch\tools\setup_helpers\cmake.py", line 346, in build
    self.run(build_args, my_env)
  File "C:\Users\Admin\Downloads\Pytorch\pytorch\tools\setup_helpers\cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "C:\Users\Admin\anaconda3\envs\dl\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 1.