Overview

StorageFormat is a class for managing the operator data storage format. It is used to express the tensor format and record the dimension expansion rules for format conversion. This class stores the following information:

  • Original format: original format of the tensor input.
  • Runtime format: format used during computation.
  • Dimension expansion rule: record the shape dimension expansion rule when the original format is converted to the runtime format.

Header Files to Be Included

1
#include <storage_format.h>

Public Member Functions

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