AddOutputTd
功 能 说 明
为 算 子 增 加 输 入Tensor的 描 述。
函 数 原 型
Text
ContextBuilder &AddOutputTd(int32_t index, ge::DataType dtype, ge::Format originFormat, ge::Format storageFormat, gert::StorageShape storageShape)
参 数 说 明
返 回 值 说 明
当 前ContextBuilder的 对 象
约 束 说 明
调 用AddOutputTd前 需 要 调 用NodeIoNum与IrInstanceNum接 口
调 用 示 例
Text
gert::StorageShape x_shape = {{1024, 5120}, {1024, 5120}};
gert::StorageShape output_shape = {{1024, 5210}, {1024, 5210}};
context_ascendc::ContextBuilder builder;
(void)builder
.NodeIoNum(1, 1)
.IrInstanceNum({1})
.SetOpNameType("tmpName", "tmpType")
.AddInputTd(0, ge::DT_FLOAT16, ge::FORMAT_ND, ge::FORMAT_ND, x_shape)
.AddOutputTd(0, ge::DT_FLOAT16, ge::FORMAT_ND, ge::FORMAT_ND, output_shape)