• A_A@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    16 hours ago

    (…) for Nvidia cards, spanning from Maxwell to Rubin (…)

    nice comment on xda 2 days ago :

    I’d rather have an AI generated open source driver, written in a language that checks itself to the point of being obnoxious to write in, than the closed-source shitware Nvidia calls a driver.

  • wyrmsbane@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    9
    ·
    18 hours ago

    Rust does not have better performance over C. The entire appeal of Rust is memory safety, which I would argue that GPU drivers don’t need as much as performance. This is all Hype-Slop.

    I do appreciate that they’ve essentially open-sourced Nvidia’s proprietary driver, however.

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      11
      ·
      9 hours ago

      Drivers absolutely need memory safety over performance. When drivers crash it’s much worse than when some random app crashes.

    • qjkxbmwvz@startrek.website
      link
      fedilink
      English
      arrow-up
      21
      arrow-down
      1
      ·
      16 hours ago

      The point isn’t that it’s Rust, the point is that the proprietary drivers put artificial performance restrictions in place which this gets around — real performance gains due to clock speed increase (and nvenc session number increase, among others).

      • wyrmsbane@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        11 hours ago

        If thats true, then it is great news. I would rather see these improvements be merged into the nouveau driver, rather than a rust sloppified project that will likely be abandoned in a year.

      • Shatur@discuss.tchncs.deOP
        link
        fedilink
        English
        arrow-up
        7
        ·
        15 hours ago

        While I think Nvidia drivers for Linux are shitty, I wouldn’t rush with this experimental drivers because these GPUs sometimes burn even with lower clocks 😅

    • Shatur@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      15
      ·
      18 hours ago

      I think they used Rust because it’s easier to deal for LLMs.

      But there are some optimizations in Rust that are enabled by default due to borrow checker. For example, basically all variables are marked as restrict. In C nobody uses it because it’s too easy to get UB with this, but with Rust it’s free optimization. However, in Rust when you create arrays, they zero-initialized by default, while in C you can start with garbage and fill them later (you can skip zero-initialization with unsafe, but it’s rarely done).

    • JamonBear@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 hours ago

      IMO this is where Rust shines. Error handling in Rust is much better than in C or C++, you cannot discreetly discard error types or ignore exceptions. You always have to be explicit (puting aside unsafe code). So if you focus on happy path first, your code will be full of .unwrap() calls which are easy to patch afterwards.

      • benno@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 hours ago

        the AI rust rewrite was probably done in reaction to the “NVIDIA driver eating SSD incident” and I don’t see how a memory-safe/error-handling-safe language would have prevented an issue like that

        • 0x0@infosec.pub
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 hours ago

          Eh, considering stock nvidia cards catching on fire at the power socket, how much worse could it be really ¯\_(ツ)_/¯