vpc_create_chn

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

x

Atlas inference product

Atlas 200I/500 A2 inference product

Description

Creates an image processing channel based on the configured channel attributes. The channel ID is specified by the user.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_vpc_create_chn(hi_vpc_chn chn, const hi_vpc_chn_attr *attr);
    
  • Python Function
    1
    ret = acl.himpi.vpc_create_chn(chn, attr)
    

Parameters

Parameter

Description

chn

Int, channel ID for image processing.
  • Atlas 350 Accelerator Card: The value range is [0, 256). The maximum number of channels is 25.
  • Atlas inference product : The value range is [0, 256). The maximum number of channels is 256.
  • Atlas A2 training product / Atlas A2 inference product : The value range is [0, 256). The maximum number of channels is 256.
  • Atlas 200I/500 A2 inference product : The value range is [0, 128). The maximum number of channels is 128.
  • Atlas A3 training product / Atlas A3 inference product : The value range is [0, 256). The maximum number of channels is 256.
NOTE:

For the Atlas inference product , in the Ascend virtual instance scenario, the number of channels is calculated as follows: Number of channels = (Number of allocated VPC hardware units/Total number of VPC hardware units) x 256. If the total number of channels is not an integer, round down the value.

For the Atlas A2 training product / Atlas A2 inference product , in the Ascend virtual instance scenario, the maximum number of channels is 256.

For the Atlas 200I/500 A2 inference product , in the Ascend virtual instance scenario, the maximum number of channels is 128.

To view the computing power specifications of Ascend virtual instances in different scenarios, run the npu-smi info -t template-info command on the server where the AI processor is installed.

attr

Dict, dictionary of the attributes of an image processing channel. For details, see hi_vpc_chn_attr.

Return Value

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Restrictions

  • The channel ID of a single device must not be greater than the maximum channel ID on the Atlas inference product . When the VPC (used internally) or VDEC function is used, the VPC channel ID is occupied. To prevent the conflict between the VPC channel IDs and the VDEC channel IDs, the value range of the VPC channel ID is [0, 255]. When the VDEC function is used, the VPC channel ID range used in the VDEC is [256, 511].
  • If attr is left empty, 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.

Reference

For details about the API call sequence, see Typical API Call Sequence (Image Resizing).