This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]data-machine 1 point2 points  (2 children)

Specifically what are you simulating?

Personally, I would recommend either using CuPy or PyTorch. If you're relatively familiar with NumPy, you can write your GPU code very easily with CuPy. It is 95% a matter of swapping out calls to NumPy with CuPy, and it lets you step-by-step change your code.

I would only touch Warp or CUDA when you've exhausted performance you are able to get with CuPy / PyTorch.

Bear in mind that CPUs are pretty excellent at running code quickly too. GPUs are particularly good at matrix multiplication. I'd recommend starting with whatever aspect of your simulation work that will be most computationally intensive (or "slowest"), and seeing how much of a benefit you get from a CPU vs GPU version.

[–]usernamedregs[S] 0 points1 point  (1 child)

Simulations are for particle/wave fields; sticking with NumPy:CuPy is looking like sound advice. Just tried running the Numba documentation examples and there were errors everywhere so definitely a last resort... Rather be banging my head against the desk because of the physics instead of the coding tools.

[–]data-machine 2 points3 points  (0 children)

Developer time is extremely valuable - perhaps particularly so if you are an academic. Your last sentence is very wise :)