|
5 | 5 | ************************************************************************/ |
6 | 6 |
|
7 | 7 | /*! \file nccl_comm.h |
8 | | - * \brief NCCL-backed peer-handle setter/getter for NVTETensor. |
| 8 | + * \brief Attach a registered NCCL symmetric-memory window to an NVTETensor. |
9 | 9 | * |
10 | | - * Attaches a registered NCCL symmetric-memory window + byte offset onto a |
11 | | - * tensor so consumers (e.g. the EP backend) can issue one-sided put/get over |
12 | | - * the window instead of staging through the raw data pointer. The window is |
13 | | - * caller-owned; ``attach`` does not register or rendezvous it. |
| 10 | + * The window is caller-owned and must outlive the tensor; ``attach`` does |
| 11 | + * not register or rendezvous it. |
14 | 12 | */ |
15 | 13 |
|
16 | 14 | #ifndef TRANSFORMER_ENGINE_NCCL_COMM_H_ |
|
23 | 21 | extern "C" { |
24 | 22 | #endif |
25 | 23 |
|
26 | | -/*! \brief Attach an NCCL window + byte offset to ``t``. |
27 | | - * |
28 | | - * Sets the tensor's peer-handle kind to ``NVTE_PEER_HANDLE_NCCL_WINDOW``. The |
29 | | - * window must stay registered for the tensor's lifetime. Pass ``window=NULL`` |
30 | | - * to detach (equivalent to ``nvte_tensor_detach_peer_handle``). |
| 24 | +/*! \brief Attach an NCCL window + byte offset to ``t``. Pass ``window=NULL`` to detach. |
31 | 25 | * |
32 | 26 | * \param[in,out] t Tensor to annotate. |
33 | 27 | * \param[in] window Opaque ncclWindow_t (caller-owned), or NULL to clear. |
34 | 28 | * \param[in] offset Byte offset into the window where this tensor starts. |
35 | 29 | */ |
36 | 30 | void nvte_tensor_attach_nccl_window(NVTETensor t, void* window, uint64_t offset); |
37 | 31 |
|
38 | | -/*! \brief Read the NCCL window + offset attached to ``t``. |
39 | | - * |
40 | | - * ``*window`` is set to ``NULL`` and ``*offset`` to 0 when no NCCL window is |
41 | | - * attached (including when the tensor carries a different peer-handle kind). |
42 | | - * Either out-pointer may be ``NULL`` to skip that field. |
| 32 | +/*! \brief Read the NCCL window + offset attached to ``t``; yields (NULL, 0) when unset. |
| 33 | + * Either out-pointer may be NULL to skip that field. |
43 | 34 | */ |
44 | 35 | void nvte_tensor_nccl_window(const NVTETensor t, void** window, uint64_t* offset); |
45 | 36 |
|
|
0 commit comments