Created
November 7, 2018 01:19
-
-
Save jlebar/797acbd6ce476ed35da4e976cb54e516 to your computer and use it in GitHub Desktop.
Example of switching xla.compile on or off via a flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if should_use_xla(): | |
result = xla.compile(model_fn, (x, y, z))[0] | |
else: | |
result = model_fn(x, y, z) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment