atb_graph_op.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #ifndef ATB_GRAPH_OP_H #define ATB_GRAPH_OP_H #include <acl/acl.h> #include <atb/atb_infer.h> #include <atb/types.h> #include <atb/utils.h> #include "atb/infer_op_params.h" // When constructing graph parameters, pay attention to the following points: (1) tensor ID. In the ATB graph API, tensors are classified into three types: input, output, and intermediate tensors. As the name suggests, input and output tensors are the input and output tensors of a graph. // Intermediate tensors are tensors in a graph. During graph construction, the tensor IDs must be in ascending order of input tensors, output tensors, and intermediate tensors. In addition, the number of each type of tensors must be the same as that set in the parameters. // (2) the ordering of nodes. You need to convert the computational graph into an ordered queue based on the topology of the computational graph, and ensure that the relationship between tensors and nodes is consistent with the computational graph. atb::Status CreateGraphOperation(atb::Operation **operation); #endif |
Parent topic: Case source code