* [Relay] Added MergeComposite pass This pass allows for patterns to be wrapped in a function marked with 'Composite' and a composite function name. This is intended to be used with the external codegen for the cases where an external operator maps to multiple Relay operators. In that case, the mapping can be expressed as a pattern and assigned a name. For more information on this pass and its motivation, see the RFC: https://discuss.tvm.ai/t/rfc-external-codegen-defining-composite-relay-operators/5470 Change-Id: Icb1b803a9f0ac57c529143200228f3bb5793afc0 * [Relay] Merge composite tests Added tests for the merge_composite pass. Change-Id: I1728b4a05b0c1c36140a40f1afe028fde62185dd * Merge composite additional test Change-Id: I9bc7d6053c575e9468ac5abc31214c6ad8507e46 * Support priority order in merge_composite The order in which the patterns are matched was currently random as an unordered_map was used to store the pattern table. This uses arrays instead so that a distinct priority order of matching can be defined. Additional tests have also been added to verify this behaviour. Change-Id: Ief347df4262639138d5d9d7c8cee7ef233af7b56 * Improved merge composite docs Change-Id: Ie3a72045ecc3f13ad3c302fbdf192b7296a306a8 * Removed unused variable Change-Id: I7814d5fde368ffaf1b3d6d806060c774c7720364 * Remove unnecessary op check Change-Id: I38e78d2acd5b86cb8e837be72ff9d72cd10bcf33 * Improve styling on composite function creation Change-Id: I37add1c3134e0b5d5085fe1eb9daf8e06890fa8c * Comment reword Change-Id: Ie05872dcbbe0c3e1190b0597083b9a64e6b66c66 * Stylistic changes to avoid std::move Change-Id: I43a93995bbf10530399900c992aa99dd4ae4575f * Relax a check in ExtractPattern Change-Id: I0faef77a66c55f83f09e6e47c561ffaea63dedfa * Remove new line Change-Id: Ifdd02c12087a7e1a0a9b54825669bc0de8f13c3d * Removed MatchPattern from MergeComposite This is not necessary now that ExtractPattern can fulfill the same purpose. Change-Id: I14dc020afa8e50f2df4c0a2efb88a011987f8196 * Removed a new line Change-Id: I8b50f0c9069aa1bcaccbe68eb421031f01a64842 * Improved docs for merge composite Change-Id: Ib1959a35c856e7ea5639de2e4ef314a54f44caf5 * Fixed free vars in test Change-Id: I2b7f273db275964ec0e9820560663f0808adee79 * Handle case where root arg might not be a call Change-Id: I4eeea3ce723d3ba337d110dcc690377daebe8626 * Removed blank line Change-Id: I07f5392c0e95cfe3cfa5c333703cc6f82d6034fb * Change to CHECK_EQ Change-Id: I5c5d62d3cd57f72508b30b926f72091ae6f0d1cc * Revised a conditional Change-Id: I23a7897ca15a7cd076db5039dc653a4b8c27e803 * Improved doc styling Change-Id: I377f0a1c1ac70f3b8d7584b0c49bddc8c6c134ef * Fail extraction if vars conflict Change-Id: I78e36d805e8ed6b55e61d490212a967c857554a4 * Added further merge composite tests Change-Id: Ib1d800409fca4c1834c7fe0cab5a26ab99a26820 Co-authored-by: lhutton1 <35535092+lhutton1@users.noreply.github.com>
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
benchmarking | Loading commit data... | |
test_adt.py | Loading commit data... | |
test_any.py | Loading commit data... | |
test_autotvm_task_extraction.py | Loading commit data... | |
test_backend_compile_engine.py | Loading commit data... | |
test_backend_graph_runtime.py | Loading commit data... | |
test_backend_interpreter.py | Loading commit data... | |
test_change_batch.py | Loading commit data... | |
test_cmp_op.py | Loading commit data... | |
test_cpp_build_module.py | Loading commit data... | |
test_debug.py | Loading commit data... | |
test_error_reporting.py | Loading commit data... | |
test_expr_functor.py | Loading commit data... | |
test_external_codegen.py | Loading commit data... | |
test_external_runtime.py | Loading commit data... | |
test_feature.py | Loading commit data... | |
test_ir_bind.py | Loading commit data... | |
test_ir_module.py | Loading commit data... | |
test_ir_nodes.py | Loading commit data... | |
test_ir_op.py | Loading commit data... | |
test_ir_parser.py | Loading commit data... | |
test_ir_text_printer.py | Loading commit data... | |
test_ir_well_formed.py | Loading commit data... | |
test_json_compact.py | Loading commit data... | |
test_memory_alloc.py | Loading commit data... | |
test_op_grad_level1.py | Loading commit data... | |
test_op_grad_level10.py | Loading commit data... | |
test_op_grad_level2.py | Loading commit data... | |
test_op_grad_level3.py | Loading commit data... | |
test_op_grad_level4.py | Loading commit data... | |
test_op_level1.py | Loading commit data... | |
test_op_level10.py | Loading commit data... | |
test_op_level2.py | Loading commit data... | |
test_op_level3.py | Loading commit data... | |
test_op_level4.py | Loading commit data... | |
test_op_level5.py | Loading commit data... | |
test_op_level6.py | Loading commit data... | |
test_op_qnn_add.py | Loading commit data... | |
test_op_qnn_concatenate.py | Loading commit data... | |
test_op_qnn_conv2d.py | Loading commit data... | |
test_op_qnn_dense.py | Loading commit data... | |
test_op_qnn_dequantize.py | Loading commit data... | |
test_op_qnn_mul.py | Loading commit data... | |
test_op_qnn_quantize.py | Loading commit data... | |
test_op_qnn_requantize.py | Loading commit data... | |
test_param_dict.py | Loading commit data... | |
test_pass_alpha_equal.py | Loading commit data... | |
test_pass_alter_op_layout.py | Loading commit data... | |
test_pass_annotation.py | Loading commit data... | |
test_pass_auto_quantize.py | Loading commit data... | |
test_pass_canonicalize_cast.py | Loading commit data... | |
test_pass_check_kind.py | Loading commit data... | |
test_pass_combine_parallel_conv2d.py | Loading commit data... | |
test_pass_combine_parallel_dense.py | Loading commit data... | |
test_pass_convert_op_layout.py | Loading commit data... | |
test_pass_dead_code_elimination.py | Loading commit data... | |
test_pass_eliminate_common_subexpr.py | Loading commit data... | |
test_pass_eta_expand.py | Loading commit data... | |
test_pass_fold_constant.py | Loading commit data... | |
test_pass_fold_scale_axis.py | Loading commit data... | |
test_pass_fuse_ops.py | Loading commit data... | |
test_pass_gradient.py | Loading commit data... | |
test_pass_lambda_lift.py | Loading commit data... | |
test_pass_legalize.py | Loading commit data... | |
test_pass_mac_count.py | Loading commit data... | |
test_pass_manager.py | Loading commit data... | |
test_pass_merge_composite.py | Loading commit data... | |
test_pass_partial_eval.py | Loading commit data... | |
test_pass_partition_graph.py | Loading commit data... | |
test_pass_qnn_legalize.py | Loading commit data... | |
test_pass_remove_unused_functions.py | Loading commit data... | |
test_pass_simplify_inference.py | Loading commit data... | |
test_pass_to_a_normal_form.py | Loading commit data... | |
test_pass_to_cps.py | Loading commit data... | |
test_pass_to_graph_normal_form.py | Loading commit data... | |
test_pass_unmatched_cases.py | Loading commit data... | |
test_pass_vars.py | Loading commit data... | |
test_py_converter.py | Loading commit data... | |
test_type_functor.py | Loading commit data... | |
test_type_infer.py | Loading commit data... | |
test_type_solver.py | Loading commit data... | |
test_typecall.py | Loading commit data... | |
test_vm.py | Loading commit data... | |
test_vm_serialization.py | Loading commit data... |