-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update vector conversions #1392
Conversation
2a86734
to
52ab498
Compare
bors try |
tryBuild failed: |
52ab498
to
df7d4ea
Compare
Split off from PR #1385 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good to me. It's a bit unfortunate that these are not captured in the axis tensor benchmarks. Can you point to the methods that these new functions are overriding / specializing on?
I'm curious if we can write a more general overloading, like we did before for project / transform
. It seems that one crux of this is to cache ∂x∂ξ' * ∂x∂ξ
, which seems like a good idea (I forgot that we left that on the table before).
Related issue: #867
In the context of the GPU version, we noticed that this function uses much less register space per thread compared to the pre-existing version. Looking at the Nsight Systems profile for the pre-existing version, the fundamental bottleneck seems to be register space. This helps us use more threads per block or enable the GPU to schedule multiple blocks on the same SM resulting in significant speedup. |
I believe we provide a specialization that overrides https://github.com/CliMA/ClimaCore.jl/blob/main/src/Geometry/conversions.jl#L102 for this specific case. Please correct me if I am missing something! |
Add specializations for CovariantVector to Contravariant123Vector transformation functions
efc7ac4
to
d315e51
Compare
bors try |
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
https://github.com/CliMA/ClimaCore.jl/blob/main/src/Geometry/conversions.jl#L102 for this specific case. Please correct me if I am missing something! Ah, yeah, that's a pretty bad method (it calls https://github.com/CliMA/ClimaCore.jl/blob/main/src/Geometry/conversions.jl#L73-L109 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but we should really improving the performance of these operators more systematically (like we did with project
/ transform
).
And add unit tests (I think GFlops.jl would work well here).
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Contravariant123Vector( | ||
u::CovariantVector{T, (3,)}, | ||
local_geometry::LocalGeometry{(1, 2, 3)}, | ||
) where {T} = | ||
local_geometry.gⁱʲ * Covariant123Vector(zero(u[1]), zero(u[1]), u[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sriharshakandala, can we hand-write this and avoid the dense mul?
1922: Update manifest files r=charleskawczynski a=charleskawczynski This PR updates the dependencies, which includes CliMA/ClimaCore.jl#1392 Co-authored-by: Charles Kawczynski <[email protected]>
Add custom
CovariantVector
toContravariant123Vector
transformation functions