Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DRR] C++ DRR (Declarative Rewrite Rule) of Paddle (PaddlePaddle#55859)
* fix cudnn 8.7+ bug on cudnnConvolutionBiasActivationForward * add drr_rewrite_pattern.h and remove_redundent_reshape demo * add drr_context and pattern_graph class * add test case * fix cmake file * fix compile bug * fix runtime bug and refine code * add MatchContext * update code * add impl of tensor_interface * fix compile bug * change smart ptr to pointor * change smart to pointor * change smart to pointor * Replace 'weak_ptr' with pointer * modify weak_ptr use count==0 judgment logic * change smart to pointor change smart to pointor Replace 'weak_ptr' with pointer modify weak_ptr use count==0 judgment logic Replace the declaration and call of weakptr with pointer * add match * add match * remove OperationInterface * update * Add Rewrite impl of DrrRewritePattern * refine code * rename ir_value to get in IrValue * fix header include * add CreateOperation template demo * Add GraphTopo class in pattern_graph * Reimplementing the GraphTopo class using queue * Reimplementing the GraphTopo class using queue * Optimize the access method of visited tensor * Considering that the inputs of opcall may be empty * Overloading the operator() method of Op, supporting dual tensor inputs * support attr * 1. Add Op class support for multi input and multi output function. 2. Add DRR duplicate TransposeOp merge testing code * 1. Add transferOP in createOption func * fix bug * fix NotifyOperationRemoved * refine code * Fix axis bug in perm * mupdate share_ptr * update * refine drr_test ut * Modify according to review * modify reshape_op * format code * support vector<int> for attr * fix drr test * refine code * Resolve compilation loop dependencies * add RequireNativeCall * support native_call in drr api * temp tensor prefix fix * refine code * suport Tensor Assgin API in ResultPattern * refine test code * refactor ther drr_pattern class * refine test case * rename DrrPatternBuilder to DrrPatternBase * fix compile bug * adjust include * Add log info in DrrRewritePattern * use ir::get_type_name * use ir::get_type_name * support compute attrbute in drr pattern * refine code * Add fusion testing code for fullOp and expandOp * Standardize code format * Replace IR_THROW() with PADDLE_THROW() * refine code * add attention fuse demo * update * fix compile error * add multihead_matmul fuse pattern * fix multihead_matmul * Update drr_attention_fuse_test.cc add buildprogram * fix drr_attention_fuse_test compile * add fused_gemm_epilogue in drr * attr support std::vector<int64_t> * add debug log * update * fix some bug * fix confilct * support subgraph replace in source pattern graph for drr * Improve the implementation of Drr and multihead_matmul_fuse_pass * add ReorderBlockOpsPass * fix drr_attention_fuse_pass * update * update reorder_block_ops_pass * revert fusedgemm * update * Add Bottom2UpMatch() func * merge code * fix bug * add log & fix bug * refine cpp type trait * using oprand() & num_oprand() replace oprands() * fix conflict * fix compile * fix pd.xxx to pd_op.xxx * fix bug of delete op in drr * add PatternGraphMatchV2 & FindOutputOp func * refactor ir operation creator * fix include pir * fix ir * merging * Split out dfsvisitor func from FindOutputOp func * fix bug * fix output op in source pattern bug * Debugging drr_test drr_attention_fuse_test passed! * Debugging drr_fuse_linear_test passed! * Optimize the PatternGraphMatchV2 function interface and overload the operator= method in MatchContextImpl * Modify comments and function names * auto code-gen for creating ir operation in drr * delete debug log * optimize the interface of MatchFromOutputToInput() * Optimize SourcePatternGraph::OutputNodes judgment logic * polish code * using default operator=() in MatchContextImpl * fix merge conflict * create test case: drr_same_name_test * fix duplicate binding of ir op bug * Rename drr_same_name_test to drr_same_type_binding_test & Add graphical notes * refactor logic of insert point for creating new operation in drr * update * fix compile error * fix some bug * fix codestyle * fix bug * Update anchor node judgment logic * fix bug of link pir * fix codestyle * self review v1 * refine code format * set thread_local for count in op class * fix compile on mac * remove unused .h in value.cc * fix compile --------- Co-authored-by: zyfncg <zhangyunfei07@baidu.com> Co-authored-by: gongshaotian <gstian5555@outlook.com> Co-authored-by: gongshaotian <> Co-authored-by: gongshaotian <141618702+gongshaotian@users.noreply.github.com>
- Loading branch information