-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix JIT compilation with TensorFlow >= 2.14.0
The previous check if code is currently being compiled no longer works with new TensorFlow versions because the `Tensor` type is now called `SymbolicTensor`. This change adds a helper function to check if code is being compiled for JAX, TensorFlow or PyTorch. If tf.is_symbolic_tensor() is available, i.e. if the TensorFlow version is high enough, we use this function to check if code is being compiled. To avoid inconsistencies between backends, the check for integration domain values is disabled if code is being compiled with PyTorch even if the check works with PyTorch.
- Loading branch information
Showing
2 changed files
with
73 additions
and
13 deletions.
There are no files selected for viewing
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
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