---
title: save_to_air
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0728.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0728.html
indexId: e38d6db46542a99780c9a44073f9c9d803b3bfe24cac785d93b7bb0c4041598072
---
# save_to_air

#### 产品支持情况

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


#### 功能说明

将图保存为air格式。


#### 函数原型

```
save_to_air(file_path: str) -> None
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| file\_path | 输入 | 保存air文件的路径，string类型。 |


#### 返回值说明

无


#### 约束说明

- 如果file_path不是字符串，抛出TypeError。
- 如果保存失败，抛出RuntimeError。
