Skip to content

Commit

Permalink
add missing LinearAlgebra methods on GPU (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpuri3 committed Oct 25, 2023
1 parent 6d4ea42 commit d22a56c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/ComponentArraysGPUArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ function Base.fill!(A::GPUComponentArray{T}, x) where {T}
end

LinearAlgebra.dot(x::GPUComponentArray, y::GPUComponentArray) = dot(getdata(x), getdata(y))
LinearAlgebra.dot(x::GPUComponentArray, y::AbstractGPUArray) = dot(getdata(x), y)
LinearAlgebra.dot(x::AbstractGPUArray, y::GPUComponentArray) = dot(x, getdata(y))

LinearAlgebra.norm(ca::GPUComponentArray, p::Real) = norm(getdata(ca), p)
LinearAlgebra.rmul!(ca::GPUComponentArray, b::Number) = GPUArrays.generic_rmul!(ca, b)

Expand Down

2 comments on commit d22a56c

@jonniedie
Copy link
Owner

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/94095

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.15.4 -m "<description of version>" d22a56c8d3d1f76393720c2f309c47d7d37bea7d
git push origin v0.15.4

Please sign in to comment.