IFRT proxy: asynchronous and faster MakeArrayFromHostBuffer
#19407
+765
−252
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.
IFRT proxy: asynchronous and faster
MakeArrayFromHostBuffer
Note: I use the term 'control path' to refer to everything except
HostBufferStore.Store()
andHostBufferStore.Lookup()
operations.This CL improves performance with the following changes:
MakeArrayFromHostBufferRequest
(instead of the server generating them) and returns to the caller immediately after sending the request. Since ordering is maintained for control path requests across the proxy, future operations on the array do not require any special handling.HostBufferStoreRequest
that corresponds to aMakeArrayFromHostBufferRequest
is not ordered by the client (before or after) theMakeArrayFromHostBufferRequest
. On the server-side, the loop that handles control path requests, when it sees aMakeArrayFromHostBufferRequest
, blocks until the correspondingHostBufferStoreRequest
is processed.HostBufferStore
implementation) and control path now use different gRPC channels.stream.Write()
latency. BM_HostToDeviceAsync/1K/98k (~4MB/s) was already bottlenecked by gRPCstream.Write()
latency.This CL also:
global_flags.h
andglobal_flags_google.cc
so we can conveniently use command-line flags in the proxy-client. This may not be ideal from a clean-code perspective, but makes it much easier to develop and debug the client.