JuliaGPU/CUDA.jl

Support for matrix exp

Open

#168 geöffnet am 6. Aug. 2018

Auf GitHub ansehen
 (1 Kommentar) (4 Reaktionen) (0 zugewiesene Personen)Julia (274 Forks)batch import
cuda arrayenhancementgood first issue

Repository-Metriken

Stars
 (1.408 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 5h) (16 gemergte PRs in 30 T)

Beschreibung

using CuArrays
n = 4
A = randn(n, n) |> cu
exp(A)
ERROR: ReadOnlyMemoryError()                         
Stacktrace:                                          
 [1] exp!(::CuArray{Float32,2}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/LinearAlgebra/src/lapack.jl:209                                                                            
 [2] exp(::CuArray{Float32,2}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/LinearAlgebra/src/dense.jl:508                                                                              
 [3] top-level scope at none:0                       

I get the same error without a stack trace for A \ cu(randn(n))

(This is using CuArrays#vc/0.7 (a55b12a180273c80c34c1d) depending on GPUArrays#master, since CuArrays#master doesn't seem to support indexing A[i,j] that exp(m::AbstractMatrix) uses)

How much work would it take to support LinearAlgebra functions like these? If reasonable for a beginner like myself, any pointers to where to start?

Thanks!

Contributor Guide