What functions need GPU support

18 vues (au cours des 30 derniers jours)
Bruno Luong
Bruno Luong le 26 Août 2023
Modifié(e) : Michal le 30 Août 2023
Recently there are few posts about function that are not fully support gpuArray and could benefit from more intensive GPU support by TMW.
I open this thread so that users can submit their wishes and explain a typical user-case and why it is important for him/her to have this gpu feature.
I put here a list by category, but if one have a specific function that is not falling in any category, you are welcome to add it.
Basic array arithmetics and linear algebra seems pretty much well covered (?) but I do not know if something is missing in this huge library.
But these still need to be investigated.
  • Optimization functions, especially the gradient method where the gradient calculation can be performed in parallel on GPU
  • ODE functions where the Jacobian can be estimated in parallel
  • Interpolation functions where the preparation step and inquiring step can be both parallelized
  8 commentaires
Matt J
Matt J le 29 Août 2023
And for N=500 with/without SpecifyObjectiveGradient?
Bruno Luong
Bruno Luong le 29 Août 2023
I run several times and semect the best. CPU is much faster
  • CPU : Elapsed time is 0.109399 seconds.
  • GPU: Elapsed time is 2.010831 seconds.

Connectez-vous pour commenter.

Réponses (3)

Bruno Luong
Bruno Luong le 29 Août 2023
  4 commentaires
Matt J
Matt J le 30 Août 2023
Modifié(e) : Matt J le 30 Août 2023
@Michal You should probably present your tests.
Michal
Michal le 30 Août 2023
Modifié(e) : Michal le 30 Août 2023
@Matt J I should delete my comment, because I just realize that all my timing results are not reliably reproducible. Measured timings strongly depends on installed version of NVIDIA driver (driver 535.x vs 525.x), at least on Ubuntu Linux 22.04. Please ignore my comment!

Connectez-vous pour commenter.


Matt J
Matt J le 26 Août 2023
Modifié(e) : Matt J le 26 Août 2023
Sparse array indexing would be one example, e.g
>> A=gpuArray.speye(5)
A =
(1,1) 1
(2,2) 1
(3,3) 1
(4,4) 1
(5,5) 1
>> A(1,:)
Error using indexing
Sparse gpuArrays do not support indexing.
The lack of this might be the reason why some of what you've listed in the OP are not supported. A number of the Optimization Toolbox functions need to support indexing, I'm sure.
  2 commentaires
Bruno Luong
Bruno Luong le 26 Août 2023
It looks like an important basic piece of library is missing.
Bruno Luong
Bruno Luong le 29 Août 2023
Modifié(e) : Bruno Luong le 29 Août 2023
One of the reason why sparse indexing code on gpu and cpu are not directly "transposable" because the storage on cpu is compressed sparse column (CSC) whereas gpu uses (CSR).

Connectez-vous pour commenter.


Bruno Luong
Bruno Luong le 29 Août 2023
Matrix decomposition class seem not supported by GPU

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by