Jittor / jittor

Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.
https://cg.cs.tsinghua.edu.cn/jittor/
Apache License 2.0
3.08k stars 311 forks source link

运行测试代码报错。 | Get some errors when running the test code. #12

Open houming818 opened 4 years ago

houming818 commented 4 years ago

image

[w 0321 11:27:39.879968 56 compile_extern.py:130] CUDA found but cudnn is not loaded:
Traceback (most recent call last):
  File "/data/py37/lib/python3.7/site-packages/jittor/compile_extern.py", line 126, in setup_cuda_extern
    setup_cuda_lib(lib_name)
  File "/data/py37/lib/python3.7/site-packages/jittor/compile_extern.py", line 143, in setup_cuda_lib
    cuda_include_name = search_file([cuda_include, "/usr/include"], lib_name+".h")
  File "/data/py37/lib/python3.7/site-packages/jittor/compile_extern.py", line 16, in search_file
    LOG.f(f"file {name} not found in {dirs}")
  File "/data/py37/lib/python3.7/site-packages/jittor_utils/__init__.py", line 55, in f
    def f(self, *msg): self._log('f', 0, *msg)
  File "/data/py37/lib/python3.7/site-packages/jittor_utils/__init__.py", line 40, in _log
    cc.log(fileline, level, verbose, msg)
RuntimeError: [f 0321 11:27:39.879776 56 compile_extern.py:16] file cudnn.h not found in ['/usr/local/cuda/include', '/usr/include']
houming818 commented 4 years ago

修复了,需要安装两个库: libcudnn7 libcudnn7-dev 安装方式: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html

zml24 commented 3 years ago

另一种方式报错

[w 1216 11:31:19.127366 80 compile_extern.py:140] CUDA found but cudnn is not loaded:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/data/data0/zml/anaconda3/envs/py37/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor_utils/__init__.py", line 145, in do_compile
    return cc.cache_compile(cmd, cache_path, jittor_path)
RuntimeError: [f 1216 11:31:19.124859 80 log.cc:317] Check failed ret(256) == 0(0) Run cmd failed: cd /home/yayaming/.cache/jittor/default/g++ && /usr/bin/g++ /data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/cudnn/src/helper_cudnn.cc  -I'/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/inc' -I'/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/cudnn/inc'    -Wall -Werror -Wno-unknown-pragmas -std=c++14 -fPIC -march=native  -fdiagnostics-color=always  -I/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/src -I/data/data0/zml/anaconda3/envs/py37/include/python3.7m -I/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/pybind11/include -DHAS_CUDA -I'/usr/local/cuda/include' -I'/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/inc'  -I/home/yayaming/.cache/jittor/default/g++  -O2  -I'/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/cudnn/inc'  -I'/data/data0/zml/anaconda3/envs/py37/lib/python3.7/site-packages/jittor/extern/cuda/cudnn/ops'  -c  -o /home/yayaming/.cache/jittor/default/g++/obj_files/helper_cudnn.cc.o
li-xl commented 3 years ago

您好,您可以尝试下这个命令:sudo sysctl vm.overcommit_memory=1, 如果还是无法解决的话,可以提供更加详细的log给我们诊断

zml24 commented 3 years ago

依然无法解决 log见https://paste.ubuntu.com/p/NJRRxzgm8Z/

cjld commented 3 years ago

我们检索到nvidia论坛里面有类似的问题,参见链接:https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675 您看是否能解决呢?

I open the file:
/usr/include/cudnn.h

And I changed the line:
#include “driver_types.h”

to:
#include <driver_types.h>

and now it can compile…
zml24 commented 3 years ago

OK,问题解决了,谢谢