Open copybara-service[bot] opened 5 days ago
[XLA:FFI] Reduce the cost of FFI CallFrame creation and destruction.
This change reduces the cost of custom calls that involve a large number of argument and return buffers.
Call std::vector::reserve before populating the arguments and returns list.
std::vector::reserve
Eliminate the copying of dims vectors from CallFrameBuilder::Buffer into CallFrame::Buffer.
CallFrameBuilder::Buffer
CallFrame::Buffer
Reverts 1c6f26d131e34957e20d5ab7582f34597341f6d3
[XLA:FFI] Reduce the cost of FFI CallFrame creation and destruction.
This change reduces the cost of custom calls that involve a large number of argument and return buffers.
Call
std::vector::reserve
before populating the arguments and returns list.Eliminate the copying of dims vectors from
CallFrameBuilder::Buffer
intoCallFrame::Buffer
.Reverts 1c6f26d131e34957e20d5ab7582f34597341f6d3