GPU computing with Intel UHD Graphics 620

I recently noticed that my laptop has got an Intel UHD graphics card with 4gb memory.
I would like to know if this is of any use as regards Julia.
I installed OpenCL and executed the performance script given as part of examples and got the following output.

Size of test data: 32 MB
Julia Execution time: 0.0310 seconds
====================================================
Platform name:    Intel(R) OpenCL
Platform profile: FULL_PROFILE
Platform vendor:  Intel(R) Corporation
Platform version: OpenCL 2.1
----------------------------------------------------
Device name: Intel(R) UHD Graphics 620
Device type: gpu
Device mem: 3230 MB
Device max mem alloc: 1615 MB
Device max clock freq: 1100 MHZ
Device max compute units: 24
Device max work group size: 256
Device max work item size: (256, 256, 256)
Execution time of test: 0.0037 seconds
[ Info: Result norm: 0.0
====================================================
Platform name:    Intel(R) OpenCL
Platform profile: FULL_PROFILE
Platform vendor:  Intel(R) Corporation
Platform version: OpenCL 2.1
----------------------------------------------------
Device name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Device type: cpu
Device mem: 8074 MB
Device max mem alloc: 2019 MB
Device max clock freq: 1600 MHZ
Device max compute units: 8
Device max work group size: 8192
Device max work item size: (8192, 8192, 8192)
Execution time of test: 0.0095 seconds
[ Info: Result norm: 0.0

There is no native support for Intel GPU. You can use opencl.jlto write kernels and interop with Julia. I think for some operations you will definitely notice a performance improvement. In my work I’ve found that multithreading on Intel laptop CPUs generally gets you within an order of magnitude of the GPU performance and is just generally easier to work with.

2 Likes

As far as I know, OpenCL.jl mentioned above is your only chance to run code on an integrated Intel GPU.
However, in my experience, using OpenCL on an Intel CPU directly is often similarly fast or even faster than running the same code on the integrated GPU (but there can be a really significant difference if you have a dedicated GPU), cf.

https://discourse.julialang.org/search?q=opencl%20order%3Alatest