Looking for Windows ARM tester

After a successful OpenCL test on my AMD iGPU, I want to see if the same method can be used to target Snapdragon Adreno GPUs. Unfortunately, I don’t have access to one of these devices.

Can someone on Windows ARM help me and @ChetanVardhan run a few julia commands to test this?

I have. Where is the command?

1 Like

Ok, first install this: Release v1.2404.1.0 · microsoft/OpenCLOn12 · GitHub

Then install OpenCL.jl in a new julia environment and try:

using OpenCL
OpenCL.cl.platforms()

Before installing that appx it can also run:

julia> using OpenCL

julia> OpenCL.cl.platforms()
2-element Vector{OpenCL.cl.Platform}:
 OpenCL.Platform('QUALCOMM Snapdragon(TM)' @0x00007ff8c7f50ec0)
 OpenCL.Platform('OpenCLOn12' @0x00000270b7ab9cc0)

julia>

Is installing of that necessary? Is that the same thing as

1 Like

It might work without installing it, but I didn’t try that on my machine.

Try cl.devices(cl.platforms()[2]) and then pick the GPU from the devices shown. Not the CPU fallback. It should say Adreno or something related. Then run the example:

cl.device!(cl.devices(cl.platforms()[2])[1]) # change this to pick the GPU!

const source = """
   __kernel void vadd(__global const float *a,
                      __global const float *b,
                      __global float *c) {
      int i = get_global_id(0);
      c[i] = a[i] + b[i];
    }"""

dims = (2,)
a = round.(rand(Float32, dims) * 100)
b = round.(rand(Float32, dims) * 100)
c = similar(a)

d_a = CLArray(a)
d_b = CLArray(b)
d_c = CLArray(c)

prog = cl.Program(; source) |> cl.build!
kern = cl.Kernel(prog, "vadd")

len = prod(dims)
clcall(kern, Tuple{CLPtr{Float32}, CLPtr{Float32}, CLPtr{Float32}},
       d_a, d_b, d_c; global_size=(len,))
c = Array(d_c)
a + b ≈ c

Also try the same with the official Qualcomm drivers cl.devices(cl.platforms()[1])[...]

If that works, there is no need for the fallback.

Both [2] and [1] works and have the same warning. Last line result is true.

1 Like

That’s fine, it shows the same warning for my iGPU.

1 Like