此接口后续版本会废弃,新开发算子请不要使用此接口。
把给定4-D “NCHW”数据格式转换为5-D “NC1HWC0”数据格式。
您可以在“te/lang/cce/te_compute/dim_conv.py”查看接口定义。
此接口暂不支持与其他TBE DSL计算接口混合使用。
支持的数据类型:float16。
te.lang.cce.compute_four2five(input, raw_shape_4D)
res_tensor:转换为5-D格式(N, C1, H, W, C0)后的tensor,tvm.tensor类型
Atlas 200/300/500 推理产品
Atlas 训练系列产品
import tvm import te.lang.cce raw_shape = (2, 32, 16, 128) in_dtype = "float16" input = tvm.placeholder(raw_shape, name='input', dtype=in_dtype) res = te.lang.cce.compute_four2five(input, raw_shape) # res.shape = (2,(32+15)//16,16,128,16)