# Does the new LLVM SPIR-V backend help Julia in any way?

**URL:** https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307
**Category:** Offtopic
**Tags:** gpu, llvm
**Created:** [January 28, 2025, 4:00pm UTC](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307 "2025-01-28T16:00:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xiaoxi](https://avatars.discourse-cdn.com/v4/letter/x/a9adbd/32.png) [@xiaoxi](https://discourse.julialang.org/u/xiaoxi)
#### Post date: [January 28, 2025, 4:00pm UTC](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307/1 "2025-01-28T16:00:53Z")

</div>

It appears that LLVM 20 will have a SPIR-V backend.

> <https://github.com/llvm/llvm-project/pull/123733>
>
> This commit promotes the SPIR-V backend from experimental to official status. As… a result, SPIR-V will be built by default, simplifying integration and increasing accessibility for downstream projects.
> 
> Discussion and RFC on Discourse: https://discourse.llvm.org/t/rfc-promoting-spir-v-to-an-official-target/83614
> 
> The PR reapplies the original patch https://github.com/llvm/llvm-project/pull/119653 and consecutive https://github.com/llvm/llvm-project/pull/123654, reverted due to buildbot failures.

Does this new backend help Julia in any way?

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [January 28, 2025, 5:39pm UTC](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307/2 "2025-01-28T17:39:03Z")

</div>

I don’t think so. We generally codegen directly from Julia to the GPU assembly.

---

<div class="post-metadata">

### Author: ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)
#### Post date: [January 28, 2025, 5:42pm UTC](https://discourse.julialang.org/t/does-the-new-llvm-spir-v-backend-help-julia-in-any-way/125307/3 "2025-01-28T17:42:15Z")

</div>

SPIR-V IR is the GPU assembly in the case of oneAPI and OpenCL. We’re currently using the Khronos’ LLVM to SPIR-V translator, and it would be interesting to try and switch to the one in LLVM, although I’m not sure it’s worth adding to the default build (maybe we can build it separately and ship `llvm-as` like we do for the LLVM IR downgrader).
