EsSetGraphOutput
产品支持情况
全量芯片支持。
头文件/库文件
- 头文件:#include <ge/esb_funcs.h>
- 库文件:libeager_style_graph_builder_base.so、libeager_style_graph_builder_base_static.a
功能说明
设置图的输出。
函数原型
uint32_t EsSetGraphOutput(EsCTensorHolder *tensor, int64_t output_index)
参数说明
| 参数名 | 输入/输出 | 说明 |
|---|---|---|
| tensor | 输入 | 被输出的Tensor。 |
| output_index | 输入 | 图的输出索引。 |
返回值说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| - | uint32_t | 成功为0,其他失败。 |
约束说明
无
调用示例
EsCGraphBuilder *graph = EsCreateGraphBuilder("test_graph");
auto *tensor = EsCreateGraphInput(graph, 0);
uint32_t result = EsSetGraphOutput(tensor, 0);