hi_mpi_vpc_create_chn
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
☓ |
Function Description
Creates an image processing channel based on the configured channel attributes. The channel ID is specified by the user.
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. Atlas 350 Accelerator Card: The value range is [0, 256). The maximum number of channels is 256. |
|
attr |
Input |
Pointer to the attributes of an image processing channel. |
Returns
- 0: success
- Other values: failure. For details, see VPC Return Codes.
Restrictions
- The channel ID of a single device cannot be greater than the maximum channel ID of
Atlas inference product . 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 the attr parameter is 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.
- In the Ascend virtual instance scenario, the number of channels must meet the following requirements:
In the Ascend virtual instance scenario, the total number of channels is calculated as follows: 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.
In the Ascend virtual instance scenario, the total number of channels cannot exceed 256.
In the Ascend virtual instance scenario, the total number of channels cannot exceed 128.
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.