best way to implement rendering and compute

Hello,

I am investigating propagation of excitation in neuron and cardiomyocyte networks and modeling it. Currently I programmed algorithms in MATLAB, C++ and CUDA to solve Hodgkin-Huxley like equations. For visualization I generate moving contour plots, that represents excitation in 2D tissue, I coded it in MATLAB, which is convenient, but it takes tens of minutes to render a movie. I am thinking how to improve it and interested in Vulkan, because it can do compute as well as visualization and is open standard. Currently I use C++ with OpenMP, which code is about x2.5 slower than CUDA.
I want to ask what compute kernel language for Vulkan could you recommend? And is it possible at same time to run compute kernels and visualization rendering?

Best regards,
Kestutis

1 Like

That’s not so bad if the movie duration is tens of minutes :stuck_out_tongue:

I would say, go for it.
I should probably temper your enthusiasm. You already tried CUDA. I wouldn’t expect it to run faster just because API switch. Both should use GPGPU.

GLSL seems to be the main language (probably best supported, having most materials\examples, and matching\mapping into SPIR-V well). Though Vulkan of course does not care how you got your SPIR-V binary.

Depends what you mean. You can “run”\schedule both on separate queue. There is no guarantee they will execute concurrently. And obviously both might compete for the same resources\GPU.

Thank you for reply. My other question is what is best practice to debug shaders?
In High-Quality 3D Graphics Solutions & 3D Graphics Performance is written that “Is a shader debugging tool available for Vulkan available? There are excellent debugging capabilities provided by tools included in the LunarG SDK, and we look forward to other products from the community. In particular, RenderDoc (included in the LunarG SDK) is the best tool currently available for debugging.” but How do I debug a shader? — RenderDoc documentation is written that “Shader debugging is currently only supported in D3D11”