vpc_create_chn

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

x

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

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

Atlas training products : This API is reserved in the current version.

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)
    

Parameter Description

Parameter

Description

chn

Int, channel ID for image processing.
  • Atlas 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 A3 training products / Atlas A3 inference products : The value range of this parameter is [0, 256). The maximum number of channels is 256.
NOTE:

For Ascend virtual instances on the Atlas inference products : Total number of channels = (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 Ascend virtual instances on the Atlas A2 training products / Atlas A2 inference products : The maximum number of channels is 256.

For Ascend virtual instances on the Atlas 200I/500 A2 inference products : The maximum number of channels is 128.

You can run the npu-smi info -t template-info command on the server where Ascend AI Processor is installed to view the computing power specifications of the Ascend virtual instance in each scenario.

attr

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

Return Value Description

Return Value

Description

ret

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

Restrictions

  • The channel ID of a single device must not exceed the maximum channel ID on Atlas inference products . 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 the API call sequence, see Typical API Call Sequence (Image Resizing).