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

add field_matrix_solve! reproducer #1750

Merged
merged 2 commits into from
May 22, 2024
Merged
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
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ ClimaCore.jl Release Notes
main
-------

v0.14.5
-------

- ![][badge-🐛bugfix] `run_field_matrix_solver!` was fixed for column spaces, and tests were added to ensure it doesn't break in the future.
PR [#1750](https://github.com/CliMA/ClimaCore.jl/pull/1750)
- ![][badge-🚀performance] We're now using local memory (MArrays) in the `band_matrix_solve!`, which has improved performance. PR [#1735](https://github.com/CliMA/ClimaCore.jl/pull/1735).
- ![][badge-🚀performance] We've specialized some cases in `run_field_matrix_solver!`, which results in more efficient kernels being launched. PR [#1732](https://github.com/CliMA/ClimaCore.jl/pull/1732).
- ![][badge-🚀performance] We've reduced memory reads in the `band_matrix_solve!` for tridiagonal systems, improving its performance. PR [#1731](https://github.com/CliMA/ClimaCore.jl/pull/1731).
- ![][badge-🚀performance] We've added NVTX annotations in ClimaCore functions, so that we have a more granular trace of performance. PRs [#1726](https://github.com/CliMA/ClimaCore.jl/pull/1726), [#1723](https://github.com/CliMA/ClimaCore.jl/pull/1723).

v0.14.0
-------

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimaCore"
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
authors = ["CliMA Contributors <[email protected]>"]
version = "0.14.4"
version = "0.14.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
30 changes: 21 additions & 9 deletions src/MatrixFields/single_field_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,28 @@ single_field_solve!(::ClimaComms.AbstractCPUDevice, cache, x, A, b) =
_single_field_solve!(ClimaComms.device(axes(A)), cache, x, A, b)

# CPU (GPU has already called Spaces.column on arg)
_single_field_solve!(device::ClimaComms.AbstractCPUDevice, cache, x, A, b) =
Fields.bycolumn(axes(A)) do colidx
_single_field_solve_col!(
ClimaComms.device(axes(A)),
cache[colidx],
x[colidx],
A[colidx],
b[colidx],
)
function _single_field_solve!(
device::ClimaComms.AbstractCPUDevice,
cache,
x,
A,
b,
)
space = axes(x)
if space isa Spaces.FiniteDifferenceSpace
_single_field_solve_col!(device, cache, x, A, b)
else
Fields.bycolumn(space) do colidx
_single_field_solve_col!(
device,
cache[colidx],
x[colidx],
A[colidx],
b[colidx],
)
end
end
end

function _single_field_solve_col!(
::ClimaComms.AbstractCPUDevice,
Expand Down
Loading
Loading