# Is there any plan for GPU linear algebra?

**URL:** <https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766>\
**Category:** GPU\
**Tags:** package\
**Created:** [October 25, 2018, 12:52am UTC](https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766 "2018-10-25T00:52:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [October 25, 2018, 12:52am UTC](https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766/1 "2018-10-25T00:52:16Z")

</div>

I was trying to transfer from PyTorch, however, we don’t have a magma wrapper at the moment, do we? So is there anything includes things like SVD on GPU?

And is there any plan (or anyone interested in this) to make a wrapper for magma? (or whatever supports linear algebra on GPU).

---

<div class="post-metadata">

**Author:** ![Vic](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@Vic](https://discourse.julialang.org/u/Vic)\
**Post date:** [October 25, 2018, 1:54am UTC](https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766/2 "2018-10-25T01:54:41Z")

</div>

Hi, did you notice this?[GPU - JuliaLang](https://discourse.julialang.org/c/domain/gpu)

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [October 25, 2018, 5:52am UTC](https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766/3 "2018-10-25T05:52:23Z")

</div>

IIUC CUBLAS uses MAGMA internally for some operations, and CuArrays.jl uses CUBLAS so that’s a way to do linalg on NVIDIA GPUs. Not all of CUBLAS is wrapped, and not all of the linalg stdlib is supported, but wrapping additional calls is pretty easy (see eg. recent PRs like [this one](https://github.com/JuliaGPU/CuArrays.jl/pull/165)). Same thing with CUSOLVER for eg. svd.

---

<div class="post-metadata">

**Author:** ![jarvist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarvist/32/123_2.png) [@jarvist](https://discourse.julialang.org/u/jarvist)\
**Post date:** [October 25, 2018, 9:11am UTC](https://discourse.julialang.org/t/is-there-any-plan-for-gpu-linear-algebra/16766/4 "2018-10-25T09:11:02Z")

</div>

Not much here yet, but from reading the runtests.jl it seems to be able to call a couple of the BLAS routines at least. Probably a good place to start!  
[https://github.com/JuliaGPU/MAGMA.jl/](https://github.com/JuliaGPU/MAGMA.jl/)
