openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.41k stars 361 forks source link

[xla:ffi] NFC: Use statically known buffer rank to compute size in bytes #14311

Closed copybara-service[bot] closed 6 days ago

copybara-service[bot] commented 1 week ago

[xla:ffi] NFC: Use statically known buffer rank to compute size in bytes

name old cpu/op new cpu/op delta BM_AnyBufferArgX1 20.8ns ± 5% 20.5ns ± 6% -1.45% (p=0.024 n=39+40) BM_AnyBufferArgX4 52.4ns ± 3% 52.4ns ± 2% ~ (p=0.983 n=39+36) BM_BufferArgX1 16.5ns ± 3% 15.5ns ± 6% -6.32% (p=0.000 n=38+40) BM_BufferArgX4 35.6ns ± 3% 26.8ns ± 4% -24.72% (p=0.000 n=38+37) BM_BufferArgX8 68.0ns ± 3% 52.0ns ± 5% -23.54% (p=0.000 n=38+40) BM_TupleOfI32Attrs 67.8ns ± 2% 67.6ns ± 2% ~ (p=0.218 n=37+39)