Kernel calls for AMD diffusivity calculations #1876
Replies: 6 comments
-
The answer for this, as per @glwagner's comments, is because that's the syntax for From @glwagner : The kernel is created here: Noticeably apparently we don't use |
Beta Was this translation helpful? Give feedback.
-
Here's a question: wouldn't it be better if this were a |
Beta Was this translation helpful? Give feedback.
-
Here's a link to the Oceananigans source code relevant to this discussion: |
Beta Was this translation helpful? Give feedback.
-
I think reusing more features that have been developed for user applications internally is a great idea in general. More code reuse, more understandable internals. I have thought about this a bit for diffusivities and pressure fields, which are both auxiliary fields to a model and some flavor of "ComputedField". I think we would need to expand on the user interface to Expanding the computed field infrastructure to support simultaneous computation and propagated arguments would be really cool I think and a great addition to the code. Once that's done we could consider refactoring internal code, which would also be awesome. |
Beta Was this translation helpful? Give feedback.
-
Should we convert this to Discussions? |
Beta Was this translation helpful? Give feedback.
-
Sorry I just realized opened this in the wrong section! Yes, feel free to move it to a discussion if that's better |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pasted from a slack discussion:
Hi, everyone. Can someone please give me a little push in the right direction? I'm trying to understand the calls to calculate_tracer_diffusivity but I can't make sense of them.
The relevant code is here:
So it seems that
calculate_tracer_diffusivity!
is defined with the signatureκₑ, grid, closure, c, tracer_index, U
, but is called with the signaturedevice(arch), workgroup, worksize
.I can see that the
diffusivity_kernel!
is somehow what actually performs the "correct" signature call in the lineevent = diffusivity_kernel!(κₑ, grid, closure, c, Val(tracer_index), U, dependencies=barrier)
, but I honestly can't understand why that's the case or even how that works.Could someone please shed some light?
CC @glwagner
Beta Was this translation helpful? Give feedback.
All reactions