|
|
|
@@ -114,7 +114,6 @@ Status TransShapeToFzWithGroups(int64_t n, int64_t c, int64_t h, int64_t w, Data |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Status TransShapeNchwToFz(const std::vector<int64_t> &src_shape, DataType data_type, std::vector<int64_t> &dst_shape) { |
|
|
|
if (!CheckShapeValid(src_shape, kNchwDimsNum)) { |
|
|
|
return ACL_ERROR_GE_TRANSSHAPE_SHAPE_INVALID; |
|
|
|
@@ -140,7 +139,7 @@ Status TransShapeHwcnToFz(const std::vector<int64_t> &src_shape, DataType data_t |
|
|
|
return TransShapeToFz(n, c, h, w, data_type, dst_shape); |
|
|
|
} |
|
|
|
|
|
|
|
TransShapeHwcnToFzWithGroups(const std::vector<int64_t> &src_shape, DataType data_type, std::vector<int64_t> &dst_shape |
|
|
|
Status TransShapeHwcnToFzWithGroups(const std::vector<int64_t> &src_shape, DataType data_type, std::vector<int64_t> &dst_shape |
|
|
|
, int64_t groups){ |
|
|
|
if (!CheckShapeValid(src_shape, kHwcnDimsNum)) { |
|
|
|
return ACL_ERROR_GE_TRANSSHAPE_SHAPE_INVALID; |
|
|
|
@@ -326,6 +325,7 @@ Status TransFormatHwcnToFzWithGroups(const TransArgs &args, TransResult &result, |
|
|
|
} |
|
|
|
result.data = dst; |
|
|
|
result.length = static_cast<size_t>(size_output_data); |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
Status TransFormatHwcnToFz(const TransArgs &args, TransResult &result) { |
|
|
|
int64_t h = args.src_shape[kHwcnH]; |
|
|
|
@@ -528,12 +528,8 @@ Status FormatTransferFractalZ::TransShape(Format src_format, const std::vector<i |
|
|
|
if (CheckDataTypeSupport(data_type) != SUCCESS) { |
|
|
|
return ACL_ERROR_GE_TRANSSHAPE_DATATYPE_INVALID; |
|
|
|
} |
|
|
|
|
|
|
|
if (src_format == FORMAT_HWCN && dst_format == FORMAT_FRACTAL_Z) { |
|
|
|
return TransShapeHwcnToFzWithGroups(src_shape, data_type, dst_shape, groups); |
|
|
|
} |
|
|
|
return TransShapeHwcnToFzWithGroups(src_shape, data_type, dst_shape, groups); |
|
|
|
} |
|
|
|
|
|
|
|
Status FormatTransferFractalZ::TransShape(Format src_format, const std::vector<int64_t> &src_shape, DataType data_type, |
|
|
|
Format dst_format, std::vector<int64_t> &dst_shape) { |
|
|
|
if (CheckDataTypeSupport(data_type) != SUCCESS) { |
|
|
|
|