HcclCommActivateCommMemory

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

Activates the reserved virtual memory. Zero-copy can be enabled only when the activated memory is used as the input and output of a communication operator.

Prototype

1
HcclResult HcclCommActivateCommMemory(HcclComm comm, void *virPtr, size_t size, size_t offset, aclrtDrvMemHandle handle, 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.

virPtr

Input

Address of the virtual memory to be activated, that is, the target virtual memory address for mapping when you call aclrtMapMem to map the physical memory to the virtual memory.

size

Input

Size of the memory to be activated, in bytes.

offset

Input

Reserved field.

Currently, only the value 0 is supported.

handle

Input

Handle of the allocated physical memory, that is, the handle of a device's physical memory allocated by calling aclrtMallocPhysical.

flags

Input

Reserved field.

Currently, only the value 0 is supported.

Returns

HcclResult: HCCL_SUCCESS on success, or else failure.

Constraints

  • The address of the virtual memory to be activated must be within the address range set in HcclCommSetMemoryRange.
  • The virtual memory address cannot overlap with the address of the activated virtual memory.