New delnflux#78
Conversation
romanc
left a comment
There was a problem hiding this comment.
I'd keep the current function names. Imo, the numpy_ prefix doesn't help understanding the code.
|
|
||
| def numpy_corner_y(self, d2, nord_data: Quantity): | ||
| for k in range(nord_data.shape[0]): | ||
| if nord_data.data[k] > 0: |
There was a problem hiding this comment.
Isn't this now missing the previous comparison if nord > current_nord ? While the first two invocations hard-code current_node=0, the last two are run in a loop with current_nord between 0 and max(nord), which should - unless all nord values are the same - filter some edge computations, no?
| def numpy_corner_y(self, d2, nord_data: Quantity): | ||
| for k in range(nord_data.shape[0]): | ||
| if nord_data.data[k] > 0: | ||
| d2[0, 0, k] = d2[5, 0, k] |
There was a problem hiding this comment.
Forgive my ignorance, but is there a way that this could be written as a loop as in copy_corners() rather than explicitly writing out every element?
There was a problem hiding this comment.
There is. This re-write is due to ongoing performance engineering work on CPU - it's not necessarily going to stay that way in the long run.
It's also a studying case for us of a few things:
- a code that triggers heavy micro-op reject in stencils mode leading to poor performance
- a case of code that needs to "escape" the SDFG and remain in the full program optimizer purview
|
Superseded by NOAA-GFDL/NDSL#240 and PR #87. |
WIP for dace orchestration