Skip to content

Instantly share code, notes, and snippets.

@carlthome
Last active October 11, 2022 16:14
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save carlthome/6ae8a570e21069c60708017e3f96c9fd to your computer and use it in GitHub Desktop.
Save carlthome/6ae8a570e21069c60708017e3f96c9fd to your computer and use it in GitHub Desktop.
Example of how to use XLA AOT via tfcompile to build a Keras model into a shared library.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reza-ebrahimi
Copy link

Model => 150 ms ± 199 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
XLA binary => 191 ms ± 604 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

Why XLA compiled binary is slower than the model itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment