Skip to content

[pull] master from tensorflow:master - #8807

Merged
pull[bot] merged 6 commits into
Cache-Cloud:masterfrom
tensorflow:master
Sep 6, 2026
Merged

[pull] master from tensorflow:master#8807
pull[bot] merged 6 commits into
Cache-Cloud:masterfrom
tensorflow:master

Conversation

@pull

@pull pull Bot commented Sep 6, 2026

Copy link
Copy Markdown

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 : )

vishwakt and others added 6 commits September 2, 2026 10:45
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.
…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
@pull pull Bot locked and limited conversation to collaborators Sep 6, 2026
@pull pull Bot added the ⤵️ pull label Sep 6, 2026
@pull
pull Bot merged commit 99b41e2 into Cache-Cloud:master Sep 6, 2026
1 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants