---
title: SetStorageFormat
description: "设置运行时format。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00167.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00167.html
indexId: cfd31d8a93baffc732a65c18ba6affd574992e756304fe9f52946d9a887795bb78
---
# SetStorageFormat

#### 函数功能

设置运行时format。


#### 函数原型

```
void SetStorageFormat(const ge::Format storage_format)
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| storage\_format | 输入 | 运行时format。 |


#### 返回值说明

无。


#### 约束说明

无。


#### 调用示例

```
ExpandDimsType dim_type("1100");
StorageFormat format(ge::Format::FORMAT_NCHW, ge::Format::FORMAT_C1HWNC0, dim_type);
format.SetStorageFormat(ge::Format::FORMAT_NC);
```
