Repository navigation
Conversation
|
Do we need the additional BLAS stuff here JuliaGPU/GPUArrays.jl#852 (comment) ? |
… operations GPUArrays 12.3 implements the dispatch from LinearAlgebra's storage-level `mul!` and triangular methods to BLAS routines, and calls hooks that back-ends implement with their library. Replace our copy of that dispatch with methods for those hooks. Float16 and BFloat16 products still use gemm_ex!. The triangular-triangular product now zeroes a triangle on a copy of its operand, instead of on the caller's matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
GPUArrays now implements the BLAS 1 operations, the Diagonal and triangular-triangular products, and matrix addition with a transposed operand, calling hooks for the BLAS routines. Implement those with rocBLAS, and drop our copies of the rest. rocBLAS' nrm2 doesn't rescale, so norm keeps using GPUArrays' implementation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
…l edge cases Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
a7dffcc to
086c093
Compare
|
@luraess with the latest GPUArrays release I think this is ready for review |
|
Thanks, this is a nice! A few things we may want to tweak (upon suggestions from the robot):
Before merging I'll run CSCS CI on it briefly as well |
It doesn't, I've actually opened an issue with AMD about this ROCm/rocm-libraries#16703 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013b7DCbTAjtfi3JqXU4xZmW
|
OK, 1, 2, 3, and 5 are fixed |
|
Thanks! 2, 3 and 5 look good. For 1, could you add a one-line comment next to the BLAS 1 hooks so nobody adds the hook back, e.g. Optional on 3: |
|
Done for both :) |
|
Seems I can't run CSCS pipelines as PR is from a fork - sorry for the noise |
|
Oh is this due to the changes Tim made? I wonder if there's a way to reroute the branch if I push it here? |
|
Unrelated. CSCS ci can not run from forks and I missed that here. |
|
CSCS CI doesn't run on fork PRs, so I ran its jobs locally at 403735b, with GPUArrays 12.3.0. All 8 pass: the four jobs of
This includes |
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 |
|
I merged |
|
Thanks @maleadt - let's wait GPU BK passes and then we could merge and release. |
Implements GPUArrays' BLAS hooks (JuliaGPU/GPUArrays.jl#852) with rocBLAS, and removes the
LinearAlgebramethods that duplicated GPUArrays' dispatch: matrix and matrix-vector products, triangular multiplication and division,syrk/herk,geam,dgmm, and the BLAS 1 functions. GPUArrays now decides which calls reach rocBLAS, with generic kernels for the rest, as with CUDA.jl (JuliaGPU/CUDA.jl#3626) and oneAPI.jl (JuliaGPU/oneAPI.jl#779).Requires GPUArrays 12.4, which implements
dotfor every wrapped GPU array, so thedotmethods forSymmetricandHermitianmatrices are gone too.test/hip_rocarray/blas_edge_cases.jltests the cases the old methods handled: triangular operations on strided views,falseas a strong zero,Diagonalnorms, anddotof wrapped arrays and strided views.