-
Notifications
You must be signed in to change notification settings - Fork 173
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 test of tracer advection-diffusion for Enzyme #3480
base: main
Are you sure you want to change the base?
Conversation
btw, the new test seem to fail? |
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.
added a few suggestions, most of them to improve clarity
but most importantly the tests seem to fail. I don't know how to interpret the Enzyme error... :(
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Hm haven't seen that error before. In any case this PR should resolve: EnzymeAD/Enzyme.jl#1297 |
Just to summarize where we are here:
|
Okay, let's see if we can test whether that fixes it before merging in changes from #3477, just so we can test one thing at a time. |
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
We'll have to do some benchmarking on the CPU too |
@@ -283,7 +283,7 @@ end | |||
##### Tendency calculators for an explicit free surface | |||
##### | |||
|
|||
""" Calculate the right-hand-side of the free surface displacement (``η``) equation. """ | |||
""" Calculate the right-hand-side of the free surface displacement equation. (``η``) """ |
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.
The first one is right (η
is the symbol we use for the free surface displacement, and is sometimes referred to as the "η
-equation").
…ly, let's see about CI
* Adding test to check for Oceananigans' broadcasted arrays (via KA) breaking with AD * Update test_enzyme.jl * Update test_enzyme.jl * Update test_enzyme.jl * Update test_enzyme.jl * Update Project.toml * Up KernelAbstractions * Update test_enzyme.jl * Made a few problematic objects inactive in OceananigansEnzymeExt * Accidentally pushed some bug reductions, undoing those --------- Co-authored-by: William Moses <gh@wsmoses.com> Co-authored-by: Gregory Wagner <wagner.greg@gmail.com>
@glwagner I think we're getting some non-deterministic CI errors again... tests are failing for this commit that didn't on the previous one. |
…each of the last two runs (two different tests)
@navidcy can we get a final approval/merge? |
@@ -154,7 +154,7 @@ function compute_free_surface_tendency!(grid, model, kernel_parameters) | |||
|
|||
launch!(arch, grid, kernel_parameters, | |||
compute_hydrostatic_free_surface_Gη!, model.timestepper.Gⁿ.η, | |||
grid, args) | |||
grid, args...) |
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.
Does this produce a catastrophic slow down on CPU or no?
@@ -122,7 +122,7 @@ function compute_hydrostatic_free_surface_tendency_contributions!(model, kernel_ | |||
c_tendency, | |||
grid, | |||
active_cells_map, | |||
args; | |||
args...; |
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 went in previously to fix an O(100)x slow down on CPU, so we should test whether the slow down is present in this PR
Let's do a simple test of CPU performance to make sure we won't have to revert this soon given the change to splatting (which was implemented to solve a 100x slow down a few months ago) |
Added an additional test to the enzyme test set for differentiating a
HydrostaticFreeSurfaceModel
with tracer advection and diffusion.