hi_mpi_vb_get_block

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

Function Description

Call this API to obtain the memory block.

Prototype

hi_vb_blk hi_mpi_vb_get_block(hi_vb_pool pool, hi_u64 blk_size, const hi_char *mmz_name)

Parameters

Parameter

Input/Output

Description

pool

Input

Memory pool ID, which is returned by the hi_mpi_vb_create_pool API.

blk_size

Input

Size of the memory block.

mmz_name

Input

Memory pool name. When pool is set to -1, the memory block can be obtained based on the memory pool name.

Returns

  • Returns the memory block handle if the call is successful.
  • Returns HI_VB_INVALID_HANDLE that indicates an invalid memory block handle if the call fails.