Timing difference between mx.eval and mx.async_eval #1571
Unanswered
sck-at-ucy
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The time difference is mostly due to the fact that there is no warmup. The first time you call a compiled function it gets compiled, which will make it slower. After that, the function will be a lot faster. Also I strongly recommend measuring more than one call to the function to reduce the variance. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ok, continuing from the X discussion. I know I must be doing something wrong here, but I just don't see it. Here is the code that produces the large timing difference:
When I run this I get:
Beta Was this translation helpful? Give feedback.
All reactions