VINS-Fusion-GPU-BA icon indicating copy to clipboard operation
VINS-Fusion-GPU-BA copied to clipboard

Run Environmental

Open WuZihao12 opened this issue 6 months ago • 12 comments

Thank you for your excellent work. I would like to ask if your operating environment is ubuntu20.04 or 18.04?

WuZihao12 avatar Dec 25 '23 04:12 WuZihao12

Thank you for your attention. Ubuntu-18.04, ROS Melodic.

qdLMF avatar Dec 25 '23 06:12 qdLMF

Which version of cuda are you using? I ran your job successfully using 11.0. But serious drift occurred on the MH01 data set.

WuZihao12 avatar Dec 25 '23 06:12 WuZihao12

image

WuZihao12 avatar Dec 25 '23 06:12 WuZihao12

CUDA 11.0

qdLMF avatar Dec 25 '23 06:12 qdLMF

What is your GPU's compute ability?

qdLMF avatar Dec 25 '23 06:12 qdLMF

My graphics card is the 3060 on my laptop, with a computing power of 86.

WuZihao12 avatar Dec 25 '23 06:12 WuZihao12

Restart the computer and the following problem occurs after re-running (cuda:11.0): image

WuZihao12 avatar Dec 25 '23 06:12 WuZihao12

It might be a problem with atomic add. My GPU is only 5.2. If your GPU's compute capability is >= 6.0, your may have to do some changes to MyAtomicAdd() in device_utils.cu as "How To Build" section in README instructs. Or, check if your enviroment has the macro __CUDA_ARCH__ defined, if it is defined and >= 600, compiler should generate a specialized version of MyAtomicAdd() using CUDA's atomicAdd(). I don't have a GPU with compute capability >= 6.0, so I never tested if it works. Anyway, for details info about MyAtomicAdd(), please check it's implementation in device_utils.cu.

qdLMF avatar Dec 25 '23 07:12 qdLMF

Although my computing power exceeds 60, I put The #if CUDA_ARCH < 600 macro is commented out, but the current one is still used. But it still gives the following error: image

WuZihao12 avatar Dec 25 '23 07:12 WuZihao12

I'm sorry that I cannot think of any solution for now. Debugging really have exhausted me when I was building this implementation. When I was debugging it, I just used the most naive way, that is, printing out all elements of all matrices along the way to txt files and check if there's any NAN.

qdLMF avatar Dec 25 '23 07:12 qdLMF

Still want to thank you for your great work!

WuZihao12 avatar Dec 25 '23 07:12 WuZihao12

Thank you for your attention.

qdLMF avatar Dec 25 '23 08:12 qdLMF