Announcement

Collapse
No announcement yet.

LLVM Adds MLIR-Vulkan-Runner To Run MLIR On Vulkan-Enabled GPUs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LLVM Adds MLIR-Vulkan-Runner To Run MLIR On Vulkan-Enabled GPUs

    Phoronix: LLVM Adds MLIR-Vulkan-Runner To Run MLIR On Vulkan-Enabled GPUs

    Added to the LLVM source tree today is mlir-vulkan-runner as a new utility for testing with some interesting possibilities...

    http://www.phoronix.com/scan.php?pag...-Vulkan-Runner

  • #2
    Why yet another IR only for ML? Can't the ML guys just use SPIR-V?

    Comment


    • #3
      Originally posted by Lycanthropist View Post
      Why yet another IR only for ML? Can't the ML guys just use SPIR-V?
      It is confusing, but MLIR is not really machine learning. It is simply a framework to help you write a compiler front end.

      The idea is that a compiler can have it's own language specific IR, which is called a "MLIR dialect". This could be very high level, it could even replace the AST (Abstract Syntax Tree). Normally this dialect would be one of the first things a compiler would produce. The compiler front end can also easily add optimization passes over this IR that are difficult to do in LLVM IR because it is too low level.

      For example, suppose someone developed a MLIR dialect for C++, that captures stl vectors operations. Suppose you add a bunch of elements to a vector. The compiler could have C++ specific optimizations such as preallocating space in the vector if it can determine the vector size by examining the IR.

      The MLIR framework makes it super easy to translate from one MLIR dialect to another. In fact LLVM IR is also implemented as a MLIR dialect, so you can easily translate from the C++ MLIR dialect to LLVM IR.

      In other words, MLIR is a framework that makes it easier to write language front ends. LLVM IR is still there for the middle and back end.
      Last edited by paulpach; 02-26-2020, 10:45 PM.

      Comment

      Working...
      X