alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.95k stars 816 forks source link

Expanding beyond CUDA? #1503

Closed pbrady closed 1 month ago

pbrady commented 1 year ago

I was hoping to try out meshroom but don't currently have a device with an nvidia gpu so it seems that I can't yet do what I want. I'm curious if there's a strong desire here to stick with only cuda or if there would be interest in incorporating something like kokkos which would allow for a single source solution to targeting backends such as cuda, hip, sycl and openmp.

natowi commented 1 year ago

There is interest but not enough people who have the resources to implement and maintain it ;) If you are interested in pushing the topic and have resources to support the effort, you are welcome to get in touch with the Alicevision Team.

There is https://github.com/alicevision/MeshroomMicMac and something similar in preparation for Colmap, which would provide an alternative to the Alicevision depthmap node without rewriting the depthmap node on the Alicevision side, by utilizing other tools.

pbrady commented 1 year ago

That is a lot more cuda than I thought!

natowi commented 1 year ago

These two links provide some information why cuda is so widely used: Background on why CUDA is more popular than OpenCL/Vulkan + CUDA vs. OpenCL (similar reasons apply to the photogrammetry research and development)

pbrady commented 1 year ago

Thanks for the links. I can certainly see why the original choice was made. In my own field of computational physics some still prefer the CUDA route but libraries like kokkos that I linked above which offer an abstraction above CUDA and can be compiled for multiple backends have matured and been very effective at achieving performance portability across different vendors and architectures. That begin said, I don't know enough about photogrammetry to know if the design choices that make something like kokkos well suited for computational physics codes would also play well here.

I wouldn't mind trying to do some small scale experiments exploring kokkos (mostly because that's what I know) but I don't know where to begin. The CUDA depthmap code is rather intimidating.

natowi commented 1 year ago

There are already some tests on cuda alternatives being done behind the scenes. However, the first step was clean up and improvement of the existing depth map code. You can write a private message to the team: alicevision-team@googlegroups.com if you are interested in contributing, your help would be most welcome.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

natowi commented 1 month ago

Now mostly resolved by https://github.com/vosen/ZLUDA https://github.com/alicevision/Meshroom/issues/595