jittor icon indicating copy to clipboard operation
jittor copied to clipboard

import时编译报错

Open chinoll opened this issue 1 year ago • 4 comments

Describe the bug

import jittor时编译报错

Full Log

[i 0614 16:33:45.380336 08 lock.py:85] Create lock file:/home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/jittor.lock
[i 0614 16:33:45.388372 08 compiler.py:955] Jittor(1.3.8.2) src: /home/jittor/.local/lib/python3.8/site-packages/jittor
[i 0614 16:33:45.390574 08 compiler.py:956] g++ at /usr/bin/g++(9.4.0)
[i 0614 16:33:45.390655 08 compiler.py:957] cache_path: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default
[i 0614 16:33:45.909001 08 install_cuda.py:93] cuda_driver_version: [12, 1]
Downloading https://cg.cs.tsinghua.edu.cn/jittor/assets/cuda11.2_cudnn8_linux.tgz to /home/jittor/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux.tgz
1.62GB [01:17, 22.6MB/s]
[i 0614 16:35:23.271480 08 __init__.py:411] Found /home/jittor/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc(11.2.152) at /home/jittor/.cache/jittor/jtcuda/cuda11.2_cudnn8_linux/bin/nvcc.
[i 0614 16:35:23.319503 08 __init__.py:411] Found addr2line(2.34) at /usr/bin/addr2line.
[i 0614 16:35:23.591024 08 compiler.py:1010] cuda key:cu11.2.152
[i 0614 16:35:23.610102 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152
[i 0614 16:35:23.610328 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152/jit
[i 0614 16:35:23.610483 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152/obj_files
[i 0614 16:35:23.610617 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152/gen
[i 0614 16:35:23.610744 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152/tmp
[i 0614 16:35:23.610871 08 compiler.py:34] Create cache dir: /home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/cu11.2.152/checkpoints
In file included from /home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/jit_utils.cc:8:
/home/jittor/.local/lib/python3.8/site-packages/jittor/src/pyjt/py_converter.h: In lambda function:
/home/jittor/.local/lib/python3.8/site-packages/jittor/src/pyjt/py_converter.h:632:29: error: there are no arguments to ‘PyObject_CallOneArg’ that depend on a template parameter, so a declaration of ‘PyObject_CallOneArg’ must be available [-fpermissive]
  632 |             PyObjHolder ret(PyObject_CallOneArg(obj, args.obj));
      |                             ^~~~~~~~~~~~~~~~~~~
/home/jittor/.local/lib/python3.8/site-packages/jittor/src/pyjt/py_converter.h:632:29: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor/__init__.py", line 18, in <module>
    from . import compiler
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor/compiler.py", line 1189, in <module>
    check_cache_compile()
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor/compiler.py", line 884, in check_cache_compile
    recompile = compile(cc_path, cc_flags+f" {opt_flags} ", files, jit_utils.cache_path+'/jit_utils_core'+extension_suffix, True)
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor/compiler.py", line 126, in compile
    return do_compile(fix_cl_flags(cmd))
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor/compiler.py", line 91, in do_compile
    run_cmd(cmd)
  File "/home/jittor/.local/lib/python3.8/site-packages/jittor_utils/__init__.py", line 188, in run_cmd
    raise Exception(err_msg)
Exception: Run cmd failed: "/usr/bin/g++" "/home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/cache_compile.cc" "/home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/log.cc" "/home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/tracer.cc" "/home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/jit_utils.cc" "/home/jittor/.local/lib/python3.8/site-packages/jittor/src/utils/str_utils.cc"   -Wall -Wno-unknown-pragmas -std=c++14 -fPIC  -march=native  -fdiagnostics-color=always  -lstdc++ -ldl -shared  -I"/home/jittor/.local/lib/python3.8/site-packages/jittor/src" -I/usr/include/python3.8 -I/usr/include/python3.8  -O2   -o "/home/jittor/.cache/jittor/jt1.3.8/g++9.4.0/py3.8.10/Linux-5.15.90.x8f/12thGenIntelRCxea/default/jit_utils_core.cpython-38-x86_64-linux-gnu.so"

Provide a full log of Jittor execution, Jittor will log environment information which help us to locate your bugs. Provide a screenshot is also acceptable.

Minimal Reproduce

OS: Ubuntu 20.04.6 LTS on Windows 10 x86_64 CPU: 12th Gen Intel i7-12650H (16) @ 2.688GHz GPU:NVIDIA GeForce RTX 4060 Laptop GPU Kernel: 5.15.90.1-microsoft-standard-WSL2 Python Version:3.8.10 Driver Version: 531.79 CUDA Version: 12.1

Reproduce this error with a file or several lines of code. If it is not possible, leave it blank.

Expected behavior

A clear and concise description of what you expected to happen.

If you are submitting an issue for the first time, please refer to our guideline

chinoll avatar Jun 14 '23 08:06 chinoll

你好 ,你解决了吗?我遇到了同样的问题。

PummelParty avatar Jun 20 '23 12:06 PummelParty

我也是遇到了这样的问题,卡了几天,去论坛去官方群,都没人能解决。。。。。。。。。。。。说实话,Jittor这个框架很low,很多东西和主流的写法不兼容,而且遇到问题没有一套比较好的解决办法,路还很长啊。。。。。。。。。。。。。

JackAILab avatar Jun 22 '23 14:06 JackAILab

我绕过了这个问题,估计是这个版本(1.3.8)有bug,回退到1.3.4版本正常了

koolo233 avatar Jun 23 '23 10:06 koolo233

我也是遇到了这样的问题,卡了几天,去论坛去官方群,都没人能解决。。。。。。。。。。。。说实话,Jittor这个框架很low,很多东西和主流的写法不兼容,而且遇到问题没有一套比较好的解决办法,路还很长啊。。。。。。。。。。。。。

换Windows。。。 Linux版真难用

chinoll avatar Jun 24 '23 14:06 chinoll