mindstudio-probe 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mindstudio_probe-1.0.1.dist-info/LICENSE +201 -0
- mindstudio_probe-1.0.1.dist-info/METADATA +30 -0
- mindstudio_probe-1.0.1.dist-info/RECORD +228 -0
- mindstudio_probe-1.0.1.dist-info/WHEEL +5 -0
- mindstudio_probe-1.0.1.dist-info/entry_points.txt +2 -0
- mindstudio_probe-1.0.1.dist-info/top_level.txt +1 -0
- msprobe/README.md +182 -0
- msprobe/__init__.py +0 -0
- msprobe/config/README.md +397 -0
- msprobe/config/config.json +28 -0
- msprobe/config/img/free_benchmark.png +0 -0
- msprobe/core/common/const.py +241 -0
- msprobe/core/common/exceptions.py +88 -0
- msprobe/core/common/file_check.py +265 -0
- msprobe/core/common/log.py +55 -0
- msprobe/core/common/utils.py +516 -0
- msprobe/core/common_config.py +58 -0
- msprobe/core/data_dump/data_collector.py +140 -0
- msprobe/core/data_dump/data_processor/base.py +245 -0
- msprobe/core/data_dump/data_processor/factory.py +61 -0
- msprobe/core/data_dump/data_processor/pytorch_processor.py +346 -0
- msprobe/core/data_dump/json_writer.py +116 -0
- msprobe/core/data_dump/scope.py +178 -0
- msprobe/mindspore/__init__.py +1 -0
- msprobe/mindspore/debugger/__init__.py +0 -0
- msprobe/mindspore/debugger/debugger_config.py +51 -0
- msprobe/mindspore/debugger/precision_debugger.py +32 -0
- msprobe/mindspore/doc/dump.md +65 -0
- msprobe/mindspore/dump/__init__.py +0 -0
- msprobe/mindspore/dump/api_kbk_dump.py +55 -0
- msprobe/mindspore/dump/dump_tool_factory.py +38 -0
- msprobe/mindspore/dump/kernel_graph_dump.py +60 -0
- msprobe/mindspore/ms_config.py +78 -0
- msprobe/mindspore/overflow_check/__init__.py +0 -0
- msprobe/mindspore/overflow_check/kernel_graph_overflow_check.py +45 -0
- msprobe/mindspore/overflow_check/overflow_check_tool_factory.py +32 -0
- msprobe/mindspore/task_handler_factory.py +21 -0
- msprobe/msprobe.py +67 -0
- msprobe/pytorch/__init__.py +4 -0
- msprobe/pytorch/advisor/advisor.py +124 -0
- msprobe/pytorch/advisor/advisor_const.py +59 -0
- msprobe/pytorch/advisor/advisor_result.py +58 -0
- msprobe/pytorch/api_accuracy_checker/.keep +0 -0
- msprobe/pytorch/api_accuracy_checker/__init__.py +0 -0
- msprobe/pytorch/api_accuracy_checker/common/.keep +0 -0
- msprobe/pytorch/api_accuracy_checker/common/__init__.py +0 -0
- msprobe/pytorch/api_accuracy_checker/common/config.py +50 -0
- msprobe/pytorch/api_accuracy_checker/common/utils.py +224 -0
- msprobe/pytorch/api_accuracy_checker/compare/__init__.py +0 -0
- msprobe/pytorch/api_accuracy_checker/compare/algorithm.py +216 -0
- msprobe/pytorch/api_accuracy_checker/compare/api_precision_compare.py +545 -0
- msprobe/pytorch/api_accuracy_checker/compare/api_precision_standard.yaml +133 -0
- msprobe/pytorch/api_accuracy_checker/compare/api_precision_threshold.yaml +390 -0
- msprobe/pytorch/api_accuracy_checker/compare/compare.py +345 -0
- msprobe/pytorch/api_accuracy_checker/compare/compare_column.py +74 -0
- msprobe/pytorch/api_accuracy_checker/compare/compare_utils.py +249 -0
- msprobe/pytorch/api_accuracy_checker/config.yaml +4 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/.keep +0 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/__init__.py +0 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/data_generate.py +328 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/multi_run_ut.py +203 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py +127 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py +493 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/run_ut_utils.py +7 -0
- msprobe/pytorch/api_accuracy_checker/run_ut/torch_ut_setting.json +5 -0
- msprobe/pytorch/common/__init__.py +2 -0
- msprobe/pytorch/common/compare_script.template +14 -0
- msprobe/pytorch/common/log.py +32 -0
- msprobe/pytorch/common/parse_json.py +37 -0
- msprobe/pytorch/common/utils.py +224 -0
- msprobe/pytorch/compare/acc_compare.py +1024 -0
- msprobe/pytorch/compare/distributed_compare.py +111 -0
- msprobe/pytorch/compare/highlight.py +100 -0
- msprobe/pytorch/compare/mapping.yaml +607 -0
- msprobe/pytorch/compare/match.py +36 -0
- msprobe/pytorch/compare/npy_compare.py +244 -0
- msprobe/pytorch/debugger/__init__.py +0 -0
- msprobe/pytorch/debugger/debugger_config.py +86 -0
- msprobe/pytorch/debugger/precision_debugger.py +95 -0
- msprobe/pytorch/doc/FAQ.md +193 -0
- msprobe/pytorch/doc/api_accuracy_checker.md +269 -0
- msprobe/pytorch/doc/atat/321/207/342/226/223/342/225/233/321/205/342/225/221/320/266/321/205/342/225/226/320/265/321/205/320/225/342/225/226/321/206/320/245/342/226/221/321/206/320/235/320/276dump/321/206/320/260/320/227/321/205/320/227/320/226/321/206/320/220/320/267/321/210/320/223/342/225/234/321/205/320/257/342/225/221/321/207/342/225/221/342/224/220/321/206/320/232/320/265/321/205/320/241/320/232.md +182 -0
- msprobe/pytorch/doc/dump.md +207 -0
- msprobe/pytorch/doc/img/BLOOM-7B_1.png +0 -0
- msprobe/pytorch/doc/img/BLOOM-7B_2.png +0 -0
- msprobe/pytorch/doc/img/BLOOM-7B_3.png +0 -0
- msprobe/pytorch/doc/img/BLOOM-7B_4.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_1.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_2.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_3.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_4.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_5.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_6.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_7.png +0 -0
- msprobe/pytorch/doc/img/GPT-3_8.png +0 -0
- msprobe/pytorch/doc/img/YOLOV5S_1.png +0 -0
- msprobe/pytorch/doc/img/YOLOV5S_2.png +0 -0
- msprobe/pytorch/doc/img/accuracy_checking_details.png +0 -0
- msprobe/pytorch/doc/img/accuracy_checking_result.png +0 -0
- msprobe/pytorch/doc/img/api_precision_compare_details.png +0 -0
- msprobe/pytorch/doc/img/api_precision_compare_result.png +0 -0
- msprobe/pytorch/doc/img/auto_analyze_log.png +0 -0
- msprobe/pytorch/doc/img/compare_result_pkl.png +0 -0
- msprobe/pytorch/doc/img/compare_result_pkl_md5.png.png +0 -0
- msprobe/pytorch/doc/img/cpu_info.png +0 -0
- msprobe/pytorch/doc/img/module_compare.png +0 -0
- msprobe/pytorch/doc/parse_tool.md +286 -0
- msprobe/pytorch/doc/ptdbg_ascend_compare.md +176 -0
- msprobe/pytorch/doc/ptdbg_ascend_overview.md +68 -0
- msprobe/pytorch/doc/ptdbg_ascend_quickstart.md +381 -0
- msprobe/pytorch/doc/run_overflow_check.md +25 -0
- msprobe/pytorch/doc//321/205/320/254/320/270/321/207/342/225/221/342/224/220/321/207/342/226/223/342/225/233/321/205/342/225/221/320/266/321/206/320/277/320/244/321/205/320/277/342/225/243.md +90 -0
- msprobe/pytorch/free_benchmark/__init__.py +8 -0
- msprobe/pytorch/free_benchmark/common/__init__.py +0 -0
- msprobe/pytorch/free_benchmark/common/constant.py +67 -0
- msprobe/pytorch/free_benchmark/common/counter.py +72 -0
- msprobe/pytorch/free_benchmark/common/enums.py +37 -0
- msprobe/pytorch/free_benchmark/common/params.py +129 -0
- msprobe/pytorch/free_benchmark/common/utils.py +98 -0
- msprobe/pytorch/free_benchmark/compare/grad_saver.py +183 -0
- msprobe/pytorch/free_benchmark/compare/single_benchmark.py +104 -0
- msprobe/pytorch/free_benchmark/main.py +102 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/__init__.py +0 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/base_layer.py +13 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/layer_factory.py +41 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/__init__.py +0 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/add_noise.py +90 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/bit_noise.py +104 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/change_value.py +63 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/improve_precision.py +68 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/no_change.py +28 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/npu/npu_base_layser.py +45 -0
- msprobe/pytorch/free_benchmark/perturbed_layers/run_cpu.py +19 -0
- msprobe/pytorch/free_benchmark/result_handlers/__init__.py +0 -0
- msprobe/pytorch/free_benchmark/result_handlers/base_handler.py +203 -0
- msprobe/pytorch/free_benchmark/result_handlers/check_handler.py +39 -0
- msprobe/pytorch/free_benchmark/result_handlers/fix_handler.py +24 -0
- msprobe/pytorch/free_benchmark/result_handlers/handler_factory.py +31 -0
- msprobe/pytorch/free_benchmark/result_handlers/preheat_handler.py +170 -0
- msprobe/pytorch/functional/__init__.py +0 -0
- msprobe/pytorch/functional/data_processor.py +0 -0
- msprobe/pytorch/functional/dump_module.py +39 -0
- msprobe/pytorch/hook_module/__init__.py +1 -0
- msprobe/pytorch/hook_module/api_registry.py +161 -0
- msprobe/pytorch/hook_module/hook_module.py +109 -0
- msprobe/pytorch/hook_module/support_wrap_ops.yaml +1876 -0
- msprobe/pytorch/hook_module/utils.py +29 -0
- msprobe/pytorch/hook_module/wrap_aten.py +100 -0
- msprobe/pytorch/hook_module/wrap_distributed.py +75 -0
- msprobe/pytorch/hook_module/wrap_functional.py +108 -0
- msprobe/pytorch/hook_module/wrap_npu_custom.py +73 -0
- msprobe/pytorch/hook_module/wrap_tensor.py +72 -0
- msprobe/pytorch/hook_module/wrap_torch.py +88 -0
- msprobe/pytorch/hook_module/wrap_vf.py +64 -0
- msprobe/pytorch/module_processer.py +98 -0
- msprobe/pytorch/online_dispatch/__init__.py +20 -0
- msprobe/pytorch/online_dispatch/compare.py +236 -0
- msprobe/pytorch/online_dispatch/dispatch.py +274 -0
- msprobe/pytorch/online_dispatch/dump_compare.py +186 -0
- msprobe/pytorch/online_dispatch/single_compare.py +391 -0
- msprobe/pytorch/online_dispatch/torch_ops_config.yaml +50 -0
- msprobe/pytorch/online_dispatch/utils.py +187 -0
- msprobe/pytorch/parse.py +4 -0
- msprobe/pytorch/parse_tool/__init__.py +0 -0
- msprobe/pytorch/parse_tool/cli.py +32 -0
- msprobe/pytorch/parse_tool/lib/__init__.py +0 -0
- msprobe/pytorch/parse_tool/lib/compare.py +259 -0
- msprobe/pytorch/parse_tool/lib/config.py +51 -0
- msprobe/pytorch/parse_tool/lib/file_desc.py +31 -0
- msprobe/pytorch/parse_tool/lib/interactive_cli.py +102 -0
- msprobe/pytorch/parse_tool/lib/parse_exception.py +54 -0
- msprobe/pytorch/parse_tool/lib/parse_tool.py +158 -0
- msprobe/pytorch/parse_tool/lib/utils.py +367 -0
- msprobe/pytorch/parse_tool/lib/visualization.py +90 -0
- msprobe/pytorch/pt_config.py +93 -0
- msprobe/pytorch/service.py +167 -0
- msprobe/test/core_ut/common/test_utils.py +345 -0
- msprobe/test/core_ut/data_dump/test_data_collector.py +47 -0
- msprobe/test/core_ut/data_dump/test_json_writer.py +183 -0
- msprobe/test/core_ut/data_dump/test_scope.py +151 -0
- msprobe/test/core_ut/test_common_config.py +152 -0
- msprobe/test/core_ut/test_file_check.py +218 -0
- msprobe/test/core_ut/test_log.py +109 -0
- msprobe/test/mindspore_ut/test_api_kbk_dump.py +51 -0
- msprobe/test/mindspore_ut/test_debugger_config.py +42 -0
- msprobe/test/mindspore_ut/test_dump_tool_factory.py +51 -0
- msprobe/test/mindspore_ut/test_kernel_graph_dump.py +66 -0
- msprobe/test/mindspore_ut/test_kernel_graph_overflow_check.py +63 -0
- msprobe/test/mindspore_ut/test_ms_config.py +69 -0
- msprobe/test/mindspore_ut/test_overflow_check_tool_factory.py +51 -0
- msprobe/test/mindspore_ut/test_precision_debugger.py +56 -0
- msprobe/test/mindspore_ut/test_task_handler_factory.py +58 -0
- msprobe/test/pytorch_ut/advisor/test_advisor.py +83 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/common/test_common_utils.py +108 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/common/test_config.py +39 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/compare/test_algorithm.py +112 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/compare/test_api_precision_compare.py +77 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/compare/test_compare.py +125 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/compare/test_compare_column.py +10 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/compare/test_compare_utils.py +43 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/run_ut/dump.json +179 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/run_ut/forward.json +63 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/run_ut/test_data_generate.py +99 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/run_ut/test_multi_run_ut.py +115 -0
- msprobe/test/pytorch_ut/api_accuracy_checker/run_ut/test_run_ut.py +72 -0
- msprobe/test/pytorch_ut/compare/test_acc_compare.py +17 -0
- msprobe/test/pytorch_ut/free_benchmark/perturbed_layers/test_perturbed_layser.py +105 -0
- msprobe/test/pytorch_ut/free_benchmark/result_handlers/test_result_handler.py +121 -0
- msprobe/test/pytorch_ut/free_benchmark/test_main.py +101 -0
- msprobe/test/pytorch_ut/functional/test_dump_module.py +15 -0
- msprobe/test/pytorch_ut/hook_module/test_api_registry.py +130 -0
- msprobe/test/pytorch_ut/hook_module/test_hook_module.py +42 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_aten.py +65 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_distributed.py +35 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_functional.py +20 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_tensor.py +35 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_torch.py +43 -0
- msprobe/test/pytorch_ut/hook_module/test_wrap_vf.py +11 -0
- msprobe/test/pytorch_ut/test_pt_config.py +69 -0
- msprobe/test/pytorch_ut/test_service.py +59 -0
- msprobe/test/resources/advisor.txt +3 -0
- msprobe/test/resources/compare_result_20230703104808.csv +9 -0
- msprobe/test/resources/compare_result_without_accuracy.csv +9 -0
- msprobe/test/resources/config.yaml +3 -0
- msprobe/test/resources/npu_test.pkl +8 -0
- msprobe/test/run_test.sh +30 -0
- msprobe/test/run_ut.py +58 -0
- msprobe/test/test_module_processer.py +64 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
__and__: __and__
|
|
2
|
+
__iand__: __iand__
|
|
3
|
+
__ilshift__: __ilshift__
|
|
4
|
+
__ior__: __ior__
|
|
5
|
+
__irshift__: __irshift__
|
|
6
|
+
__ixor__: __ixor__
|
|
7
|
+
__lshift__: __lshift__
|
|
8
|
+
__or__: __or__
|
|
9
|
+
__rshift__: __rshift__
|
|
10
|
+
__xor__: __xor__
|
|
11
|
+
_adaptive_avg_pool2d: adaptive_avg_pool2d
|
|
12
|
+
_adaptive_avg_pool3d: adaptive_avg_pool3d
|
|
13
|
+
_cdist_forward: cdist
|
|
14
|
+
_cudnn_rnn: rnn
|
|
15
|
+
_embedding_bag: embedding_bag
|
|
16
|
+
_fft_c2c: fft
|
|
17
|
+
_fft_c2r: rfft
|
|
18
|
+
_foreach_add_: _foreach_add_
|
|
19
|
+
_foreach_addcdiv: _foreach_addcdiv
|
|
20
|
+
_foreach_copy_: _foreach_copy_
|
|
21
|
+
_foreach_lerp_: _foreach_lerp_
|
|
22
|
+
_foreach_maximum: _foreach_maximum
|
|
23
|
+
_foreach_mul: _foreach_mul
|
|
24
|
+
_foreach_neg_: _foreach_neg_
|
|
25
|
+
_foreach_pow: _foreach_pow
|
|
26
|
+
_foreach_reciprocal_: _foreach_reciprocal_
|
|
27
|
+
_foreach_sign: _foreach_sign
|
|
28
|
+
_foreach_sqrt: _foreach_sqrt
|
|
29
|
+
_foreach_sqrt_: _foreach_sqrt_
|
|
30
|
+
_foreach_sub: _foreach_sub
|
|
31
|
+
_fused_adam: FusedAdam
|
|
32
|
+
_linalg_det: det
|
|
33
|
+
_linalg_eigh: eigh
|
|
34
|
+
_linalg_slogdet: slogdet
|
|
35
|
+
_linalg_svd: svd
|
|
36
|
+
_list_to_tensor: as_tensor
|
|
37
|
+
_log_softmax: log_softmax
|
|
38
|
+
_native_batch_norm_legit: batch_norm
|
|
39
|
+
_nested_tensor_from_tensor_list: _nested_tensor_from_tensor_list
|
|
40
|
+
_pdist_forward: pdist
|
|
41
|
+
_pin_memory: pin_memory
|
|
42
|
+
_reshape_alias: reshape
|
|
43
|
+
_resize_output_: resize_
|
|
44
|
+
_softmax: softmax
|
|
45
|
+
_to_copy: to
|
|
46
|
+
abs: abs
|
|
47
|
+
abs_: abs_
|
|
48
|
+
absolute: abs
|
|
49
|
+
absolute_: abs_
|
|
50
|
+
acos: acos
|
|
51
|
+
acos_: acos_
|
|
52
|
+
acosh: acosh
|
|
53
|
+
acosh_: acosh_
|
|
54
|
+
adaptive_max_pool2d: adaptive_max_pool2d
|
|
55
|
+
adaptive_max_pool3d: adaptive_max_pool3d
|
|
56
|
+
add: add
|
|
57
|
+
add_: add_
|
|
58
|
+
addbmm: addbmm
|
|
59
|
+
addbmm_: addbmm_
|
|
60
|
+
addcdiv: addcdiv
|
|
61
|
+
addcdiv_: addcdiv_
|
|
62
|
+
addcmul: addcmul
|
|
63
|
+
addcmul_: addcmul_
|
|
64
|
+
addmm: addmm
|
|
65
|
+
addmm_: addmm_
|
|
66
|
+
addmv: addmv
|
|
67
|
+
addmv_: addmv_
|
|
68
|
+
addr: addr
|
|
69
|
+
affine_grid_generator: affine_grid
|
|
70
|
+
alias: alias
|
|
71
|
+
all: all
|
|
72
|
+
alpha_dropout: AlphaDropout
|
|
73
|
+
amax: amax
|
|
74
|
+
amin: amin
|
|
75
|
+
aminmax: aminmax
|
|
76
|
+
angle: angle
|
|
77
|
+
any: any
|
|
78
|
+
arange: arange
|
|
79
|
+
arccos: acos
|
|
80
|
+
arccos_: arccos_
|
|
81
|
+
arccosh: arccosh
|
|
82
|
+
arccosh_: arccosh_
|
|
83
|
+
arcsin: asin
|
|
84
|
+
arcsin_: arcsin_
|
|
85
|
+
arcsinh: asinh
|
|
86
|
+
arcsinh_: arcsinh_
|
|
87
|
+
arctan: atan
|
|
88
|
+
arctan2: atan2
|
|
89
|
+
arctan2_: arctan2_
|
|
90
|
+
arctan_: arctan_
|
|
91
|
+
arctanh: arctanh
|
|
92
|
+
arctanh_: arctanh_
|
|
93
|
+
argmax: argmax
|
|
94
|
+
argmin: argmin
|
|
95
|
+
argsort: argsort
|
|
96
|
+
as_strided: as_strided
|
|
97
|
+
asin: asin
|
|
98
|
+
asin_: asin_
|
|
99
|
+
asinh: asinh
|
|
100
|
+
asinh_: asinh_
|
|
101
|
+
atan: atan
|
|
102
|
+
atan2: atan2
|
|
103
|
+
atan2_: atan2_
|
|
104
|
+
atan_: atan_
|
|
105
|
+
atanh: atanh
|
|
106
|
+
atanh_: atanh_
|
|
107
|
+
avg_pool2d: avg_pool2d
|
|
108
|
+
avg_pool3d: avg_pool3d
|
|
109
|
+
baddbmm: baddbmm
|
|
110
|
+
baddbmm_: baddbmm_
|
|
111
|
+
bernoulli: bernoulli
|
|
112
|
+
bernoulli_: bernoulli_
|
|
113
|
+
binary_cross_entropy: BCELoss
|
|
114
|
+
binary_cross_entropy_with_logits: binary_cross_entropy_with_logits
|
|
115
|
+
bitwise_and: bitwise_and
|
|
116
|
+
bitwise_and_: bitwise_and_
|
|
117
|
+
bitwise_left_shift: __lshift__
|
|
118
|
+
bitwise_left_shift_: bitwise_left_shift_
|
|
119
|
+
bitwise_not: bitwise_not
|
|
120
|
+
bitwise_not_: bitwise_not_
|
|
121
|
+
bitwise_or: bitwise_or
|
|
122
|
+
bitwise_or_: bitwise_or_
|
|
123
|
+
bitwise_right_shift: __rshift__
|
|
124
|
+
bitwise_right_shift_: bitwise_right_shift_
|
|
125
|
+
bitwise_xor: bitwise_xor
|
|
126
|
+
bitwise_xor_: bitwise_xor_
|
|
127
|
+
bmm: bmm
|
|
128
|
+
broadcast_tensors: broadcast_tensors
|
|
129
|
+
bucketize: bucketize
|
|
130
|
+
cat: cat
|
|
131
|
+
cauchy: Cauchy
|
|
132
|
+
cauchy_: cauchy_
|
|
133
|
+
ceil: ceil
|
|
134
|
+
ceil_: ceil_
|
|
135
|
+
celu: celu
|
|
136
|
+
celu_: celu_
|
|
137
|
+
cholesky: cholesky
|
|
138
|
+
cholesky_inverse: cholesky_inverse
|
|
139
|
+
cholesky_solve: cholesky_solve
|
|
140
|
+
clamp: clamp
|
|
141
|
+
clamp_: clamp_
|
|
142
|
+
clamp_max: clamp_max
|
|
143
|
+
clamp_max_: clamp_max_
|
|
144
|
+
clamp_min: clamp_min
|
|
145
|
+
clamp_min_: clamp_min_
|
|
146
|
+
clip: clip
|
|
147
|
+
clip_: clip_
|
|
148
|
+
clone: clone
|
|
149
|
+
col2im: col2im
|
|
150
|
+
complex: complex
|
|
151
|
+
conj_physical: conj
|
|
152
|
+
conj_physical_: conj_
|
|
153
|
+
constant_pad_nd: pad
|
|
154
|
+
convolution: Conv2d
|
|
155
|
+
copy: copy_
|
|
156
|
+
copy_: copy_
|
|
157
|
+
copysign: copysign
|
|
158
|
+
copysign_: copysign_
|
|
159
|
+
cos: cos
|
|
160
|
+
cos_: cos_
|
|
161
|
+
cosh: cosh
|
|
162
|
+
cosh_: cosh_
|
|
163
|
+
count_nonzero: count_nonzero
|
|
164
|
+
cudnn_batch_norm: BatchNorm2d
|
|
165
|
+
cummax: cummax
|
|
166
|
+
cummin: cummin
|
|
167
|
+
cumprod: cumprod
|
|
168
|
+
cumprod_: cumprod_
|
|
169
|
+
cumsum: cumsum
|
|
170
|
+
cumsum_: cumsum_
|
|
171
|
+
deg2rad: deg2rad
|
|
172
|
+
deg2rad_: deg2rad_
|
|
173
|
+
detach: detach
|
|
174
|
+
diag: diag
|
|
175
|
+
diag_embed: diag_embed
|
|
176
|
+
diagonal: diagonal
|
|
177
|
+
diagonal_copy: diagonal
|
|
178
|
+
diagonal_scatter: diagonal
|
|
179
|
+
digamma: digamma
|
|
180
|
+
digamma_: digamma_
|
|
181
|
+
dist: dist
|
|
182
|
+
div: div
|
|
183
|
+
div_: div_
|
|
184
|
+
divide: div
|
|
185
|
+
divide_: divide_
|
|
186
|
+
dot: dot
|
|
187
|
+
dropout: dropout
|
|
188
|
+
elu: ELU
|
|
189
|
+
elu_: elu_
|
|
190
|
+
embedding: embedding
|
|
191
|
+
empty_like: empty_like
|
|
192
|
+
empty_strided: empty_strided
|
|
193
|
+
eq: eq
|
|
194
|
+
eq_: eq_
|
|
195
|
+
erf: erf
|
|
196
|
+
erf_: erf_
|
|
197
|
+
erfc: erfc
|
|
198
|
+
erfc_: erfc_
|
|
199
|
+
erfinv: erfinv
|
|
200
|
+
erfinv_: erfinv_
|
|
201
|
+
exp: exp
|
|
202
|
+
exp2: exp2
|
|
203
|
+
exp2_: exp2_
|
|
204
|
+
exp_: exp_
|
|
205
|
+
expand: expand
|
|
206
|
+
expm1: expm1
|
|
207
|
+
expm1_: expm1_
|
|
208
|
+
exponential: Exponential
|
|
209
|
+
exponential_: exponential_
|
|
210
|
+
eye: eye
|
|
211
|
+
fft_fft: fft
|
|
212
|
+
fft_fft2: fft2
|
|
213
|
+
fft_fftn: fftn
|
|
214
|
+
fft_fftshift: fftshift
|
|
215
|
+
fft_hfft: hfft
|
|
216
|
+
fft_hfft2: hfft2
|
|
217
|
+
fft_hfftn: hfftn
|
|
218
|
+
fft_ifft: ifft
|
|
219
|
+
fft_ifft2: ifft2
|
|
220
|
+
fft_ifftn: ifftn
|
|
221
|
+
fft_ifftshift: ifftshift
|
|
222
|
+
fft_ihfft: ihfft
|
|
223
|
+
fft_ihfft2: ihfft2
|
|
224
|
+
fft_ihfftn: ifftn
|
|
225
|
+
fft_irfft: irfft
|
|
226
|
+
fft_irfft2: irfft2
|
|
227
|
+
fft_irfftn: irfftn
|
|
228
|
+
fft_rfft: rfft
|
|
229
|
+
fft_rfft2: rfft2
|
|
230
|
+
fft_rfftn: rfftn
|
|
231
|
+
fill: fill_
|
|
232
|
+
fill_: fill_
|
|
233
|
+
fix: fix
|
|
234
|
+
fix_: fix_
|
|
235
|
+
flip: flip
|
|
236
|
+
float_power_: float_power_
|
|
237
|
+
floor: floor
|
|
238
|
+
floor_: floor_
|
|
239
|
+
floor_divide: floor_divide
|
|
240
|
+
floor_divide_: floor_divide_
|
|
241
|
+
fmax: fmax
|
|
242
|
+
fmin: fmin
|
|
243
|
+
fmod: fmod
|
|
244
|
+
fmod_: fmod_
|
|
245
|
+
frac: frac
|
|
246
|
+
frac_: frac_
|
|
247
|
+
full: full
|
|
248
|
+
full_like: full_like
|
|
249
|
+
gather: gather
|
|
250
|
+
gcd: gcd
|
|
251
|
+
gcd_: gcd_
|
|
252
|
+
ge: ge
|
|
253
|
+
ge_: ge_
|
|
254
|
+
gelu: GELU
|
|
255
|
+
gelu_: gelu_
|
|
256
|
+
geometric: Geometric
|
|
257
|
+
geometric_: geometric_
|
|
258
|
+
glu: glu
|
|
259
|
+
greater: gt
|
|
260
|
+
greater_: ge_
|
|
261
|
+
greater_equal: ge
|
|
262
|
+
greater_equal_: ge_
|
|
263
|
+
grid_sampler_2d: grid_sample
|
|
264
|
+
grid_sampler_3d: grid_sample
|
|
265
|
+
gru: GRU
|
|
266
|
+
gt: gt
|
|
267
|
+
gt_: gt_
|
|
268
|
+
hardshrink: Hardshrink
|
|
269
|
+
hardsigmoid: hardsigmoid
|
|
270
|
+
hardsigmoid_: hardsigmoid_
|
|
271
|
+
hardswish: hardswish
|
|
272
|
+
hardswish_: hardswish_
|
|
273
|
+
hardtanh: hardtanh
|
|
274
|
+
hardtanh_: hardtanh_
|
|
275
|
+
heaviside: heaviside
|
|
276
|
+
heaviside_: heaviside_
|
|
277
|
+
hinge_embedding_loss: HingeEmbeddingLoss
|
|
278
|
+
huber_loss: huber_loss
|
|
279
|
+
hypot: hypot
|
|
280
|
+
hypot_: hypot_
|
|
281
|
+
i0: i0
|
|
282
|
+
i0_: i0_
|
|
283
|
+
igamma: igamma
|
|
284
|
+
igamma_: igamma_
|
|
285
|
+
igammac: igammac
|
|
286
|
+
igammac_: igammac_
|
|
287
|
+
index: __getitem__
|
|
288
|
+
index_add: index_add
|
|
289
|
+
index_add_: index_add_
|
|
290
|
+
index_copy: index_copy_
|
|
291
|
+
index_copy_: index_copy_
|
|
292
|
+
index_fill: index_fill_
|
|
293
|
+
index_fill_: index_fill_
|
|
294
|
+
index_put: index_put_
|
|
295
|
+
index_put_: index_put_
|
|
296
|
+
index_reduce: index_select
|
|
297
|
+
index_select: index_select
|
|
298
|
+
is_pinned: is_pinned
|
|
299
|
+
is_same_size: is_same_size
|
|
300
|
+
isinf: isinf
|
|
301
|
+
isnan: isnan
|
|
302
|
+
isneginf: isneginf
|
|
303
|
+
isposinf: isposinf
|
|
304
|
+
istft: istft
|
|
305
|
+
item: item
|
|
306
|
+
lcm: lcm
|
|
307
|
+
lcm_: lcm_
|
|
308
|
+
le: le
|
|
309
|
+
le_: le_
|
|
310
|
+
leaky_relu: LeakyReLU
|
|
311
|
+
leaky_relu_: leaky_relu_
|
|
312
|
+
lerp: lerp
|
|
313
|
+
lerp_: lerp_
|
|
314
|
+
less: less
|
|
315
|
+
less_: less_
|
|
316
|
+
less_equal: le
|
|
317
|
+
less_equal_: less_equal_
|
|
318
|
+
lgamma: lgamma
|
|
319
|
+
lgamma_: lgamma_
|
|
320
|
+
linalg_cholesky_ex: cholesky
|
|
321
|
+
linalg_cross: cross
|
|
322
|
+
linalg_householder_product: householder_product
|
|
323
|
+
linalg_inv_ex: inv
|
|
324
|
+
linalg_ldl_factor_ex: ldl
|
|
325
|
+
linalg_ldl_solve: ldl_solve
|
|
326
|
+
linalg_lu: lu
|
|
327
|
+
linalg_lu_factor_ex: lu_factor
|
|
328
|
+
linalg_lu_solve: lu_solve
|
|
329
|
+
linalg_matrix_exp: matrix_exp
|
|
330
|
+
linalg_qr: qr
|
|
331
|
+
linalg_solve_triangular: solve
|
|
332
|
+
linalg_vector_norm: norm
|
|
333
|
+
linspace: linspace
|
|
334
|
+
log: log
|
|
335
|
+
log10: log10
|
|
336
|
+
log10_: log10_
|
|
337
|
+
log1p: log1p
|
|
338
|
+
log1p_: log1p_
|
|
339
|
+
log2: log2
|
|
340
|
+
log2_: log2_
|
|
341
|
+
log_: log_
|
|
342
|
+
log_normal: LogNormal
|
|
343
|
+
log_sigmoid_forward: log_sigmoid
|
|
344
|
+
logaddexp: logaddexp
|
|
345
|
+
logaddexp2: logaddexp2
|
|
346
|
+
_native_batch_norm_legit_functional: batch_norm
|
|
347
|
+
logcumsumexp: logcumsumexp
|
|
348
|
+
logical_and: logical_and
|
|
349
|
+
logical_and_: logical_and_
|
|
350
|
+
logical_not: logical_not
|
|
351
|
+
logical_not_: logical_not_
|
|
352
|
+
logical_or: logical_or
|
|
353
|
+
logical_or_: logical_or_
|
|
354
|
+
logical_xor: logical_xor
|
|
355
|
+
logical_xor_: logical_xor_
|
|
356
|
+
logit: logit
|
|
357
|
+
logit_: logit_
|
|
358
|
+
logspace: logspace
|
|
359
|
+
logsumexp: logsumexp
|
|
360
|
+
lstm: LSTM
|
|
361
|
+
lt: lt
|
|
362
|
+
lt_: lt_
|
|
363
|
+
lu_unpack: lu_unpack
|
|
364
|
+
margin_ranking_loss: margin_ranking_loss
|
|
365
|
+
masked_fill: masked_fill
|
|
366
|
+
masked_fill_: masked_fill_
|
|
367
|
+
matmul: matmul
|
|
368
|
+
max: max
|
|
369
|
+
max_pool2d_with_indices: MaxPool2d
|
|
370
|
+
max_pool3d_with_indices: MaxPool3d
|
|
371
|
+
max_unpool2d: MaxUnpool2d
|
|
372
|
+
max_unpool3d: max_unpool3d
|
|
373
|
+
maximum: maximum
|
|
374
|
+
mean: mean
|
|
375
|
+
median: median
|
|
376
|
+
meshgrid: meshgrid
|
|
377
|
+
min: min
|
|
378
|
+
minimum: minimum
|
|
379
|
+
mish: Mish
|
|
380
|
+
mish_: mish_
|
|
381
|
+
mm: mm
|
|
382
|
+
mode: mode
|
|
383
|
+
mse_loss: mse_loss
|
|
384
|
+
mul: mul
|
|
385
|
+
mul_: mul_
|
|
386
|
+
multi_margin_loss: MultiMarginLoss
|
|
387
|
+
multilabel_margin_loss_forward: multilabel_margin_loss
|
|
388
|
+
multinomial: multinomial
|
|
389
|
+
multiply: multiply
|
|
390
|
+
multiply_: mul_
|
|
391
|
+
mv: mv
|
|
392
|
+
mvlgamma: mvlgamma
|
|
393
|
+
mvlgamma_: mvlgamma_
|
|
394
|
+
name: name
|
|
395
|
+
nan_to_num: nan_to_num
|
|
396
|
+
nan_to_num_: nan_to_num_
|
|
397
|
+
nanmedian: nanmedian
|
|
398
|
+
nansum: nansum
|
|
399
|
+
narrow_copy: narrow
|
|
400
|
+
native_batch_norm: BatchNorm2d
|
|
401
|
+
native_dropout: dropout
|
|
402
|
+
native_group_norm: group_norm
|
|
403
|
+
native_layer_norm: LayerNorm
|
|
404
|
+
ne: ne
|
|
405
|
+
ne_: ne_
|
|
406
|
+
neg: neg
|
|
407
|
+
neg_: neg_
|
|
408
|
+
negative: neg
|
|
409
|
+
negative_: neg_
|
|
410
|
+
new_empty: new_empty
|
|
411
|
+
new_empty_strided: new_empty_strided
|
|
412
|
+
new_full: new_full
|
|
413
|
+
new_ones: new_ones
|
|
414
|
+
new_zeros: new_zeros
|
|
415
|
+
nextafter: nextafter
|
|
416
|
+
nextafter_: nextafter_
|
|
417
|
+
nll_loss: nll_loss
|
|
418
|
+
nll_loss2d_forward: NLLLoss2d
|
|
419
|
+
nll_loss_forward: NLLLoss
|
|
420
|
+
nonzero_static: nonzero
|
|
421
|
+
norm: norm
|
|
422
|
+
normal: normal
|
|
423
|
+
normal_: normal_
|
|
424
|
+
not_equal: ne
|
|
425
|
+
not_equal_: ne_
|
|
426
|
+
ones: ones
|
|
427
|
+
ones_like: ones_like
|
|
428
|
+
ormqr: ormqr
|
|
429
|
+
pairwise_distance: pairwise_distance
|
|
430
|
+
pdist: pdist
|
|
431
|
+
permute: permute
|
|
432
|
+
pin_memory: pin_memory
|
|
433
|
+
pixel_shuffle: PixelShuffle
|
|
434
|
+
polar: polar
|
|
435
|
+
polygamma: polygamma
|
|
436
|
+
positive: positive
|
|
437
|
+
pow: pow
|
|
438
|
+
pow_: pow_
|
|
439
|
+
prelu: prelu
|
|
440
|
+
prod: prod
|
|
441
|
+
quantized_gru: GRU
|
|
442
|
+
quantized_lstm: LSTM
|
|
443
|
+
rad2deg: rad2deg
|
|
444
|
+
rad2deg_: rad2deg_
|
|
445
|
+
rand: rand
|
|
446
|
+
rand_like: rand_like
|
|
447
|
+
randint: randint
|
|
448
|
+
randint_like: randint_like
|
|
449
|
+
randn: randn
|
|
450
|
+
randn_like: randn_like
|
|
451
|
+
randperm: randperm
|
|
452
|
+
reciprocal: reciprocal
|
|
453
|
+
reciprocal_: reciprocal_
|
|
454
|
+
reflection_pad1d: reflection_pad1d
|
|
455
|
+
reflection_pad2d: reflection_pad2d
|
|
456
|
+
reflection_pad3d: ReflectionPad3d
|
|
457
|
+
relu: relu
|
|
458
|
+
relu6: relu6
|
|
459
|
+
relu_: relu_
|
|
460
|
+
remainder: remainder
|
|
461
|
+
remainder_: remainder_
|
|
462
|
+
renorm: renorm
|
|
463
|
+
renorm_: renorm_
|
|
464
|
+
repeat: repeat
|
|
465
|
+
repeat_interleave: repeat_interleave
|
|
466
|
+
replication_pad1d: ReplicationPad1d
|
|
467
|
+
replication_pad2d: replication_pad2d
|
|
468
|
+
replication_pad3d: replication_pad3d
|
|
469
|
+
resize_as_: resize_as_
|
|
470
|
+
rnn_relu: RNN
|
|
471
|
+
rnn_tanh: RNN
|
|
472
|
+
roll: roll
|
|
473
|
+
rot90: rot90
|
|
474
|
+
round: round
|
|
475
|
+
round_: round_
|
|
476
|
+
rrelu_with_noise: RReLU
|
|
477
|
+
rrelu_with_noise_: rrelu_with_noise
|
|
478
|
+
rsqrt: rsqrt
|
|
479
|
+
rsqrt_: rsqrt_
|
|
480
|
+
rsub: rsub
|
|
481
|
+
scalar_tensor: scalar_tensor
|
|
482
|
+
scatter: scatter_
|
|
483
|
+
scatter_: scatter_
|
|
484
|
+
scatter_add: scatter_add
|
|
485
|
+
scatter_add_: scatter_add_
|
|
486
|
+
searchsorted: searchsorted
|
|
487
|
+
select: select
|
|
488
|
+
selu: selu
|
|
489
|
+
selu_: selu_
|
|
490
|
+
sgn: sgn
|
|
491
|
+
sgn_: sgn_
|
|
492
|
+
sigmoid: sigmoid
|
|
493
|
+
sigmoid_: sigmoid_
|
|
494
|
+
sign: sign
|
|
495
|
+
sign_: sign_
|
|
496
|
+
signbit: signbit
|
|
497
|
+
silu: silu
|
|
498
|
+
silu_: silu_
|
|
499
|
+
sin: sin
|
|
500
|
+
sin_: sin_
|
|
501
|
+
sinc: sinc
|
|
502
|
+
sinc_: sinc_
|
|
503
|
+
sinh: sinh
|
|
504
|
+
sinh_: sinh_
|
|
505
|
+
slice: slice
|
|
506
|
+
smooth_l1_loss: smooth_l1_loss
|
|
507
|
+
soft_margin_loss: soft_margin_loss
|
|
508
|
+
softplus: softplus
|
|
509
|
+
softshrink: softshrink
|
|
510
|
+
sort: sort
|
|
511
|
+
special_airy_ai: airy_ai
|
|
512
|
+
special_bessel_j0: j0
|
|
513
|
+
special_bessel_j1: j1
|
|
514
|
+
special_bessel_y0: y0
|
|
515
|
+
special_bessel_y1: y1
|
|
516
|
+
special_chebyshev_polynomial_t: chebyshev_t
|
|
517
|
+
special_chebyshev_polynomial_u: chebyshev_u
|
|
518
|
+
special_entr: entr
|
|
519
|
+
special_erfcx: erfcx
|
|
520
|
+
special_hermite_polynomial_h: hermite
|
|
521
|
+
special_hermite_polynomial_he: he
|
|
522
|
+
special_i0: i0
|
|
523
|
+
special_i0e: i0e
|
|
524
|
+
special_i1: i1
|
|
525
|
+
special_i1e: i1e
|
|
526
|
+
special_laguerre_polynomial_l: laguerre_l
|
|
527
|
+
special_log_ndtr: log_ndtr
|
|
528
|
+
special_modified_bessel_i0: i0
|
|
529
|
+
special_modified_bessel_i1: i1
|
|
530
|
+
special_modified_bessel_k0: k0
|
|
531
|
+
special_modified_bessel_k1: i1
|
|
532
|
+
special_ndtr: ndtr
|
|
533
|
+
special_ndtri: ndtri
|
|
534
|
+
special_scaled_modified_bessel_k0: i0e
|
|
535
|
+
special_scaled_modified_bessel_k1: scaled_modified_bessel_k1
|
|
536
|
+
special_spherical_bessel_j0: spherical_jn
|
|
537
|
+
special_xlog1py: xlog1py
|
|
538
|
+
special_zeta: zeta
|
|
539
|
+
split: split
|
|
540
|
+
split_with_sizes: split
|
|
541
|
+
sqrt: sqrt
|
|
542
|
+
sqrt_: sqrt_
|
|
543
|
+
square: square
|
|
544
|
+
square_: square_
|
|
545
|
+
squeeze: squeeze
|
|
546
|
+
stack: stack
|
|
547
|
+
std: std
|
|
548
|
+
std_mean: std_mean
|
|
549
|
+
stft: stft
|
|
550
|
+
sub: sub
|
|
551
|
+
sub_: sub_
|
|
552
|
+
subtract: sub
|
|
553
|
+
subtract_: subtract_
|
|
554
|
+
sum: sum
|
|
555
|
+
t: t
|
|
556
|
+
t_: t_
|
|
557
|
+
take: take
|
|
558
|
+
tan: tan
|
|
559
|
+
tan_: tan_
|
|
560
|
+
tanh: tanh
|
|
561
|
+
tanh_: tanh_
|
|
562
|
+
threshold: threshold
|
|
563
|
+
threshold_: threshold_
|
|
564
|
+
to: to
|
|
565
|
+
topk: topk
|
|
566
|
+
trace: trace
|
|
567
|
+
transpose: transpose
|
|
568
|
+
transpose_: transpose_
|
|
569
|
+
triangular_solve: triangular_solve
|
|
570
|
+
tril: tril
|
|
571
|
+
tril_: tril_
|
|
572
|
+
tril_indices: tril_indices
|
|
573
|
+
triu: triu
|
|
574
|
+
triu_: triu_
|
|
575
|
+
triu_indices: triu_indices
|
|
576
|
+
true_divide: true_divide
|
|
577
|
+
true_divide_: true_divide_
|
|
578
|
+
trunc: trunc
|
|
579
|
+
trunc_: trunc_
|
|
580
|
+
unbind: unbind
|
|
581
|
+
unfold: unfold
|
|
582
|
+
uniform: Uniform
|
|
583
|
+
uniform_: uniform_
|
|
584
|
+
unsafe_chunk: unsafe_chunk
|
|
585
|
+
unsafe_split: split
|
|
586
|
+
unsafe_split_with_sizes: split_with_sizes
|
|
587
|
+
unsqueeze: unsqueeze
|
|
588
|
+
unsqueeze_: unsqueeze_
|
|
589
|
+
upsample_bicubic2d: interpolate
|
|
590
|
+
upsample_bilinear2d: upsample_bilinear
|
|
591
|
+
upsample_nearest1d: interpolate
|
|
592
|
+
upsample_nearest2d: interpolate
|
|
593
|
+
upsample_nearest3d: interpolate
|
|
594
|
+
var: var
|
|
595
|
+
var_mean: var_mean
|
|
596
|
+
vdot: vdot
|
|
597
|
+
view: view
|
|
598
|
+
where: where
|
|
599
|
+
xlogy: xlogy
|
|
600
|
+
xlogy_: xlogy_
|
|
601
|
+
zero: zeros
|
|
602
|
+
zero_: zero_
|
|
603
|
+
zeros: zeros
|
|
604
|
+
zeros_like: zeros_like
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import yaml
|
|
3
|
+
from msprobe.core.common.file_check import FileOpen
|
|
4
|
+
from msprobe.core.common.utils import CompareException
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AtenIrMapping():
|
|
8
|
+
def __init__(self):
|
|
9
|
+
cur_path = os.path.dirname(os.path.realpath(__file__))
|
|
10
|
+
yaml_path = os.path.join(cur_path, "mapping.yaml")
|
|
11
|
+
with FileOpen(yaml_path, 'r') as f:
|
|
12
|
+
self.aten_mapping = yaml.safe_load(f)
|
|
13
|
+
|
|
14
|
+
def match(self, op1, op2):
|
|
15
|
+
if "Aten" in op1 and "Aten" not in op2:
|
|
16
|
+
return self.match_op(op1, op2)
|
|
17
|
+
else:
|
|
18
|
+
return self.match_op(op2, op1)
|
|
19
|
+
|
|
20
|
+
def match_op(self, aten_op, torch_op):
|
|
21
|
+
try:
|
|
22
|
+
aten_op_raw_name_overload = '_'.join(aten_op.split("_")[1:-3])
|
|
23
|
+
aten_op_raw_name = aten_op_raw_name_overload.split('.')[0]
|
|
24
|
+
torch_op_raw_name = '_'.join(torch_op.split("_")[1:-3]).lower()
|
|
25
|
+
except IndexError as e:
|
|
26
|
+
err_msg = f"Dump op name format error: {aten_op}, {torch_op}. Your dump data may be corrupted."
|
|
27
|
+
raise CompareException.INVALID_DATA_ERROR(err_msg) from e
|
|
28
|
+
matching_op = self.aten_mapping.get(aten_op_raw_name)
|
|
29
|
+
if matching_op is None:
|
|
30
|
+
return False
|
|
31
|
+
if matching_op.lower() == torch_op_raw_name:
|
|
32
|
+
return True
|
|
33
|
+
return False
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
graph_mapping = AtenIrMapping()
|