Remix.run Logo
KeplerBoy 14 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.

IshKebab 14 days ago | parent | next [-]

Mainly because number crunching code tends to be very long-lived (hence why FORTRAN is still in use).

nine_k 14 days ago | parent [-]

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.)

pjmlp 14 days ago | parent | prev [-]

Yes, and the new kid in town, slang has more chances of adoption.

KeplerBoy 14 days ago | parent [-]

sorry, could you link to the project? Seems there are quite a few languages called slang.

_0ffh 14 days ago | parent [-]

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/

pjmlp 13 days ago | parent [-]

Yes that is the one, and all shader languages also support compute as well, not only graphics.

_0ffh 13 days ago | parent [-]

Thanks yes. Though I did not mean the bare possibility, but intended use case, which may lead to different design choices.