Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU Acceleration of SDF gen #24

Closed
sjkelly opened this issue Apr 4, 2019 · 5 comments · Fixed by #25 or #37
Closed

GPU Acceleration of SDF gen #24

sjkelly opened this issue Apr 4, 2019 · 5 comments · Fixed by #25 or #37

Comments

@sjkelly
Copy link
Member

sjkelly commented Apr 4, 2019

I looked at CUDA, Vulkan, and OpenCL. It is important this runs on most hardware, so CUDA is not an option initially unless we have several backends, which is not a priority right now. Vulkan compute kernels made my eyes bleed. OpenCL might be the best option for this.

Open question and testing is whether or not to use CLArrays or OpenCL.

@sjkelly sjkelly mentioned this issue Apr 5, 2019
@sjkelly
Copy link
Member Author

sjkelly commented Jun 11, 2019

It should be trivial to support threads. In the meantime, the OpenCL requirement should be soft, since it doesn't support all geometries yet and I also have issues with running on Intel Iris.

In the meantime do you have mesa-opencl-icd installed? Also, which GPU do you have?

@sjkelly sjkelly reopened this Jun 11, 2019
@sjkelly
Copy link
Member Author

sjkelly commented Jun 14, 2019

The problem is that the OpenCL back end is not very abstract. It is a kernel compiler and not a transpiler, so some geometries are unsupported in the OpenCL back end. I only can run it on one out of three of my development environments. I have multithreadin and SIMD working now which had very nice performance gains of 12x on 4 threads. This puts it within the same order of magnitude as the GPU performance for most geometries. The bottleneck is still the meshing component, but I have run into some bugs in the multithreading paradigms with the meshing algorithms that may block this.

@sjkelly
Copy link
Member Author

sjkelly commented Jun 14, 2019

Also OpenMPI is very good alternative for very high resolution solid models. From what I understand Julia has a native distributed arrays mechanism that is similar to OpenMPI.
Still the bottleneck will be the memory use in the current implementation. I have some ideas to minimize the memory allocation from nxnynz to nxny2, but I have to rework Meshing.jl before that is possible.

@sjkelly
Copy link
Member Author

sjkelly commented Jun 26, 2019

@scheming-pony if you want to checkout the sjk/simp branch and checkout master for Meshing, this should work now. I'm shaking down Meshing a little longer before I tag a new release and merge my branch into Descartes.

@sjkelly
Copy link
Member Author

sjkelly commented Jun 28, 2019

👍

I am hoping to add some docs soon for the user-facing API. There will be some code churn in everything else. Please let me know if you have and questions or feature requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant