Skip to content

Conversation

@dkarrasch
Copy link
Contributor

Cf. JuliaGPU/GPUArrays.jl#472 and JuliaGPU/CUDA.jl#1904. Same here: if gemm_dispatch! is (sufficiently) internal, it might be actually removed.

@dkarrasch
Copy link
Contributor Author

This requires the GPUArrays.jl PR to be merged and released first.

@maleadt
Copy link
Member

maleadt commented May 12, 2023

Thanks for the PR! Note to self, we should also do this to Metal.jl (https://github.com/JuliaGPU/Metal.jl/blob/main/lib/mps/linalg.jl). I guess the change would be mostly similar.

This requires the GPUArrays.jl PR to be merged and released first.

We commit a Manifest here, so you can actually point it to your GPUArrays branch (or GPUArrays#master, once that PR would be merged).

@dkarrasch
Copy link
Contributor Author

I couldn't find a generic_matvecmul!-like function that dispatches to gemv! and the symmetric/hermitian counterparts. Should there be one? It seems that currently mul!(::oneVector, ::oneMatrix, ::oneVector) falls back to GPUArrays.jl. Only if the matrix is Hermitian calls are caught and sent to symv! or hemv!.

# BLAS 2
#

# TODO: Should there be a LinearAlgebra._generic_matvecmul! that dispatches to gemv!, symv! and hemv! ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder...

@maleadt
Copy link
Member

maleadt commented May 31, 2023

Same difference in ArgumentError as with the CUDA.jl PR.

I couldn't find a generic_matvecmul!-like function that dispatches to gemv! and the symmetric/hermitian counterparts. Should there be one? It seems that currently mul!(::oneVector, ::oneMatrix, ::oneVector) falls back to GPUArrays.jl.

Yeah that looks like an oversight. oneMKL has gemv, so we should wrap that: https://spec.oneapi.io/versions/latest/elements/oneMKL/source/domains/blas/gemv.html

EDIT: actually, oneMKL.gemv and oneMKL.gemv! is available, it's just not wired op to LinearAlgebra.

@maleadt maleadt force-pushed the patch-1 branch 2 times, most recently from 075c280 to 0e05610 Compare June 1, 2023 13:05
@maleadt maleadt merged commit 0390a58 into JuliaGPU:master Jun 1, 2023
@dkarrasch dkarrasch deleted the patch-1 branch June 1, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants