RegisterMem

Applicability

Product

Supported (√/x)

Atlas 350 Accelerator Card

x

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Note: For Atlas A2 training product / Atlas A2 inference product , only the Atlas 800I A2 inference server and A200I A2 Box heterogeneous subrack are supported.

Function Description

Registers a memory address for use by TransferSync in subsequent calls. The local and remote memory addresses specified in TransferSync can be a subset of the registered addresses. Local memory addresses must be registered with the local AdxlEngine instance, and remote memory addresses must be registered with the remote AdxlEngine instance.

Prototype

1
Status RegisterMem(const MemDesc &mem, MemType type, MemHandle &mem_handle)

Parameters

Parameter

Input/Output

Description

mem

Input

Description of the memory to be registered. The type is MemDesc.

type

Input

Type of the memory to be registered. The type is MemType.

mem_handle

Output

Memory handle returned after successful registration, which can be used for memory deregistration. The type is MemHandle.

Example

Click Gitee, download the sample package of the matching version based on the tag name, and obtain the sample from the cplusplus/level1_single_api/12_adxl directory.

Returns

  • SUCCESS: Success.
  • PARAM_INVALID: Incorrect parameter.
  • Other values: Failure.

Exception Handling

None

Restrictions