[pull] master from tensorflow:master - #8807
Merged
Merged
Conversation
ExecuteTensorListGetItem sliced one element out of the list buffer unconditionally, so a list whose leading dimension is statically zero failed XLA compile-time shape inference with the error Slice dim size 1 greater than dynamic slice dimension: 0. Such reads only appear in code that never runs, most commonly the body of a while loop with a zero trip count, which XLA compiles anyway: tf.map_fn over a zero-length tensor under jit_compile=True failed to compile even though the loop never executes. Return zeros of the element shape for a read from a statically empty list, mirroring how ExecuteTensorListSetItem already ignores writes that cannot fit the list. The regression tests cover the direct read from a reserved zero-length list and the end to end map_fn case. Fixes #109648
Running map_fn directly inside test_scope only XLA-compiles the loop body, so the surrounding TensorListFromTensor and TensorListStack ran at the session boundary and failed with a TensorList crossing the XLA/TF boundary error. Wrap the function in def_function.function with jit_compile=True so the whole computation compiles under XLA and the test exercises the empty-list read path end to end.
…read PiperOrigin-RevId: 976447081
…ction*` dereferences during latency hiding scheduling. PiperOrigin-RevId: 976480675
dangling work. PiperOrigin-RevId: 976500787
`NSInvalidArgumentException` if given a nil, empty, or dangling path due to Swift Foundation string bridging. In the CoreML delegate, `mlModelFilePath` and `compiledModelFilePath` lacked property memory management attributes (defaulting to assign, leading to dangling pointers after autorelease pool drains), and any thrown exception inside `~CoreMlDelegateKernel()` caused an immediate `std::terminate()`. Fixes: - Used `property(nonatomic, copy)` for file path properties in `CoreMlExecutor`. - Guarded `cleanup` by checking string length and file existence before removing files. - Set `self.mlModelFilePath` early in `saveModel:` to avoid leaking temp files if compilation fails. - Wrapped `[executor_ cleanup]` in a `try`/`catch` block inside `~CoreMlDelegateKernel()` and logged errors via `TFLITE_LOG_PROD`. PiperOrigin-RevId: 976502893
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )