Hacker News new | ask | show | jobs
by KeplerBoy 438 days ago
Isn't Rust still very seldomly used in the areas where CUDA shines (e.g. number crunching of any kind, let it be simulations or linear algebra)? Imo C++ or even Fortran are perfectly fine choices for those things, since the memory allocation pattern aren't that complicated.
2 comments

Mainly because number crunching code tends to be very long-lived (hence why FORTRAN is still in use).
Not only that. Fortran is very good for writing number-crunching code. Modern Fortran is a pretty ergonomic language, it gives you a really easy way to auto-parallelize things in many ways, and new Fortran code is being produce unironically. Of course it normally uses the treasure trove of existing numerical Fortran code. (Source: a friend who worked at CERN.)
Yes, and the new kid in town, slang has more chances of adoption.
sorry, could you link to the project? Seems there are quite a few languages called slang.
I guess he might mean this one https://shader-slang.org/ though at first glance at least it looks more graphics than GPGPU oriented.

Edit: Hmm, this part of the same project looks general purpose-y and apparently integrates with PyTorch https://slangpy.shader-slang.org/en/latest/

Yes that is the one, and all shader languages also support compute as well, not only graphics.
Thanks yes. Though I did not mean the bare possibility, but intended use case, which may lead to different design choices.