[pull] master from tensorflow:master#387
Merged
pull[bot] merged 6 commits intoSystemmatrix555:masterfrom May 26, 2025
Merged
Conversation
Move a bit of logic to LaunchTypedKernel to make function arguments simpler. PiperOrigin-RevId: 763377863
while symbol replacements were correct, OptimizeRTVar did not correctly update the value ranges, e.g. for HLO in test
```
p1 = s64[] parameter(1)
c42 = s64[] constant(42)
add = s64[] add(c42, p1)
ROOT dynamic-slice = s32[10] dynamic-slice(s32[4096] p0, s64[] add),
dynamic_slice_sizes={10}
```
the indexing map of the dynamic slice operand p0 `(d0){rt0} -> (d0 + rt0)` was replaced with `(d0){rt0} -> (d0 + rt0 + 42)` with rt0 now pointing to the p1.
But the range of were rt0 kept [0, 4086] instead of [-42, 4044].
Also we didn't check if a constant value satisfies constraints. So for HLO
```
p0 = s32[100] parameter(0)
offset = s64[] constant(99)
ROOT dynamic-slice = s32[10]
dynamic-slice(p0, offset), dynamic_slice_sizes={10}
```
indexing of p0 became (d0) -> (d0 + 99) without any additional constrains.
Now we keep such constants as a variable to postpone the handling until runtime.
We might want to make OptimizeRTVar handle more cases (again) later but that would require updating value ranges.
PiperOrigin-RevId: 763379261
PiperOrigin-RevId: 763380969
PiperOrigin-RevId: 763398066
This reduces the memory usage by 1kb per delegated elementwise quantized op PiperOrigin-RevId: 763405481
PiperOrigin-RevId: 763448848
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )