---
title: 函数：get_aipp_data_size
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclpythondevg_01_0992.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_0992.html
indexId: ed22caf75b24cb1ed8e5e11857cd529517550f5119b9e8a597b6fd3766338dbc75
---
# 函数：get_aipp_data_size

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | x |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

根据batch_size获取动态AIPP输入数据所需的内存大小。


#### 函数原型

- C函数原型
  1 aclError aclmdlGetAippDataSize(uint64_t batchSize, size_t *size)

- python函数
  1 mem_size, ret = acl.mdl.get_aipp_data_size(batch_size)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| batch\_size | int，原始模型的batch size。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| mem\_size | int，内存大小，单位Byte。 |
| ret | int，错误码 返回0表示成功。 返回其它值(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/runtimeapi/aclpythondevg\_01\_0911.html)表示失败。 |
