-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Line 14 in 38d2dc7
| include("algebra.jl") |
Line 19 in 38d2dc7
| include("graphBLAS.jl") |
These files don't exist. #2 would have caught it.
GPUGraphs.jl/src/GPUGraphsVector.jl
Line 27 in 38d2dc7
| backend::B |
We don't need to store the backend, we can retrieve it when we need it with get_backend.
and checking backend consistency between vectors at construction time.
GPUGraphs.jl/src/GPUGraphsVector.jl
Lines 76 to 85 in 38d2dc7
| function SparseGPUVector( | |
| n::Int, | |
| ::Type{Tv}, | |
| ::Type{Ti}, | |
| backend::Backend, | |
| ) where {Tv,Ti<:Integer} | |
| nzind = allocate(backend, Ti, 0) | |
| nzval = allocate(backend, Tv, 0) | |
| SparseGPUVector(n, nzind, nzval, backend) | |
| end |
Why allocate 0 instead of n?
GPUGraphs.jl/src/GPUGraphsVector.jl
Line 90 in 38d2dc7
| Base.size(V::SparseGPUVector) = V.n |
Base.size returns a tuple, even on vectors.
GPUGraphs.jl/src/GPUGraphsVector.jl
Line 98 in 38d2dc7
| pos = findfirst(V.nzind .== i) |
You can replace this with a functional variant to avoid allocation (at least on CPUs it's more efficient):
findfirst(==(i), V.nzind)GPUGraphs.jl/src/GPUGraphsMatrix.jl
Line 9 in 38d2dc7
| SparseGPUMatrixCSR{Tv,Ti<:Integer} <: AbstractSparseMatrixCSC{Tv,Ti} |
Not a CSC matrix.