Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetson AGX Orin 上tinycudann无法使用 #6

Open
Stardustchin opened this issue Oct 16, 2024 · 10 comments
Open

Jetson AGX Orin 上tinycudann无法使用 #6

Stardustchin opened this issue Oct 16, 2024 · 10 comments

Comments

@Stardustchin
Copy link

作者你好,我想在Jetson AGX Orin边缘计算设备上复现你们的代码,发现tinycudann无法使用。我发现你们也遇到过相同的问题,请问你们是如何解决的?

@JIANG-CX
Copy link
Collaborator

JIANG-CX commented Oct 17, 2024 via email

@Stardustchin
Copy link
Author

我的jetson jetpack版本是5.1.2 cuda版本是11.4
微信图片_20241018091349
我有尝试多次重装tinycudann,但还是不能用
每次测试例程都报这个错
Loading custom json config 'data/config_hash.json'.
Beginning optimization with 10000000 training steps.
tiny-cuda-nn warning: GPUMemoryArena: GPU 0 does not support virtual memory. Falling back to regular allocations, which will be larger and can cause occasional stutter.
terminate called after throwing an instance of 'std::runtime_error'
what(): /home1/H3-Mapping/mapping/third_party/tiny-cuda-nn/include/tiny-cuda-nn/cuda_graph.h:99 cudaStreamEndCapture(stream, &m_graph) failed: operation failed due to a previous error during capture
已放弃 (核心已转储)

@JIANG-CX
Copy link
Collaborator

JIANG-CX commented Oct 18, 2024 via email

@JIANG-CX
Copy link
Collaborator

你的这个报错似乎和我遇到的(https://forums.developer.nvidia.com/t/problems-about-running-tinycudann-on-jetson-agx-orin/246076/12)不大一样。你可以试一下首先升级到cuda11.8,然后修改 tiny-cuda-nn/bindings/torch/tinycudann/modules.py
(1)ALL_COMPUTE_CAPABILITIES = [20, 21, 30, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 86, 89, 90]改成ALL_COMPUTE_CAPABILITIES = [20, 21, 30, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 87, 89, 90]
(2)
try:
_ C = importlib.import_module(f"tinycudann_bindings._{cc}_C")
if cc != system_compute_capability:
warnings.warn(f"tinycudann was built for lower compute capability ({cc}) than the system's ({system_compute_capability}). Performance may be suboptimal.")
break
except ModuleNotFoundError:
pass
改成 _C = importlib.import_module(f"tinycudann_bindings._{cc}_C")

@Stardustchin
Copy link
Author

感谢回复!我在更新cuda版本到11.8后尝试重新安装,能够成功编译但在运行例程测试还是会报相同的错误
./build/mlp_learning_an_image data/images/albert.jpg data/config_hash.json
Loading custom json config 'data/config_hash.json'.
Beginning optimization with 10000000 training steps.
tiny-cuda-nn warning: GPUMemoryArena: GPU 0 does not support virtual memory. Falling back to regular allocations, which will be larger and can cause occasional stutter.
terminate called after throwing an instance of 'std::runtime_error'
what(): /home1/H3-Mapping/mapping/third_party/tiny-cuda-nn_H3_mapping/include/tiny-cuda-nn/cuda_graph.h:99 cudaStreamEndCapture(stream, &m_graph) failed: operation failed due to a previous error during capture
已放弃 (核心已转储)

并且直接运行h3mapping会报如下错误
Traceback (most recent call last):
File "demo/run_mapping.py", line 25, in <module>
slam = H3Mapping(args)
File "/home1/H3-Mapping/mapping/src/H3Mapping.py", line 17, in init
self.mapper = Mapping(args, self.logger, data_stream=self.data_stream)
File "/home1/H3-Mapping/mapping/src/mapping.py", line 55, in init
self.decoder = get_decoder(args).cuda()
File "/home1/H3-Mapping/mapping/src/utils/import_util.py", line 11, in get_decoder
Decoder = import_module("functions." + args.decoder)
File "/home1/anaconda3/envs/h3mapping/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home1/H3-Mapping/mapping/src/functions/parallel_hash_net.py", line 1, in <module>
import tinycudann as tcnn
File "/home1/anaconda3/envs/h3mapping/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-aarch64.egg/tinycudann/init.py", line 9, in <module>
from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
File "/home1/anaconda3/envs/h3mapping/lib/python3.8/site-packages/tinycudann-1.7-py3.8-linux-aarch64.egg/tinycudann/modules.py", line 61, in <module>
C = importlib.import_module(f"tinycudann_bindings.{cc}_C")
File "/home1/anaconda3/envs/h3mapping/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'tinycudann_bindings._80_C'

@JIANG-CX
Copy link
Collaborator

JIANG-CX commented Oct 28, 2024 via email

@Stardustchin
Copy link
Author

我在搜索怎么解决的时候发现你们遇到过这样的问题
NVlabs/tiny-cuda-nn#279 (comment)
NVlabs/tiny-cuda-nn#281
请问你们当时是如何解决的呢?你们jetson目前jetpack的版本是多少哇,这个会不会有影响?

@JIANG-CX
Copy link
Collaborator

JIANG-CX commented Oct 28, 2024 via email

@JIANG-CX
Copy link
Collaborator

JIANG-CX commented Oct 28, 2024 via email

@Stardustchin
Copy link
Author

好吧,感谢回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants