获取aclTensor的StorageShape属性。
OriginShape表示aclTensor在经历transdata节点前(如果存在该节点)的原始shape信息,即tensor的shape数学描述。
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(); } |