‹ BackHN Continuity

Thread

Nvidia announces native GPU programming in Rust

970 points · 404 comments · nonmaskable

  1. jacobgorm · · focus · HN ↗
    I strongly dislike CUDA. Once you have allowed that proprietary cr*p into your C++ codebase, it is very hard to get rid, and you end up with code that is either tied to a single vendor or an #ifdef hell, probably both.

    The best way to program GPUs is face up to the reality that they are not the same machine as the CPU, write your kernels in separate files, and launch them manually, like in Metal, OpenCL, and D3D12, etc. These days we even have DSLs like Triton that make kernel writing much more ergonomic than anything you would hope to achieve in Rust.

    1. melodyogonna · · focus · HN ↗
      You could also use Mojo, one language for all targets.
      1. carefree-bob · · focus · HN ↗
        I began to lose interest after the acquisition. Have you been following along, are they still going to open source it?
        1. ecl3ctic · · focus · HN ↗
          The Mojo compiler has been open source for over a month now.

          And the Mojo standard library has been open source for over a year.

          It’s all open source. Go check it out!

          1. carefree-bob · · focus · HN ↗
            Nice, thank you. There is an old python project I've been thinking about converting to Mojo.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.