pngd_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 training products

x

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Creates a decoding channel based on the configured channel attributes.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_pngd_create_chn(hi_pngd_chn chn, const hi_pngd_chn_attr *attr)
    
  • Python Function
    1
    ret = acl.himpi.pngd_create_chn(chn, attr)
    

Parameters

Parameter

Description

chn

Int, decoding channel ID.

The value range of this parameter is [0, 128). The maximum number of channels is 128.

NOTE:

For the Ascend virtual instances on Atlas inference products, different instance profiles impose different restrictions on the number of channels:

  • When the vir04_4c_dvpp template is used, the total number of channels is fixed at 128.
  • When the vir04_3c_ndvpp template is used, the DVPP function is not used. Therefore, the total number of channels is 0.
  • When other templates are used, Total number of channels = Allocation specification x 128. If the total number of channels is not an integer, round down the value.

For the Ascend virtual instances on Atlas A2 training products/Atlas A2 inference products, different instance profiles impose different restrictions on the number of channels:

  • When the vir12_3c_32g_m, vir10_3c_16g_m or vir10_3c_32g_m profile is used, the total number of channels is fixed to 128.
  • When the vir12_3c_32g_nm, vir10_3c_16g_nm or vir10_3c_32g_nm template is used, the DVPP function is not used. Therefore, the total number of channels is 0.
  • When other templates are used, Total number of channels = Allocation specification x 128. If the total number of channels is not an integer, round down the value.

To view the compute specifications of Ascend virtual instances in different use cases, run npu-smi info -t template-info on the server where the AI processor is installed.

attr

Dict, dictionary of the decoding channel attributes. For details, see hi_pngd_chn_attr.

Return Value

Return Value

Description

ret

Int, error code.

Restrictions

  • The channel ID of a single device cannot exceed the maximum channel ID.
  • If attr is left empty, the error code HI_ERR_PNGD_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.
  • If the system memory is insufficient, the error code HI_ERR_PNGD_NO_MEM is returned. In this case, you can expand the OS memory as needed.
  • When a setting in the channel attributes pointed by attr exceeds the decoding capability set, the error code HI_ERR_PNGD_ILLEGAL_PARAM is returned.

Reference

For the API call sequence, see Functions and Restrictions.