Announcement

Collapse
No announcement yet.

Khronos Officially Announces Its LLVM/SPIR-V Translator

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

  • pmoreau
    replied
    Originally posted by Veerappan View Post
    Saw this repository a few nights ago while I was trying to build Pierre's work to let clover handle spir-v ingestion. Cloned/built it and now I'm trying to figure out what rebase-related issues are preventing me from actually building clover with spir-v support.
    I am waiting on a pull request (https://github.com/KhronosGroup/SPIR...nslator/pull/3) to be merged before rebasing my series to use this new repository.

    Originally posted by Veerappan View Post
    I believe he's targetting Nouveau clover/spir-v support, but hopefully it'll also work out for radeonsi/r600 and any others who are interested.
    The current series on the mailing list (branch clover_spirv_series_v6) implements the cl_khr_il_program extension to allow consuming SPIR-V binaries in OpenCL 1.2 and OpenCL 2.0 (and the core SPIR-V support from OpenCL >= 2.1). I translate the SPIR-V binaries back to LLVM IR, so they can be easily integrated in the current workflow. So that first series benefits directly to r600 and radeonsi (the only clover “drivers” using LLVM IR, AFAIK).

    The other series, which is waiting for this first one to be merged and some changes to NIR, translates LLVM IR to SPIR-V (if the program isn’t already in SPIR-V) if desirable. That SPIR-V can then be consumed as-is, or translated to NIR; Karol Herbst, Rob Clark and others have been working on adding OpenCL SPIR-V support in NIR. This work can then be used to advertise OpenCL support for nouveau, freedreno and etnaviv, and other NIR consumer drivers if they want to.

    Leave a comment:


  • Veerappan
    replied
    Originally posted by andreano View Post
    OMG, everything compiles to LLVM-IR, so does this make everything run on GPUs?

    Anyway, just a bi-directional compiler is unusual in itself.
    But not too surprising. The original SPIR was based on LLVM IR, so translating between the two should be much simpler than bidirectionally translating between other IR types. Not quite sure how much SPIR-V has diverged from the original SPIR (probably more than expected), but there was at least a common base.

    And with regard to the first part... Original OpenCL C was a subset of C99. There are still limitations in CLC (e.g. Can't have kernel functions recursively call themselves, dynamic memory allocation is also problematic), but there's a lot of things that you can do on a GPU, just not necessarily efficiently.

    Leave a comment:


  • andreano
    replied
    OMG, everything compiles to LLVM-IR, so does this make everything run on GPUs?

    Anyway, just a bi-directional compiler is unusual in itself.

    Leave a comment:


  • Veerappan
    replied
    Saw this repository a few nights ago while I was trying to build Pierre's work to let clover handle spir-v ingestion. Cloned/built it and now I'm trying to figure out what rebase-related issues are preventing me from actually building clover with spir-v support.

    I believe he's targetting Nouveau clover/spir-v support, but hopefully it'll also work out for radeonsi/r600 and any others who are interested.

    Leave a comment:


  • phoronix
    started a topic Khronos Officially Announces Its LLVM/SPIR-V Translator

    Khronos Officially Announces Its LLVM/SPIR-V Translator

    Phoronix: Khronos Officially Announces Its LLVM/SPIR-V Translator

    The Khronos Group has officially announced the long-awaited open-source availability of their SPIRV-LLVM-Translator that allows the bi-directional translation of SPIR-V and LLVM IR...

    http://www.phoronix.com/scan.php?pag...LVM-Translator
Working...
X