昇腾社区首页
中文
注册
开发者
下载

GetStorageShape

功能说明

获取aclTensor的StorageShape属性。

StorageShape表示aclTensor在内存上的实际排布,即OriginShape实际运行时的shape格式。

函数原型

gert::Shape GetStorageShape()

参数说明

返回值说明

返回值为gert::Shape,记录了一组shape信息,例如一个三维shape:[10, 20, 30]。

约束说明

调用示例

1
2
3
void Func(const aclTensor *input) {
    auto shape = input->GetStorageShape();
}