| 837 | } |
| 838 | |
| 839 | auto is_samt_st(const OpDef& def, const OpDef& another) { |
| 840 | if (!another.same_type<JITFusionOp>()) { |
| 841 | return false; |
| 842 | } |
| 843 | auto& lhs = def.cast_final_safe<JITFusionOp>(); |
| 844 | auto& rhs = another.cast_final_safe<JITFusionOp>(); |
| 845 | return lhs.op->is_same(*rhs.op); |
| 846 | } |
| 847 | |
| 848 | EncodedSubgraph make_backward_graph( |
| 849 | const OpDef& def, const SmallVector<LogicalTensorDesc>& inputs, |