From a0040f0412bd320b08ae0873fce7de54f476bed7 Mon Sep 17 00:00:00 2001 From: Ce Zheng Date: Wed, 18 Sep 2024 18:15:29 -0700 Subject: [PATCH] [PJRT] Update stale comments. PiperOrigin-RevId: 676206948 --- third_party/xla/xla/pjrt/pjrt_client.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/third_party/xla/xla/pjrt/pjrt_client.h b/third_party/xla/xla/pjrt/pjrt_client.h index 886136bcbc3609..c278332dd74f8f 100644 --- a/third_party/xla/xla/pjrt/pjrt_client.h +++ b/third_party/xla/xla/pjrt/pjrt_client.h @@ -675,12 +675,18 @@ class PjRtClient { // buffers' definition events will automatically become ready, unblocking // downstream consumers of the buffers. // - // A single call to CreateBuffersForAsyncHostToDevice creates a "batch" of - // buffers that share a single definition event, which may amortize some - // performance overheads, but means that none of the buffers are available to - // downstream consumers until all the transfers have completed. Multiple calls - // to CreateBuffersForAsyncHostToDevice should be made if it is desirable for - // buffers to become available as soon as transfers into them complete. + // Depending on the backend's implementation, a single call to + // CreateBuffersForAsyncHostToDevice may either: + // - Create a "batch" of buffers that share a single definition event, which + // may amortize some performance overheads, but means that none of the + // buffers are available to downstream consumers until all the transfers + // have completed, in which case multiple calls to + // CreateBuffersForAsyncHostToDevice should be made if it is desirable for + // buffers to become available as soon as transfers into them complete. + // + // - Create a "batch" of buffers with multiple underlying definitions + // events, and individual buffers become available to downstream consumers + // as soon as transfers into them complete. // Helper class to all clients to asynchronously transfer data into buffers // that are created uninitialized, see comments immediately above.