| 130 | } |
| 131 | |
| 132 | auto make_backward_graph( |
| 133 | const OpDef& def, const SmallVector<LogicalTensorDesc>& inputs, |
| 134 | const SmallVector<bool>& input_requires_grad, |
| 135 | const SmallVector<bool>& output_has_grad) { |
| 136 | Subgraph graph; |
| 137 | graph.inputs = {1, 2, 3}; |
| 138 | graph.outputs = {3}; |
| 139 | graph.exprs = {}; |
| 140 | return EncodedSubgraph::make(graph); |
| 141 | } |
| 142 | |
| 143 | OP_TRAIT_REG(FastpathCopy, FastpathCopy) |
| 144 | .apply_on_var_node(apply_on_var_node) |