pytorch/extension-cpp

Benchmark Python vs. C++ vs. CUDA by running python benchmark.py {py, cpp, cuda} [--cuda],

yeyuxmf opened this issue · 0 comments

My environment is as follows:
win10
pytorch1.2.0
cuda10.0
Get the following error. How can I solve this problem:
Connected to pydev debugger (build 182.4323.49)
Using C:\Users\86969\AppData\Local\Temp\torch_extensions as PyTorch extensions root...
Detected CUDA files, patching ldflags
F:\Anaconda3\envs\pytorch1.2.0\lib\site-packages\torch\utils\cpp_extension.py:189: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the specified file。
warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))
Emitting ninja build file C:\Users\86969\AppData\Local\Temp\torch_extensions\lltm_cuda\build.ninja...
��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ���
Traceback (most recent call last):
File "D:\pycharm-community-2018.2.3\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1664, in
main()
File "D:\pycharm-community-2018.2.3\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\pycharm-community-2018.2.3\PyCharm Community Edition 2018.2.3\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\pycharm-community-2018.2.3\PyCharm Community Edition 2018.2.3\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "F:/git/extension-cpp/benchmark.py", line 28, in
from cuda.lltm import LLTM
File "F:\git\extension-cpp\cuda\lltm.py", line 6, in
from cuda.jit import lltm_cuda
File "F:\git\extension-cpp\cuda\jit.py", line 3, in
'lltm_cuda', ['F:\git\extension-cpp\cuda\lltm_cuda.cpp', 'F:\git\extension-cpp\cuda\lltm_cuda_kernel.cu'], verbose=True)
File "F:\Anaconda3\envs\pytorch1.2.0\lib\site-packages\torch\utils\cpp_extension.py", line 658, in load
is_python_module)
File "F:\Anaconda3\envs\pytorch1.2.0\lib\site-packages\torch\utils\cpp_extension.py", line 827, in _jit_compile
with_cuda=with_cuda)
File "F:\Anaconda3\envs\pytorch1.2.0\lib\site-packages\torch\utils\cpp_extension.py", line 876, in _write_ninja_file_and_build
with_cuda=with_cuda)
File "F:\Anaconda3\envs\pytorch1.2.0\lib\site-packages\torch\utils\cpp_extension.py", line 1089, in _write_ninja_file
'cl']).decode().split('\r\n')
File "F:\Anaconda3\envs\pytorch1.2.0\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "F:\Anaconda3\envs\pytorch1.2.0\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.