Is The First Execution Slow Always? #2383
Answered
by
jheek
Yuji-github
asked this question in
Q&A
-
I tested the Binary Image classification model on Google Colab by using Flax. My first execution (running the cell for the first time) is always prolonged. Is that because Flax carries all of the data on GPU before the first execution? |
Beta Was this translation helpful? Give feedback.
Answered by
jheek
Aug 8, 2022
Replies: 1 comment
-
Ops and compiled functions (annotated with jax.jit, jax.pmap, ...) are compiled the first time you call them. This is what normally causes the slowdown. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
marcvanzee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ops and compiled functions (annotated with jax.jit, jax.pmap, ...) are compiled the first time you call them. This is what normally causes the slowdown.