Using set USE_XNNPACK=0 that works but now I am getting this error @ptrblck.
FAILED: third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda.cu.obj
cmd.exe /C "cd /D C:\Users\Dell\Desktop\Pytorch\pytorch\build\third_party\gloo\gloo\CMakeFiles\gloo_cuda.dir && C:\Users\Dell\Anaconda3\Library\bin\cmake.exe -E make_directory C:/Users/Dell/Desktop/Pytorch/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//. && C:\Users\Dell\Anaconda3\Library\bin\cmake.exe -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=C:/Users/Dell/Desktop/Pytorch/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.obj -D generated_cubin_file:STRING=C:/Users/Dell/Desktop/Pytorch/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.obj.cubin.txt -P C:/Users/Dell/Desktop/Pytorch/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//gloo_cuda_generated_cuda.cu.obj.Release.cmake"
Failed to run C:/Program Files (x86)/Microsoft Visual Studio/2017/Commu (The system cannot find the file specified.
).
CMake Error at gloo_cuda_generated_cuda.cu.obj.Release.cmake:217 (message):
  Error generating
  C:/Users/Dell/Desktop/Pytorch/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.obj

and to resolve this I used
set USE_DISTRIBUTED=0
But now I am getting error as:
FAILED: bin/caffe2_nvrtc.dll lib/caffe2_nvrtc.lib
cmd.exe /C "cd . && C:\Users\Dell\Anaconda3\Library\bin\cmake.exe -E vs_link_dll --intdir=caffe2\CMakeFiles\caffe2_nvrtc.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100162~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100162~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo caffe2\CMakeFiles\caffe2_nvrtc.dir\__\aten\src\ATen\cuda\nvrtc_stub\ATenNVRTC.cpp.obj  /out:bin\caffe2_nvrtc.dll /implib:lib\caffe2_nvrtc.lib /pdb:bin\caffe2_nvrtc.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /INCREMENTAL:NO  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64\cuda.lib"  "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64\nvrtc.lib"  -DELAYLOAD:nvcuda.dll  delayimp.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK: command "C:\PROGRA~2\MICROS~3\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo caffe2\CMakeFiles\caffe2_nvrtc.dir\__\aten\src\ATen\cuda\nvrtc_stub\ATenNVRTC.cpp.obj /out:bin\caffe2_nvrtc.dll /implib:lib\caffe2_nvrtc.lib /pdb:bin\caffe2_nvrtc.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /INCREMENTAL:NO C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64\cuda.lib C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64\nvrtc.lib -DELAYLOAD:nvcuda.dll delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:bin\caffe2_nvrtc.dll.manifest" failed (exit code 1120) with the following output:
   Creating library lib\caffe2_nvrtc.lib and object lib\caffe2_nvrtc.exp
ATenNVRTC.cpp.obj : error LNK2019: unresolved external symbol nvrtcGetCUBINSize referenced in function load_nvrtc
ATenNVRTC.cpp.obj : error LNK2019: unresolved external symbol nvrtcGetCUBIN referenced in function load_nvrtc
bin\caffe2_nvrtc.dll : fatal error LNK1120: 2 unresolved externals
[931/3940] Generating ../aten/src/ATen/CPUFunctio...orBody.h, ../aten/src/ATen/core/TensorMethods.cppninja: build stopped: subcommand failed.