Skip to content

Commit

Permalink
Merge pull request #1750 from CliMA/js/reproducer
Browse files Browse the repository at this point in the history
add field_matrix_solve! reproducer
  • Loading branch information
charleskawczynski authored May 22, 2024
2 parents fba0851 + 50ae409 commit 63ad94f
Show file tree
Hide file tree
Showing 4 changed files with 524 additions and 467 deletions.
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

2 comments on commit 63ad94f

@charleskawczynski
Copy link
Member Author

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/107410

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.14.5 -m "<description of version>" 63ad94fd580448b528e89de3055931baca4bbe85
git push origin v0.14.5

Please sign in to comment.