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

#### 产品支持情况

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


#### 功能说明

将图导出到字符串流。


#### 函数原型

```
dump_to_stream(format: DumpFormat = DumpFormat.kReadable) -> str
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| format | 输入 | 导出格式，默认为kReadable。 |


#### 返回值说明

图的字符串表示，string类型。


#### 约束说明

- 如果format不是有效的DumpFormat，抛出TypeError。
- 如果导出失败，抛出RuntimeError。
