PRBonn / segcontrast

MIT License
96 stars 13 forks source link

inference_vis.py -> ERROR: kernel must be CUDA. #19

Closed AbhishekKaushikCV closed 1 year ago

AbhishekKaushikCV commented 1 year ago

Hi @nuneslu, thanks for sharing this great work.

I am trying to setup the environment, and run the 'inference_vis.py' on semantic kitti but I am getting error while running the inference.

I am using the docker image (nuneslu/segcontrast:minkunet) that you provided, and then I started the container with this image with all gpus. With this container I am getting kernel image error. Similar ERROR: RuntimeError: CUDA error: no kernel image is available for execution on the device

In the above issue the solution was to update the torch. So, I updated the torch and reinstalled the MinkowskiEngine. -> Successfully installed. Following your commands mention in this issue: GitHub Issue .

My current container environment: now_torch_env Minkowski Diagnostics: now_me_env

Now: I am getting this error: now_kernel_must_be_cuda_error

Thanks in advance!!!

nuneslu commented 1 year ago

Hi! You can try passing the model to cuda device after line 141 adding resnet = resnet.cuda() and classifier = classifier.cuda()

The problem with the docker image is that it is hard to provide the docker with the correct CUDA version, and therefore depending on your CUDA version the docker image will not work properly. You can try changing the cuda version in the dockerfile and rebuild it, and then compile the minkowski engine afterwards.

AbhishekKaushikCV commented 1 year ago

Yes, passing the model to cuda solved the issue.

Thank you very much for the response.