hi_mpi_vpc_create_chn

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

√

Atlas A3 training products / Atlas A3 inference products

√

Atlas A2 training products / Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

☓

Function

Creates an image processing channel based on the configured channel attributes. The channel ID is user-defined.

Prototype

hi_s32 hi_mpi_vpc_create_chn(hi_vpc_chn chn, const hi_vpc_chn_attr *attr)

Parameters

Parameter

Input/Output

Description

chn

Input

Channel ID for image processing.

Ascend 950PR / Ascend 950DT : The value range of this parameter is [0, 256). The maximum number of channels is 256.

Atlas A3 training products / Atlas A3 inference products : The value range of this parameter is [0, 256). The maximum number of channels is 256.

Atlas A2 training products / Atlas A2 inference products : The value range of this parameter is [0, 256). The maximum number of channels is 256.

Atlas 200I/500 A2 inference products : The value range of this parameter is [0, 128). The maximum number of channels is 128.

Atlas inference products : The value range of this parameter is [0, 256). The maximum number of channels is 256.

attr

Input

Pointer to the attributes of an image processing channel.

Returns

Restrictions

  • The channel ID of a single device must not exceed the maximum channel ID on Atlas inference products . VDEC involves VPC processing behind the scene. VDEC assigns internal VPC channel IDs within [256, 511]. To avoid channel ID conflicts between VPC and VDEC, you are advised to set the user VPC channel IDs within [0, 255].
  • If attr is NULL, the error code HI_ERR_VPC_NULL_PTR is returned.
  • Before this API call, ensure that a channel has not been created yet or has been destroyed. Otherwise, a failure is returned.
  • For Ascend virtual instances, the requirements on the number of channels are as follows:

    Atlas inference products : Number of channels = (Number of allocated VPC hardware units/Number of VPC hardware units) × 256. If the total number of channels is not an integer, round down the value.

    Atlas A2 training products / Atlas A2 inference products : The maximum number of channels is 256.

    Atlas 200I/500 A2 inference products : The maximum number of channels is 128.

    To check the compute resource specifications of the Ascend virtual instances in different scenarios, run the npu-smi info -t template-info command on the server with the AI processor installed.

Reference

For details about the API call sequence and example, see Typical Functions of VPC.