hi_mpi_pngd_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 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Creates a decoding channel based on the configured channel attributes.

Prototype

hi_s32 hi_mpi_pngd_create_chn(hi_pngd_chn chn, const hi_pngd_chn_attr *attr)

Parameters

Parameter

Input/Output

Description

chn

Input

Decoding channel ID.

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

attr

Input

Pointer to the decoding channel attributes.

Returns

Restrictions

  • The channel ID of a single device must not be greater than the maximum channel ID.
  • If the attr parameter is 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 OS memory is insufficient, the error code HI_ERR_PNGD_NO_MEM is returned. In this case, you can expand the OS memory.
  • 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.
  • In the Ascend virtual instance scenario, the number of channels must meet the following requirements:

    In the Atlas inference product and Ascend virtual instance scenarios, the restrictions on the number of channels vary depending on the Ascend virtual instance template.

    • 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.

    In the Atlas A2 training product / Atlas A2 inference product and Ascend virtual instance scenarios, the restrictions on the number of channels vary depending on the Ascend virtual instance template.

    • When the vir12_4c_32g_m, vir10_4c_16g_m, or vir10_4c_32g_m template 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.

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

See Also

For details about the API call sequence and examples, see PNGD.