Creating computational graph using an array Bools #21869
-
Hi all, I would like to implement a PDE solver with complicated boundary conditions. To do that, I want to use an array of bools to define computational graph rather than using
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no avoiding the tracing of all branches if you want to JIT-compile your branching logic. If you use |
Beta Was this translation helpful? Give feedback.
There is no avoiding the tracing of all branches if you want to JIT-compile your branching logic.
If you use
lax.switch
and don't usevmap
, then only one branch will be executed at runtime. But if tracing only a single branch is your concern, then you have to do the branching outside JIT.