Jittor / JNeRF

JNeRF is a NeRF benchmark based on Jittor. JNeRF re-implemented instant-ngp and achieved same performance with original paper.
Apache License 2.0
640 stars 74 forks source link

Failed to import in m1max #40

Closed tlightsky closed 2 years ago

tlightsky commented 2 years ago
(jnerf) ➜  python git:(master) python                    
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:05:16) 
[Clang 12.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import >>> import jnerf
[i 0813 22:32:46.508897 04 lock.py:85] Create lock file:/Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/jittor.lock
[i 0813 22:32:46.521387 04 compiler.py:955] Jittor(1.3.5.7) src: /opt/homebrew/Caskroom/miniforge/base/envs/jnerf/lib/python3.8/site-packages/jittor
[i 0813 22:32:46.543845 04 compiler.py:956] g++ at /usr/bin/g++(13.1.6)
[i 0813 22:32:46.543987 04 compiler.py:957] cache_path: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable
[i 0813 22:32:46.909862 04 compiler.py:34] Create cache dir: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable/jit
[i 0813 22:32:46.910039 04 compiler.py:34] Create cache dir: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable/obj_files
[i 0813 22:32:46.910114 04 compiler.py:34] Create cache dir: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable/gen
[i 0813 22:32:46.910180 04 compiler.py:34] Create cache dir: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable/tmp
[i 0813 22:32:46.910262 04 compiler.py:34] Create cache dir: /Users/me/.cache/jittor/jt1.3.5/g++13.1.6/py3.8.13/macOS-12.0.1-ax07/AppleM1Max/stable/checkpoints
[i 0813 22:32:59.389819 00 __init__.py:227] Total mem: 64.00GB, using 16 procs for compiling.
Compiling jittor_core(146/146) used: 27.826s eta: 0.000s
[i 0813 22:33:27.992004 00 jit_compiler.cc:28] Load cc_path: /usr/bin/g++
[i 0813 22:33:29.038271 00 compile_extern.py:517] mpicc not found, distribution disabled.
[w 0813 22:33:29.038413 00 compile_extern.py:589] MKL install failed, msg:Not found onednn, please install it by the command 'brew install onednn'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/me/source/py/JNeRF/python/jnerf/__init__.py", line 2, in <module>
    from . import models
  File "/Users/me/source/py/JNeRF/python/jnerf/models/__init__.py", line 1, in <module>
    from . import networks
  File "/Users/me/source/py/JNeRF/python/jnerf/models/networks/__init__.py", line 1, in <module>
    from . import ngp_network
  File "/Users/me/source/py/JNeRF/python/jnerf/models/networks/ngp_network.py", line 7, in <module>
    from jnerf.ops.code_ops.fully_fused_mlp import FullyFusedMlp_weight
  File "/Users/me/source/py/JNeRF/python/jnerf/ops/code_ops/fully_fused_mlp.py", line 6, in <module>
    from jnerf.ops.code_ops.global_vars import global_headers, proj_options
  File "/Users/me/source/py/JNeRF/python/jnerf/ops/code_ops/global_vars.py", line 3, in <module>
    jt.flags.use_cuda = 1
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.Flags.use_cuda)).

Types of your inputs are:
 self   = Flags,
 arg    = int,

The function declarations are:
 void _set_use_cuda(int v)
 void _set_use_cuda(bool v)

Failed reason:[f 0813 22:33:33.119686 00 cuda_flags.cc:37] Check failed: value==0  No CUDA found.
tlightsky commented 2 years ago

update: after change here

jt.flags.use_cuda = 0

got this error

RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.sync)).

Types of your inputs are:
 self   = Var,
 args   = (),

The function declarations are:
 void sync(bool device_sync = false, bool weak_sync = true)

Failed reason:[f 0814 09:58:31.765113 00 op.cc:182] Check failed: flags.get(NodeFlags::_cpu)  Something wrong... Could you please report this issue?
 Op code doesn't have cpu version
Gword commented 2 years ago

JNeRF does not support m1max at present. JNeRF also does not support running on CPU yet. We recommend running JNeRF on NVIDIA's GPU.

tlightsky commented 2 years ago

got it, thanks