Implement a columnwise shmem operator #2328
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR abstracts all but the physics from CliMA/ClimaAtmos.jl#3655, and implements
columnwise!
.This operator can be used to assign a large number of broadcast operations, all within the same kernel.
The idea is that we can use this function
implicit_tendency!
(which will set all of the tendencies in a single kernel)remaining_tendency!
(before / after dss, before / after horizontal terms)Some preliminary results from the dry baro wave:
For
ldiv!
andwfact!
, I think we may need to rethink their implementations.The only optimizations I've done in this operator is shared memory. There is probably a lot of room in tuning and improving memory access. A big benefit of this approach is that this will drastically reduce the number of kernel launches, and sequential memory reads.
This approach also helps push us towards CliMA/ClimaAtmos.jl#3594.