GPUArrays.jl
GPUArrays.jl copied to clipboard
Reusable array functionality for Julia's various GPU backends.
Replaces https://github.com/JuliaGPU/CUDA.jl/pull/1197 with a more generic version: ```julia julia> using JLArrays julia> (x=[1.0], y=[2f0 3f0]) # Arrays (x = [1.0], y = Float32[2.0 3.0]) julia> map(jl, ans) # previously looked...
This is a companion PR to https://github.com/JuliaLang/julia/pull/52439. There, we avoid constructing `MulAddMul` objects, which are, however, used here in the most generic multiplication kernel. Along the way, I rearranged the...
Fixes part of https://github.com/JuliaGPU/GPUArrays.jl/issues/521.
## Problem 1 method ambiguity for Adjoint ```julia julia> Base.mapreducedim!(identity, +, CUDA.zeros(4), CUDA.ones(4,4)') ERROR: MethodError: mapreducedim!(::typeof(identity), ::typeof(+), ::CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, ::Adjoint{Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}) is ambiguous. Candidates: mapreducedim!(f, op, R::AnyGPUArray,...
Functions like `map` work on GPU arrays directly, but not on StructArrays-of-GPUArrays: ```julia using Metal A = StructArray(a=MtlArray(rand(Float32, 10^3)), b=MtlArray(rand(Int8, 10^3))) map(exp, A.a) # works map(x -> exp(x.a), A) #...
Depends on https://github.com/JuliaGPU/KernelAbstractions.jl/pull/317 Can happen last as long as we decide where backend lives.
TODO: - [x] Remove indexing files - [x] Figure out how to `@kernelize` linalg 'n stuff - [x] precompile - [ ] test Just a PR on a PR to...
I wasn't sure how much this issue overlaps with existing ones, so apologies if this is a duplicate. I constantly get into the aforementioned scalar indexing issue when working with...
Re-land #454, which turned out problematic: Broke Flux.jl (https://github.com/FluxML/Flux.jl/issues/2214), CUDA.jl (https://buildkite.com/julialang/cuda-dot-jl/builds/3750), and causes excessive compilation with Transformers.jl (https://github.com/JuliaGPU/GPUArrays.jl/pull/454#issuecomment-1475116479). TODO: look into these failures. cc @maxwindiff
Changing this for triu and tril, adding support for QRQ for getproperty and printarray