‹ BackHN Continuity

Thread

Nvidia announces native GPU programming in Rust

970 points · 404 comments · nonmaskable

  1. Ericson2314 · · focus · HN ↗
    To everyone skeptical of people saying that it's better to separate CPU and GPU code into separate files, riddle me this:

    With this system, how do we specify whether dependencies are needed to be compiled for the CPU, GPU, or both?

    ----

    Technically I don't know really care whether it's multiple files or one, I just want to make sure we are not reinventing a shittier version of CFG. What they are providing looks to me like:

    1. explicitly annotate some things as `cfg(GPU)` or ungated (both)

    2. unlabeled means annotated `cfg(not(GPU))` by definitely

    Put this way, this has nothing to do with GPUs, and just has to do with creating some crate-local CFG shorthanded. Great! Let's do that first, get a solid foundation, and then come back to whatever is remaining for CUDA Rust.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.