Repository navigation
Use GPUArrays' BLAS hooks for LinearAlgebra's products, triangular operations and BLAS 1 functions - #779
Use GPUArrays' BLAS hooks for LinearAlgebra's products, triangular operations and BLAS 1 functions#779kshyatt wants to merge 5 commits into
Conversation
…erations and BLAS 1 functions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
974285c to
aa91e10
Compare
GPUArrays 12.4 implements dot for all wrapped GPU arrays, and returns a real number for Hermitian matrices, as LinearAlgebra does.
|
With GPUArrays 12.4 (JuliaGPU/GPUArrays.jl#888), the |
oneMKL's nrm2 loses subnormal Float32 elements, which GPUArrays' generic norm rescales: the subnormal norm tests of GPUArrays' test suite failed. CUDA.jl only implements this hook for half precision too.
|
The |
The inverse plans scaled by 1/n, a Float64. oneAPI.jl's rmul! used to convert that to the array's eltype; GPUArrays' rmul! keeps a wider scalar, as LinearAlgebra does, which devices without Float64 support can't compile. Use AbstractFFTs.normalization with the plan's real type, as CUDA.jl's cuFFT does.
Julia 1.10.12 and earlier reject row-skipping views in LinearAlgebra's triangular solves, and pass strided vectors to trtrs as if they were contiguous, which made the CPU reference fail on the Aurora 1.10 job. The GPU side still operates on views.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #779 +/- ##
==========================================
+ Coverage 86.90% 86.95% +0.04%
==========================================
Files 55 55
Lines 5103 5007 -96
==========================================
- Hits 4435 4354 -81
+ Misses 668 653 -15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Implements GPUArrays' BLAS hooks (JuliaGPU/GPUArrays.jl#852) with oneMKL, and removes the
LinearAlgebramethods that duplicated GPUArrays' dispatch: matrix and matrix-vector products, triangular multiplication and division,syrk/herk,dgmm, and the BLAS 1 functions. GPUArrays now decides which calls reach oneMKL, with generic kernels for the rest, as with CUDA.jl (JuliaGPU/CUDA.jl#3626) and AMDGPU.jl (JuliaGPU/AMDGPU.jl#1229).Requires GPUArrays 12.4, which implements
dotfor every wrapped GPU array, so thedotmethods forSymmetricandHermitianmatrices are gone, and whose genericaxpy!/axpby!pair operands of different shapes.normonly uses oneMKL'snrm2for half precision: it loses subnormalFloat32elements, which GPUArrays' genericnormrescales.test/onemkl.jlgains tests for the cases the old methods handled: triangular operations on strided views,falseas a strong zero,Diagonalnorms, anddotof wrapped arrays and strided views.