Effect of del
on Unused Parameters in Jitted JAX Functions
#23161
-
Hello, Thank you very much for always providing kind explanations to many questions. While studying the In the example below, it is Does this provide any actual benefit in terms of memory usage? I thought that when a function is jitted, unused parameters might be optimized away or the However, seeing this code pattern used throughout, I am curious whether this actually offers advantages in terms of speed or memory efficiency. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not sure this is the right place to open an optax discussion :D, but... No, this doesn't provide any performance benefits! This pattern is adopted from Google's Python style guide, and it can be useful for making sure that you actually don't use variables, and it can appease the little red squiggles in some editors. |
Beta Was this translation helpful? Give feedback.
I'm not sure this is the right place to open an optax discussion :D, but...
No, this doesn't provide any performance benefits! This pattern is adopted from Google's Python style guide, and it can be useful for making sure that you actually don't use variables, and it can appease the little red squiggles in some editors.