Matlab Amd GPU sopprt setup

Hello there,
I am runnign a script that i can't simplify any further, the problem is that i have to run big data sets.
The Pc i am running it on has an Amd Ryzen9 3900x (12 core 24 threads 4.1 ghz boost, running on all cores) , 16 gb 3200Mhz cl16 Ram, and a AMD Radeon Rx5700XT 8Gb GPU. I have read multiple threads that it is possible for Matlab to use the GPU (and yes Amd GPU's not Nivida GPU's). My question is how do i setup Matlab or the AMD driver?
Kind Regards
JJ

6 Comments

Can you clarify what toolboxes/commands/workflow you are trying to use with the GPU? I work on the Parallel Computing Toolbox and we only work with nVidia/CUDA for compute work as described in our system requirements documentation. So the AMD GPU isn't going to help with that -- but perhaps you have another workflow?
I have read multiple threads that it is possible for Matlab to use the GPU
Only for graphics rendering, with MATLAB calling upon the system OpenGL drivers that do whatever they do (possibly using GPU.)
Sorry for the long wait. I am not using any tollboxes, The workfolw contains multiple for loops (some are intertwined), but i cant simplify them. I guess then that the script only uses the OpenGL, so i guess it cant be helped.
I have the exact same setup, is there really no way to do GPU computing with an AMD card? I bought a small Asus NVIDIA GeForce GT 710 card just to try out some of the MATLAB functionality...
Mohammad Sami
Mohammad Sami on 22 Sep 2020
Edited: Mohammad Sami on 22 Sep 2020
So far I have not come across any documentation mentioning GPU computing is available for AMD GPUs in MATLAB.
MATLAB introduction to GPU computing only mentions using Nvidia CUDA enabled GPUs.
Even outside of MATLAB its hard to come across libraries that use AMD GPUs.
Mathworks indicated to me that OpenCL has a lot of optional parts, and that in practice manufacturers differ a fair bit on what they actually provide, and that the same manufacturer is not necessarily consistent throughout their model lines. This makes it difficult to create efficient OpenCL libraries. Mathworks would have to target specific "optional" capabilities as being required.
The discussion Mohammad Sami points out is a good one. Somewhere I saw another article that went even further and pointed out that IBM's GPU libraries are not compatible with CUDA or with OpenCL. Also, IBM and some other vendors are independently working on replacements for IEEE 754 because some of the features of IEEE 754 lead to lower efficiency (in particular, gradual underflow, and also some of the NaN handling, such as signaling nans.)
The struggle is thus not "CUDA vs OpenCL", it is "CUDA vs IBM vs OpenCL vs some other interesting options".
If I recall the article correctly, in terms of research development, the two architectures that have the most development are CUDA and IBM, so if Mathworks were to target a second architecture based upon where the active interesting research work is, it would probably make more sense to target IBM than OpenCL .

Sign in to comment.

Answers (1)

Raymond Norris
Raymond Norris on 1 Aug 2025
@Jonas Jeskulke you can find the latest remarks on GPU compute support here.

Products

Release

R2019a

Asked:

on 20 Jan 2020

Answered:

on 1 Aug 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!