[xla:ffi] Change scalar attributes ABI and annotate error handling branches with XLA_FFI_PREDICT_FALSE #64417
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.
[xla:ffi] Change scalar attributes ABI and annotate error handling branches with XLA_FFI_PREDICT_FALSE
In preparation for adding dense array attributes change scalar attributes ABI for consistency
Small regression in decoding attributes because of one extra branch.
name old cpu/op new cpu/op delta
BM_BufferBaseArgX1 9.51ns ± 5% 9.10ns ± 5% -4.29% (p=0.000 n=20+18)
BM_BufferBaseArgX4 17.4ns ± 7% 16.3ns ± 7% -6.15% (p=0.000 n=19+20)
BM_BufferArgX1 10.8ns ±11% 11.4ns ±15% +5.86% (p=0.010 n=20+20)
BM_BufferArgX4 19.3ns ± 8% 18.5ns ± 4% -3.99% (p=0.000 n=20+20)
BM_TupleOfI32Attrs 56.5ns ± 3% 60.9ns ± 3% +7.90% (p=0.000 n=20+20)
BM_BufferArgX1 regression looks like noise