-
Notifications
You must be signed in to change notification settings - Fork 12
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
Pace util mostly does not depend on dsl #93
Conversation
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.
Great job!
state.u.synchronize() | ||
state.v.synchronize() | ||
state.ua.synchronize() | ||
state.va.synchronize() |
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.
do you know why we do or do not need the synchronize for u vs ua?
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.
I think this one is because we're not using slice_output
, which calls synchronize with certain backend. Since here the output is prepared manually, we call synchronize explicitly for the variables that were halo exchanged.
edge_vect_e_2d.data[:-1, :-1], edge_vect_w_2d.data[:-1, :-1] = ( | ||
east_edge_data[:-1, :-1], | ||
west_edge_data[:-1, :-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.
this initially made me worried, assigning values to existing quantities with the gpu backend has been finnicky in various situations, and this code won't get exercised on the gpu at the moment. But I see other methods here using this pattern on code that is used in the dycore and thus is tested on GPU, so looks good.
@@ -1,9 +1,6 @@ | |||
import dataclasses | |||
from typing import Any, Optional | |||
|
|||
import numpy as np | |||
|
|||
from pace.dsl import gt4py_utils as utils |
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.
yay for less cycles!
Purpose
Part I of
pace.util
does not depend onpace.dsl
. In this PR, we remove dependencies ofmake_storage
inDriverGridData
. Additional edge vector data are added in Metric Terms so that we can directly access their storage inDriverGridData
. We decide to allowpace.util
to still depend onpace.dsl.stencil.GridIndexing
(used strictly in fill corners in Metric Terms).Code changes:
Requirements changes:
Infrastructure changes:
edge_vect_e_2d
andedge_vect_w_2d
in Metric Terms: they are the x/y repeated version ofedge_vect_e/w
fv_update_phys
reference to dycore state quantitytest_driver_runs
to also run post physics codeChecklist
Before submitting this PR, please make sure: