HcclCommSetMemoryRange

This API is for trial use and may be changed in later versions. Therefore, it cannot be used in commercial products.

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

For Atlas A2 training product / Atlas A2 inference product , only the Atlas 800T A2 training server, Atlas 900 A2 PoD cluster basic unit, and Atlas 200T A2 Box16 heterogeneous subrack are supported.

Function

Notifies HCCL of the reserved virtual memory address after virtual memory is successfully allocated using the aclrtReserveMemAddress API. After this API is called, the virtual memory is accessible to all communicators within the current process.

Prototype

1
HcclResult HcclCommSetMemoryRange(HcclComm comm, void *baseVirPtr, size_t size, size_t alignment, uint64_t flags)

Parameters

Parameter

Input/Output

Description

comm

Input

HCCL communicator. You are advised to use the largest-scale communicator within the server, that is, the communicator that covers the maximum number of devices.

baseVirPtr

Input

Base address of the virtual memory to be reserved, that is, the virtual memory address output by the aclrtReserveMemAddress API.

size

Input

Virtual memory size, in bytes.

alignment

Input

Reserved field.

Currently, only the value 0 is supported.

flags

Input

Reserved field.

Currently, only the value 0 is supported.

Returns

HcclResult: HCCL_SUCCESS on success, or else failure.

Constraints

  • Calling this API for the first time within a communicator triggers link establishment. To ensure successful link establishment and prevent timeout errors, it is imperative that all processes within the communicator call this API simultaneously during the initial call. This constraint does not apply to subsequent calls of this API.
  • This API can be called only in a single-server communicator. Otherwise, an error is reported.
  • When this API is called for multiple times, the input memory addresses must be unique and do not overlap.
  • For details about other constraints, see General Restrictions.