Open wangwang-xyz opened 5 months ago
Hi! Which version of CUDA and LibTorch did you use? If you have integrated graphics along with independent graphics, have you tried setting the system to disable the integrated ones and use only the independent ones?
The environment I used is:
It seems this problem caused by LibTorch which built with llvm. I flowed this issue to update LibTorch to nightly version(2.4.0.dev20240415+cu118) and solved the problem pytorch/pytorch#103756
In addition, LibTorch removed c10::guts::to_string
in nightly version. Therefore, gaussian_model.cpp
need to be modified.
Replace all
key = c10::guts::to_string(param.UnsafeGetTensorImpl());
with
key = param.UnsafeGetTensorImpl();
Similar segmentation fault error solved thanks to this issue! BYW in LibTorch nightly version (2.4.0.dev20240425+cu118) replace all
key = c10::guts::to_string(param.UnsafeGetTensorImpl());
with
key = param.unsafeGetTensorImpl();
which uses camel case.
In my case, the error was showing the exact same error message.
it was just a segfault error like below:
104 Segmentation fault (core dumped)
However, changing to nightly build as recommended from @wangwang-xyz and @Eragonlrc solved the issue! Thanks!
*Note that you need to remove the whole build folder when re-building with the new libtorch.
Thank you for your solution!
However,I met some trouble after I update LibTorch to nightly version.The error like this
/usr/bin/ld: /Photo-SLAM/ORB-SLAM3/lib/libORB_SLAM3.so: undefined reference to cv::FileStorage::FileStorage(std::cxx11::basic_string<char, std::char_traits
It seems the opencv mismatch with the libtorch?I have no idea about this. Have you met this trouble?Could you please teach me how to solve it? Thank you!
Hi Jiyu,
I reproduced this error when using the latest version of LibTorch, regardless of the OpenCV version. We will investigate further and try to support the latest version of LibTorch in the future.
Please use the tested LibTorch version first and then you should be able to compile the code successfully.
There is a problem when I run
./bin/tum_mono
or./bin/gaussian_viewer
. The Error like thisCode related with this problem in
imgui_viewer.cpp
line 363However when I write a
test.cpp
to test this code, it works well. Thetest.cpp
like this:The related
CMakeLists.txt
like this: