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

#### 产品支持情况

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


#### 功能说明

运行图。


#### 函数原型

```
run_graph(graph_id: int, inputs: List[Tensor]) -> List[Tensor]
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| graph\_id | 输入 | 图ID。 |
| inputs | 输入 | 输入张量列表。 |


#### 返回值说明

(List[Tensor])输出张量列表。


#### 约束说明

- 如果graph_id不是整数，抛出TypeError。
- 如果inputs中有元素不是Tensor类型，抛出TypeError。
- 如果运行失败，抛出RuntimeError。
