Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xla:ffi] Change scalar attributes ABI and annotate error handling branches with XLA_FFI_PREDICT_FALSE #64417

Merged
merged 1 commit into from Mar 25, 2024

Conversation

copybara-service[bot]
Copy link

[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

…anches 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

PiperOrigin-RevId: 618857817
@copybara-service copybara-service bot merged commit 7641498 into master Mar 25, 2024
@copybara-service copybara-service bot deleted the exported_pr_618661565 branch March 25, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant