Before You Start
The zero-copy function is for trial use and may be changed in later versions. Therefore, it cannot be used in commercial products.
Introduction
In single-operator mode, the input and output buffers of the operator are dynamically adjusted. To avoid memory registration of processes at both ends during each communication, HCCL constructs a transit buffer within the communicator to facilitate collective communication, introducing additional memory copy overhead.
To minimize this memory copy overhead, HCCL supports direct operation on the memory transferred by the service, bypassing the need for a transit buffer. The APIs described in this section enable zero-copy implementations.
General Restrictions
The zero-copy function imposes the following restrictions:
- It is supported only by the
Atlas A3 training product /Atlas A3 inference product . - The related APIs can be called only by the backend code of the Ascend Extension for PyTorch plugin.
- Communication operators can be expanded only on AICPU.
- Only the collective communication operators AllGather, ReduceScatter, Broadcast, and AllReduce are supported. When the zero-copy function is enabled for the ReduceScatter and AllReduce operators, the input user memory will be modified.
- The input and output memories of an operator must be active memories.
- When the zero-copy function is enabled, you are advised to use a large-scale communicator (supporting the maximum number of devices) to set and activate the virtual address. In this communicator, zero-copy is implemented when all processes call the collective communication operator. (Zero-copy cannot be implemented in a communicator where the virtual address is not set or activated.)
Parent topic: Zero-Copy