Skip to content

Conversation

@vchuravy
Copy link
Member

Port of #621

(cherry picked from commit b8b53da)
Comment on lines 52 to 57

[extras]
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Copy link
Member

@christiangnrd christiangnrd Jun 30, 2025

Choose a reason for hiding this comment

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

Suggested change
[extras]
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

Since test/Project.toml exists, I think this can be deleted and the StaticArrays entry added to that file instead

@vchuravy vchuravy added this to the 0.10.0 milestone Jul 22, 2025
Comment on lines +3 to +7
import KernelAbstractions: get_backend, CPU
using StaticArrays: SizedArray, MArray

get_backend(A::SizedArray) = get_backend(A.data)
get_backend(::MArray) = CPU()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import KernelAbstractions: get_backend, CPU
using StaticArrays: SizedArray, MArray
get_backend(A::SizedArray) = get_backend(A.data)
get_backend(::MArray) = CPU()
import KernelAbstractions: get_backend, POCLBackend
using StaticArrays: SizedArray, MArray
get_backend(A::SizedArray) = get_backend(A.data)
get_backend(::MArray) = POCLBackend()

Reduces the amount of work required when GPU and CPU get removed

backendT = typeof(backend).name.wrapper # To look through CUDABackend{true, false}
@test backend isa backendT

@test KernelAbstractions.get_backend(@MMatrix [1.0]) isa CPU
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@test KernelAbstractions.get_backend(@MMatrix [1.0]) isa CPU
@test KernelAbstractions.get_backend(@MMatrix [1.0]) isa KernelAbstractions.POCLBackend

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.

3 participants