Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump compat to GPUArrays v11, JLArrays v0.1, KernelAbstractions 0.9 #658

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Compat for GPUArrays v11, JLArrays 0.2, KernelAbstractions 0.9 [#658](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/658)
- Interfaces for interpolation of AbstractGridArray [#671](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/671)
- Test folder sorted into subfolders [#671](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/671)
- Land model modularised + land netCDF output [#671](https://github.com/SpeedyWeather/SpeedyWeather.jl/pull/671)
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ Enzyme = "0.13"
FFTW = "1"
FastGaussQuadrature = "0.4, 0.5, 1"
FiniteDifferences = "0.12"
GPUArrays = "10"
GPUArrays = "11"
GenericFFT = "0.1"
GeoMakie = "0.7.6"
JLArrays = "0.1"
JLArrays = "0.1, 0.2"
JLD2 = "0.4, 0.5"
KernelAbstractions = "0.9.0 - 0.9.29"
KernelAbstractions = "0.9"
LinearAlgebra = "1.10"
Makie = "0.20, 0.21, 0.22"
NCDatasets = "0.12, 0.13, 0.14"
Expand Down
10 changes: 5 additions & 5 deletions src/LowerTriangularMatrices/lower_triangular_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,11 @@ function Base.similar(
return LowerTriangularArray{T, N, ArrayType{T,N}}(undef, size(L; as=Matrix))
end

function GPUArrays.backend(
::Type{LowerTriangularArray{T, N, ArrayType}}
) where {T, N, ArrayType <: GPUArrays.AbstractGPUArray}
return GPUArrays.backend(ArrayType)
end
function KernelAbstractions.get_backend(
a::LowerTriangularArray{T, N, ArrayType}
) where {T, N, ArrayType <: GPUArrays.AbstractGPUArray}
return KernelAbstractions.get_backend(a.data)
end

Adapt.adapt_structure(to, L::LowerTriangularArray) =
LowerTriangularArray(Adapt.adapt(to, L.data), L.m, L.n)
10 changes: 5 additions & 5 deletions src/RingGrids/general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,11 @@ AbstractGPUGridArrayStyle{2, ArrayType, Grid}(::Val{1}) where {ArrayType, Grid}
AbstractGPUGridArrayStyle{3, ArrayType, Grid}(::Val{4}) where {ArrayType, Grid} = AbstractGPUGridArrayStyle{4, ArrayType, Grid}()
AbstractGPUGridArrayStyle{3, ArrayType, Grid}(::Val{2}) where {ArrayType, Grid} = AbstractGPUGridArrayStyle{3, ArrayType, Grid}()

function GPUArrays.backend(
::Type{Grid}
) where {Grid <: AbstractGridArray{T, N, ArrayType}} where {T, N, ArrayType <: GPUArrays.AbstractGPUArray}
return GPUArrays.backend(ArrayType)
end
function KernelAbstractions.get_backend(
g::Grid
) where {Grid <: AbstractGridArray{T, N, ArrayType}} where {T, N, ArrayType <: GPUArrays.AbstractGPUArray}
return KernelAbstractions.get_backend(g.data)
end

function Base.similar(
bc::Broadcasted{AbstractGPUGridArrayStyle{N, ArrayType, Grid}},
Expand Down