-
I know that if a function uses some global variable, jit won't throw an error, it would treat it as a side-effect instead. For example,
This code will output
since the side effect will only be executed once. However, I found things being different when jitting member functions of
My question is:
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
NNX will recognize NNX types ( |
Beta Was this translation helpful? Give feedback.
NNX will recognize NNX types (
Module
,Variable
, etc) and pytree types (e.g.list
,tuple
,dict
, etc) as nodes, and will treat any other type as static. If you change the value of static attributesjit
will see this and recompile. This means you can safely use conditionals of static values.