---
title: acl.himpi.vpc_create_chn
description: "| c函数原型 | hi\\_s32 hi\\_mpi\\_vpc\\_create\\_chn(hi\\_vpc\\_chn chn, const hi\\_vpc\\_chn\\_attr \\*attr); |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0419.html"
---

# acl.himpi.vpc_create_chn

| c函数原型 | hi\_s32 hi\_mpi\_vpc\_create\_chn(hi\_vpc\_chn chn, const hi\_vpc\_chn\_attr \*attr); |
| --- | --- |
| Python函数 | ret = acl.himpi.vpc\_create\_chn(chn, attr) |
| 函数功能 | 根据设置的通道属性创建图像处理通道，由用户指定通道号。 |
| 输入说明 | chn：int，图片处理通道号。 Atlas 200/500 A2推理产品，该参数的取值范围：[0, 128)，通道总数最多128。 说明： 对于Atlas 200/500 A2推理产品，昇腾虚拟化实例（Ascend Virtual Instance）场景下，通道总数最多128。 attr：图片处理通道属性字典，具体请参见hi\_vpc\_chn\_attr。 |
| 返回值说明 | ret：int，错误码。 返回0，表示成功。 返回非0，表示失败，参见VPC图像处理返回码。 |
| 约束说明 | 如果参数attr为空，会返回错误码HI\_ERR\_VPC\_NULL\_PTR。 在创建图像处理通道之前必须保证通道未创建（或者已经销毁），否则会直接返回失败。 |
