MarvinChung / Orbeez-SLAM

GNU General Public License v3.0
264 stars 29 forks source link

compatibility of cuda version #5

Open dygcjlu opened 1 year ago

dygcjlu commented 1 year ago

Hi is this project works with cuda v11.3 ? i have tried two ways to build, but all failed. Environment: RTX3090, cuda v11.3

First: docker, the project can be build successfully. But i got the following error message when i try to execute the demo. root@ab53af7500cf:/program# ./build/mono_tum Vocabulary/ORBvoc.txt configs/Monocular/TUM/freiburg3_office.yaml /data/rgbd_dataset_freiburg3_long_office_household/

Orbeez-SLAM Copyright (C) 2022-2023 Chi-Ming Chung, National Taiwan University. ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza. The ORB-SLAM2 part in Orbeez-SLAM comes with ABSOLUTELY NO WARRANTY; The ORB-SLAM2 part in Orbeez-SLAM is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

terminate called after throwing an instance of 'std::runtime_error' what(): Could not allocate memory: /program/Thirdparty/instant-ngp-kf/dependencies/tiny-cuda-nn/include/tiny-cuda-nn/gpu_memory.h:112 cudaMalloc(&rawptr, n_bytes+DEBUG_GUARD_SIZE*2) failed with error forward compatibility was attempted on non supported HW Aborted (core dumped)

Second: Local , it was failed to build the project, and got the following error message.

/home/huger/dyg/nerf/orbeez-slam/Thirdparty/instant-ngp-kf/src/camera_path.cu(72): error: no instance of constructor "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::basic_json [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator>]" matches the argument list argument types are: ({...}, {...}, {...}, {...}, {...}, {...})

/home/huger/dyg/nerf/orbeez-slam/Thirdparty/instant-ngp-kf/include/neural-graphics-primitives/common_device.cuh(315): warning: calling a host function from a host device function is not allowed

1 error detected in the compilation of "/home/huger/dyg/nerf/orbeez-slam/Thirdparty/instant-ngp-kf/src/camera_path.cu".

MarvinChung commented 1 year ago

Hi,

I think you might need to upgrade the cuda driver.

For the local problem, I not sure what causes that. But I have encountered your problem when using docker before, my cuda driver was too old and it was not compatible for the cuda version (11.7) in the docker. After I update my driver, the code works properly in docker.

The compatibility between the toolkit and the driver is shown in the Table 2. I think that your driver version is below 450.80.02 on Linux, I suggest you upgrade both cuda driver and toolkit. However, you can try to upgrade your driver first and see if it works.

dygcjlu commented 1 year ago

Thank you for your quit reply, i will try it