• Australis13@fedia.io
    link
    fedilink
    arrow-up
    38
    ·
    1 day ago

    The big win I see here is the amount of optimisation they achieved by moving from the high-level CUDA to lower-level PTX. This suggests that developing these models going forward can be made a lot more energy-efficient, something I hope can be extended to their execution as well. As it stands currently, “AI” (read: LLMs and image generation models) consumes way too many resources to be sustainable.

    • KingRandomGuy@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      19 hours ago

      What I’m curious to see is how well these types of modifications scale with compute. DeepSeek is restricted to H800s instead of H100s or H200. These are gimped cards to get around export controls, and accordingly they have lower memory bandwidth (~2 vs ~3 TB/s) and most notably, much slower GPU to GPU communication (something like 400 GB/s vs 900 GB/s). The specific reason they used PTX in this application was to help alleviate some of the bottlenecks due to the limited inter-GPU bandwidth, so I wonder if that would still improve performance on H100 and H200 GPUs where bandwidth is much higher.

      • mholiv@lemmy.world
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 day ago

        Kind of the opposite actually. PTX is in essence nvidia specific assembly. Just like how arm or x86_64 assembly are tied to arm and x86_64.

        At least with cuda there are efforts like zluda. Cuda is more like objective-c was on the mac. Basicly tied to platform but at least you could write a compiler for another target in theory.

        • KingRandomGuy@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 day ago

          IIRC Zluda does support compiling PTX. My understanding is that this is part of why Intel and AMD eventually didn’t want to support it - it’s not a great idea to tie yourself to someone else’s architecture you have no control or license to.

          OTOH, CUDA itself is just a set of APIs and their implementations on NVIDIA GPUs. Other companies can re-implement them. AMD has already done this with HIP.

  • Capsicones@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    125
    arrow-down
    1
    ·
    2 days ago

    There seems to be some confusion here on what PTX is – it does not bypass the CUDA platform at all. Nor does this diminish NVIDIA’s monopoly here. CUDA is a programming environment for NVIDIA GPUs, but many say CUDA to mean the C/C++ extension in CUDA (CUDA can be thought of as a C/C++ dialect here.) PTX is NVIDIA specific, and sits at a similar level as LLVM’s IR. If anything, DeepSeek is more dependent on NVIDIA than everyone else, since PTX is tightly dependent on their specific GPUs. Things like ZLUDA (effort to run CUDA code on AMD GPUs) won’t work. This is not a feel good story here.

    • pr06lefs@lemmy.ml
      link
      fedilink
      English
      arrow-up
      34
      ·
      2 days ago

      This specific tech is, yes, nvidia dependent. The game changer is that a team was able to beat the big players with less than 10 million dollars. They did it by operating at a low level of nvidia’s stack, practically machine code. What this team has done, another could do. Building for AMD GPU ISA would be tough but not impossible.

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      edit-2
      2 days ago

      I don’t think anyone is saying CUDA as in the platform, but as in the API for higher level languages like C and C++.

      PTX is a close-to-metal ISA that exposes the GPU as a data-parallel computing device and, therefore, allows fine-grained optimizations, such as register allocation and thread/warp-level adjustments, something that CUDA C/C++ and other languages cannot enable.

    • Gsus4@mander.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      I thought CUDA was NVIDIA-specific too, for a general version you had to use OpenACC or sth.

        • KingRandomGuy@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          19 hours ago

          I think the thing that Jensen is getting at is that CUDA is merely a set of APIs. Other hardware manufacturers can re-implement the CUDA APIs if they really wanted to (especially since AFAIK, Google v Oracle ruled that APIs cannot be copyrighted). In fact, AMD’s HIP implements many of the same APIs as CUDA, and they ship a tool (HIPIFY) to convert code written for CUDA for HIP instead.

          Of course, this does not guarantee that code originally written for CUDA is going to perform well on other accelerators, since it likely was implemented with NVIDIA’s compute model in mind.

  • filister@lemmy.world
    link
    fedilink
    English
    arrow-up
    61
    arrow-down
    3
    ·
    2 days ago

    What is amazing in this case is that they achieved spending a fraction of the inference cost that OpenAI is paying.

    Plus they are a lot cheaper too. But I am pretty sure that the American government will ban them in no time, citing national security concerns, etc.

    Nevertheless, I think we need more open source models.

    Not to mention that NVIDIA also needs to be brought to earth.

    • demesisx@infosec.pub
      link
      fedilink
      English
      arrow-up
      18
      arrow-down
      5
      ·
      2 days ago

      Even if they get banned, any startup could replicate their work if it is truly open source. The best thing about their solution is that it breaks the CUDA monopoly that NVDA has enjoyed. Buy your puts when NVDA bounces because that stock is GOING DOWN. There’s no world where a company that makes GPU’s is worth more than both Apple and Microsoft. It’s inevitable.

      • toffi@feddit.org
        link
        fedilink
        English
        arrow-up
        19
        ·
        2 days ago

        Never forget kids the market can stay irrational much longer than you can stay solvent.

        • demesisx@infosec.pub
          link
          fedilink
          English
          arrow-up
          6
          ·
          2 days ago

          True. Thats why I tend to make small plays instead of being an absolute degenerate gambler.

      • Pieisawesome@lemmy.world
        link
        fedilink
        English
        arrow-up
        13
        ·
        2 days ago

        It’s written in nvidia instruction set PTX which is part of CUDA ecosystem.

        Hardly going to affect nvidia

        • demesisx@infosec.pub
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          edit-2
          2 days ago

          It certainly does.

          Until last week, you absolutely NEEDED an NVidia GPU equipped with CUDA to run all AI models.

          Today, that is simply not true. (watch the video at the end of this comment)

          I watched this video and my initial reaction to this news was validated and then some: this video made me even more bearish on NVDA.

          Edit: corrected and redacted.

  • Corngood@lemmy.ml
    link
    fedilink
    English
    arrow-up
    49
    arrow-down
    1
    ·
    2 days ago

    This sounds like good engineering, but surely there’s not a big gap with their competitors. They are spending tens of millions on hardware and energy, and this is something a handful of (very good) programmers should be able to pull off.

    Unless I’m missing something, It’s the sort of thing that’s done all the time on console games.

    • KingRandomGuy@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      Part of this was an optimization that was necessary due to their resource restrictions. Chinese firms can only purchase H800 GPUs instead of H200 or H100. These have much slower inter-GPU communication (less than half the bandwidth!) as a result of export bans by the US government, so this optimization was done to try and alleviate some of that bottleneck. It’s unclear to me if this type of optimization would make as big of a difference for a lab using H100s/H200s; my guess is that it probably matters less.

    • mormund@feddit.org
      link
      fedilink
      English
      arrow-up
      38
      ·
      2 days ago

      I think more like was done all the time for console games. These days that doesn’t happen as much anymore as far as I know. But I think this shows that CUDA is not a good enough abstraction for modern GPUs or the compilers are not as good as expected. There should be no way they got that much optimization out of hand written/optimized code these days.

      • Eh, even for many console games it’s not optimised that much.

        Check out Kaze Emanaur’s (& co) rewrite of the N64s Super Mario 64 engine. He’s now building an entirely new game on top of that engine, and it looks considerably better than SM64 did and runs at twice the FPS on original hardware.

        But you’re probably right that today it happens even less than before.

        • mormund@feddit.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          That disregards the massive advancement in technology, hindsight, tooling and theory they can make use of now. There is a world of difference there even with the same hardware. So not comparable imo, it wasn’t for a lack of effort on Nintendo’s part.

          • A substantial part of the optimisation was simply not compiling as a debug target. There were plenty of oversights by Nintendo devs (not to discredit all they’ve accomplished here). And most tooling for this Kaze developed himself (because who else develops for the N64?).

            It’s mostly the result of a couple really clever and passionate people actually taking it apart to a very low level. Nintendo could have absolutely done most of these optimisations themselves, they don’t really rely on many newly discovered techniques or anything. Still, they had deadlines of course, which Kaze & Co. don’t.

  • mesamune@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    4
    ·
    2 days ago

    Reminds me of the Bitcoin mining and how askii miners overtook graphic card mining practically overnight. It would not surprise me if this goes the same way.

    • CodexArcanum@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 day ago

      It’s already happening. This article takes a long look at many of the rising threats to nvidia. Some highlights:

      • Google has been running on their own homemade TPUs (tensor processing units) for years, and say they on the 6th generation of those.

      • Some AI researchers are building an entirely AMD based stack from scratch, essentially writing their own drivers and utilities to make it happen.

      • Cerebras.ai is creating their own AI chips using a unique whole-die system. They make an AI chip the size of entire silicon wafer (30cm square) with 900,000 micro-cores.

      So yeah, it’s not just “China AI bad” but that the entire market is catching up and innovating around nvidia’s monopoly.