简介
StorageFormat是算子数据存储格式管理类,用于表达张量格式、记录不同格式的转换补维规则。该类主要存储:
- 原始格式(Format):张量输入时的原始格式;
- 运行时格式(StorageFormat):计算过程中实际使用的格式;
- 补维规则(ExpandDimsType):记录原始格式向运行时格式转换时,Shape维度扩展规则。
需要包含的头文件
1 | #include <storage_format.h> |
Public成员函数
StorageFormat() StorageFormat(const ge::Format origin_format, const ge::Format storage_format, const ExpandDimsType &expand_dims_type) ge::Format GetOriginFormat() const void GetOriginFormat(const ge::Format origin_format) ge::Format GetStorageFormat() const void GetStorageFormat(const ge::Format storage_format) ExpandDimsType GetExpandDimsType() const void SetExpandDimsType(const ExpandDimsType &expand_dims_type) ExpandDimsType &MutableExpandDimsType() bool operator==(const StorageFormat &other) const bool operator!=(const StorageFormat &other) const
父主题: StorageFormat