-
I am just wondering that the jitted function contains side effect when we use "with sharding constrint" function in their implementation. I think there needs some process for sharding external source such as static_argname for static values in jit. Is there any resources to handle this topic? My code is somehow this one.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm not entirely sure I understand the question, but you'll need to mark |
Beta Was this translation helpful? Give feedback.
I'm not entirely sure I understand the question, but you'll need to mark
Mesh
arguments as static within JIT-compiled functions, because non-static arguments must either be arrays or pytrees of arrays. So your second example (withstatic_argnames=['mesh']
) is probably the way to go.