# Failed to precompile OpenCL in julia V1.9, for GPU programming, AMD Radeon graphics

**URL:** https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695
**Category:** New to Julia
**Tags:** question, package
**Created:** [November 24, 2023, 11:02pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695 "2023-11-24T23:02:40Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 24, 2023, 11:02pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/1 "2023-11-24T23:02:41Z")

</div>

Hello. Anyone to kindly assist. Am trying to instal OpenCL library in julia but getting a precompile OpenCL error. Any suggestions on getting this library to work.

Below is the error am getting: Failed to precompile OpenCL [08131aa3-fb12-5dee-8b74-c09406e224a2] to “C:\Users\path-to-julia\.julia\compiled\v1.9\OpenCL\jl\_6F5C.tmp”.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 25, 2023, 9:15am UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/2 "2023-11-25T09:15:11Z")

</div>

Which Julia version are you using? What is the output of `versioninfo()`?

Which graphics card are you using?

Did you try to install it in clean environment, e.g.

```julia
mkdir test
cd test
julia --project="."
using Pkg
Pkg.add("OpenCL")

```

I am not sure if it is expected to work on Windows, see: [Support Windows · Issue #199 · JuliaGPU/OpenCL.jl · GitHub](https://github.com/JuliaGPU/OpenCL.jl/issues/199)

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 25, 2023, 11:33am UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/3 "2023-11-25T11:33:09Z")

</div>

I am using AMD version 31.0.21905.1001, and am using Windows.

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [November 25, 2023, 12:15pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/4 "2023-11-25T12:15:55Z")

</div>

ROCm has started supporting windows [Install ROCm (HIP SDK) on Windows — ROCm 5.7.1 Documentation Home](https://rocm.docs.amd.com/en/latest/deploy/windows/index.html)  
AMDGPU.jl explicitly supports Windows (and Linux):  
[GitHub - JuliaGPU/AMDGPU.jl: AMD GPU (ROCm) programming in Julia](https://github.com/JuliaGPU/AMDGPU.jl)

So, if you don’t need OpenCL in particular, you could try AMDGPU.jl.

They’re a little limited on officially supported GPUs, though.

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 25, 2023, 1:22pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/5 "2023-11-25T13:22:03Z")

</div>

Thank You @Elrod @ufechner7. most errors i had seems to be resolved. i have one error remaining:  
MIOpen is unavailable, functionality will be disabled.

when am testing using a simple multiplication, it terminates unexpectedly.

---

<div class="post-metadata">

### Author: ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)
#### Post date: [November 25, 2023, 11:55pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/6 "2023-11-25T23:55:46Z")

</div>

Can you post the output of `AMDGPU.versioninfo()`?

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 26, 2023, 2:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/7 "2023-11-26T14:09:34Z")

</div>

![Screenshot 2023-11-26 160814](https://global.discourse-cdn.com/julialang/original/3X/5/2/523ba3b25df4d713a0d1a26a820054f2dbe270ba.png)  
This is all I could get about the version

---

<div class="post-metadata">

### Author: ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)
#### Post date: [November 26, 2023, 10:20pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/8 "2023-11-26T22:20:24Z")

</div>

What I mean is that when you launch Julia REPL, execute following:

```julia
julia> using AMDGPU

julia> AMDGPU.versioninfo()

```

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 27, 2023, 5:03pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/9 "2023-11-27T17:03:14Z")

</div>

![Screenshot 2023-11-27 190009](https://global.discourse-cdn.com/julialang/original/3X/d/f/df3db3dc7bb4bf358bbf21f5784e9374b8c7f0a0.png)

I tried to uninstall but the program was loading the whole time, uninstallation was unsuccessful.

---

<div class="post-metadata">

### Author: ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)
#### Post date: [November 27, 2023, 6:38pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/10 "2023-11-27T18:38:48Z")

</div>

Does something like following work?

```julia
julia> x = AMDGPU.ones(Float32, 4, 4)

julia> sin.(x)

julia> x * x

```

And what GPU do you have?

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 29, 2023, 4:17pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/11 "2023-11-29T16:17:32Z")

</div>

The computer I am using AMD Radeon™ Graphics. The driver version is 31.0.21905

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 29, 2023, 4:41pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/12 "2023-11-29T16:41:47Z")

</div>

The point is, there are a lot of different Radeon graphic cards. Which one do you have?

---

<div class="post-metadata">

### Author: ![Beatha\_Shilongo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beatha_shilongo/32/49418_2.png) [@Beatha\_Shilongo](https://discourse.julialang.org/u/Beatha_Shilongo)
#### Post date: [November 29, 2023, 5:17pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/13 "2023-11-29T17:17:14Z")

</div>

My PC shows: AMD Ryzen 5000 Series 7

---

<div class="post-metadata">

### Author: ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)
#### Post date: [December 1, 2023, 4:58pm UTC](https://discourse.julialang.org/t/failed-to-precompile-opencl-in-julia-v1-9-for-gpu-programming-amd-radeon-graphics/106695/14 "2023-12-01T16:58:55Z")

</div>

To get the GPU model you can do:

```julia
julia> using AMDGPU

julia> AMDGPU.device()

```

And post the output here.  
If your GPU is something like `gfx103x` then it is not yet supported properly on Windows.
