我试着用火炬运行我的DL模型。在运行过程中,我面临以下错误:
UserWarning: Just-in-time loading and compiling the CUDA kernels of SRU was unsuccessful. Got the following error:
Ninja is required to load C++ extensions
warnings.warn("Just-in-time loading and compiling the CUDA kernels of SRU was unsuccessful. "
Traceback (most recent call last):
File "/home/.../.local/lib/python3.8/site-packages/sru/cuda_functional.py", line 15, in <module>
load(
File ""/home/.../.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1080, in load
return _jit_compile(
File ""/home/.../.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1293, in _jit_compile
_write_ninja_file_and_build_library(
File ""/home/.../.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1374, in _write_ninja_file_and_build_library
verify_ninja_availability()
File ""/home/.../.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1430, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions
During handling of the above exception, another exception occurred:
现在,最明显的解决方案是pip install ninja
,但是它显示忍者已经安装了/
有人能帮我吗?
发布于 2022-10-05 11:10:26
conda install ninja
为我工作。作为pip安装忍者版本1.10,conda安装忍者版本为1.7。我想这就是路径的问题
https://stackoverflow.com/questions/69962518
复制相似问题