• @[email protected]
    link
    fedilink
    210 months ago

    That page makes Firefox’s Reader mode really worth its weight in gold, but the content is interesting.

    Has anyone used MLIR for anything yet?

    • TheLinuxGuy
      link
      English
      1
      edit-2
      10 months ago

      Yup, been writing a new shader language to replace GLSL and HLSL for Vulkan Compute purposed, but I eventually switch from SPIR-V IR to MLIR and use IREE Compiler which accepts the MLIR and compile it to any of CUDA, ROCm, SPIR-V and so forth.

      A lot of it was because of my unadulterated hatred toward our current Machine Learning Frameworks...

      It’s one of the project that I’ve been working on to outright replace Pytorch/Tensorflow and ban those two framework from my office forever. I got fed up not knowing how much exactly do I need in memory allocation, computational cost, and so forth when running or training neural net models. Plus I want an easier way to split the model across lower-end GPU too that doesn’t rely on Nvidia-only GPU for CUDA code. I also wanted to have SPIR-V as a fallback compute kernel, because if CUDA/ROCm is too new for GPU, you’re SOL, but if you have SPIR-V, chances are, any GPU made in the last 10 years that have a Vulkan Driver, would likely be supported.

      One of the biggest plus with MLIR is that you are also future proofing your code, because that code could feasibly be recompiled for new devices like Neural Net accelerator cards, ASIC, FPGA, and so forth.

      • @[email protected]
        link
        fedilink
        210 months ago

        Interesting, I definitely need to check out MLIR stuff more. I’ve always been a bit dissuaded that it’s one more step in my IR -> MLIR -> LLVM chain, but ability to compile it to multiple GPUs is a very good selling point.

        • TheLinuxGuy
          link
          English
          010 months ago

          Yeah, MLIR is more or less an “IR with Dialects”, a lot of IR language spec share a lot in common with one another, so MLIR try to standardize that similarity between IR. Because of that feature, it reduce amount of IR code that developer have to worry about and they can progressively expand the available dialects for MLIR as they develop a compiler like IREE.

          • @[email protected]
            link
            fedilink
            210 months ago

            Yeah, MLIR is more or less an “IR with Dialects”, a lot of IR language spec share a lot in common with one another, so MLIR try to standardize that similarity between IR

            Oh, shit, that sounds like C all over again, just for GPUs this time.

            But that note aside, definitely sounds like something I need to learn more about.

            • TheLinuxGuy
              link
              English
              110 months ago

              Lol, that one way to put it. Basically a language convergence, not a bad thing to be honest.