[XLA] Fix dynamic expression edge cases and batch bucketing - #54
Open
stevenvar wants to merge 12 commits into
Open
[XLA] Fix dynamic expression edge cases and batch bucketing#54stevenvar wants to merge 12 commits into
stevenvar wants to merge 12 commits into
Conversation
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 08:21
18b123b to
9ad0149
Compare
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
from
August 18, 2026 09:52
4b41aa2 to
51b14f8
Compare
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 09:52
9ad0149 to
749308d
Compare
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
from
August 18, 2026 09:55
51b14f8 to
4f36467
Compare
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 09:55
749308d to
575bc44
Compare
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
from
August 18, 2026 11:45
4f36467 to
1edf990
Compare
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 11:45
575bc44 to
3d05104
Compare
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
from
August 18, 2026 12:49
1edf990 to
54a0c74
Compare
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 12:52
3d05104 to
41e8ef0
Compare
Update tf2xla kernels to derive and forward symbolic shape and value expressions. Gate symbolic content propagation behind its dedicated configuration flag.
Derive binary-op output expressions from the operand XLA shapes during broadcasting. Preserve the non-singleton expression when an operand expands from a singleton dimension.
Retain symbolic contents when shape-derived operations are rewritten or folded to constants. Add a dedicated rewrite path so optimization does not erase runtime shape dependencies.
Normalize compatible dynamic expressions around their smallest shared variable-covering subexpression before clustering. Reject cluster merges whose dynamic inputs and outputs cannot use one consistent symbolic core.
Map runtime arguments to symbolic cluster inputs, solve their dynamic values, and build padded compilation arguments for cache lookup. Add batch bucketing and runtime boundary tests for dynamic cluster compilation.
Prevent MLIR XLA kernels from silently consuming dynamic expressions they cannot preserve. Keep the existing MLIR path for operations without dynamic expression metadata.
Store the solved dynamic batch value in executable run options and expose it to CPU execution paths. Keep thunk and non-thunk execution consistent at the cluster boundary.
Generate LLVM loop bounds from the runtime batch dimension when an HLO dimension carries a dynamic expression. Add focused coverage for runtime-dependent bounds.
Teach CPU emitters to use runtime dynamic dimensions for affected operations instead of fixed padded extents. Preserve the padded allocation while limiting computation to the real shape.
Make CPU HLO profiling tolerate dynamic execution metadata and missing profile counters. Avoid invalid accesses while retaining profiling for supported instructions.
Add end-to-end coverage for symbolic shape propagation, clustering, compilation, and CPU execution. Exercise representative dynamic models across the complete TensorFlow-to-XLA path.
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
from
August 18, 2026 14:37
54a0c74 to
c3d2540
Compare
stevenvar
force-pushed
the
steven.fix-clean-history-review-findings
branch
from
August 18, 2026 14:38
41e8ef0 to
85612da
Compare
stevenvar
force-pushed
the
steven.for-serving-2.20-clean-history
branch
2 times, most recently
from
August 20, 2026 09:26
edd2ef7 to
e8b6182
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
-1{0 / 0}to{1}Tests
//tensorflow/compiler/jit:xla_batch_matcher_testchecks request-order independence and immutable configured buckets@local_xla//xla:shape_testchecks unknown-expression classification and zero-divisor simplification@local_xla//xla/service/llvm_ir:llvm_util_testchecks that unknown expressions are not emitted as constants