mindstudio-probe 1.1.0__tar.gz → 1.1.1__tar.gz

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.
Files changed (364) hide show
  1. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/PKG-INFO +14 -3
  2. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/PKG-INFO +14 -3
  3. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/SOURCES.txt +61 -7
  4. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/entry_points.txt +0 -1
  5. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/requires.txt +2 -0
  6. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/README.md +39 -3
  7. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/config.json +1 -3
  8. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/advisor/advisor.py +8 -3
  9. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/const.py +113 -13
  10. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/exceptions.py +25 -3
  11. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/file_utils.py +150 -26
  12. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/inplace_op_checker.py +15 -0
  13. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/log.py +27 -9
  14. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/utils.py +182 -69
  15. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common_config.py +44 -15
  16. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/acc_compare.py +207 -142
  17. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/check.py +2 -5
  18. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/compare_cli.py +21 -4
  19. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/highlight.py +124 -55
  20. mindstudio_probe-1.1.1/msprobe/core/compare/layer_mapping/__init__.py +19 -0
  21. mindstudio_probe-1.1.1/msprobe/core/compare/layer_mapping/data_scope_parser.py +235 -0
  22. mindstudio_probe-1.1.1/msprobe/core/compare/layer_mapping/layer_mapping.py +242 -0
  23. mindstudio_probe-1.1.1/msprobe/core/compare/layer_mapping/postprocess_pass.py +94 -0
  24. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/npy_compare.py +52 -23
  25. mindstudio_probe-1.1.1/msprobe/core/compare/utils.py +489 -0
  26. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/data_collector.py +13 -11
  27. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/data_processor/base.py +46 -16
  28. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/data_processor/mindspore_processor.py +4 -4
  29. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/data_processor/pytorch_processor.py +156 -59
  30. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/scope.py +113 -34
  31. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/grad_probe/constant.py +27 -13
  32. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/grad_probe/grad_compare.py +18 -1
  33. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/grad_probe/utils.py +30 -2
  34. mindstudio_probe-1.1.1/msprobe/core/overflow_check/abnormal_scene.py +185 -0
  35. mindstudio_probe-1.1.1/msprobe/core/overflow_check/api_info.py +55 -0
  36. mindstudio_probe-1.1.1/msprobe/core/overflow_check/checker.py +138 -0
  37. mindstudio_probe-1.1.1/msprobe/core/overflow_check/filter.py +157 -0
  38. mindstudio_probe-1.1.1/msprobe/core/overflow_check/ignore_rules.yaml +55 -0
  39. mindstudio_probe-1.1.1/msprobe/core/overflow_check/level.py +22 -0
  40. mindstudio_probe-1.1.1/msprobe/core/overflow_check/utils.py +28 -0
  41. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/01.installation.md +10 -0
  42. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/02.config_introduction.md +49 -22
  43. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/03.config_examples.md +2 -9
  44. mindstudio_probe-1.1.1/msprobe/docs/04.kernel_dump_PyTorch.md +73 -0
  45. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/05.data_dump_PyTorch.md +3 -1
  46. mindstudio_probe-1.1.1/msprobe/docs/06.data_dump_MindSpore.md +352 -0
  47. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/07.accuracy_checker_PyTorch.md +12 -12
  48. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/08.accuracy_checker_online_PyTorch.md +1 -6
  49. mindstudio_probe-1.1.1/msprobe/docs/09.accuracy_checker_MindSpore.md +104 -0
  50. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/10.accuracy_compare_PyTorch.md +19 -13
  51. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/11.accuracy_compare_MindSpore.md +104 -13
  52. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/12.overflow_check_PyTorch.md +1 -1
  53. mindstudio_probe-1.1.1/msprobe/docs/13.overflow_check_MindSpore.md +31 -0
  54. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/15.free_benchmarking_PyTorch.md +4 -5
  55. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/16.free_benchmarking_MindSpore.md +56 -37
  56. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/17.grad_probe.md +5 -6
  57. mindstudio_probe-1.1.1/msprobe/docs/19.monitor.md +468 -0
  58. mindstudio_probe-1.1.1/msprobe/docs/20.monitor_performance_baseline.md +52 -0
  59. mindstudio_probe-1.1.1/msprobe/docs/21.visualization_PyTorch.md +386 -0
  60. mindstudio_probe-1.1.1/msprobe/docs/22.visualization_MindSpore.md +384 -0
  61. mindstudio_probe-1.1.1/msprobe/docs/23.tool_function_introduction.md +28 -0
  62. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/FAQ.md +3 -0
  63. mindstudio_probe-1.1.1/msprobe/docs/data_dump_Mindspore/dynamic_graph_quick_start_example.md +211 -0
  64. mindstudio_probe-1.1.1/msprobe/docs/img/compare_result.png +0 -0
  65. mindstudio_probe-1.1.1/msprobe/docs/img/monitor/cpu_info.png +0 -0
  66. mindstudio_probe-1.1.1/msprobe/mindspore/__init__.py +17 -0
  67. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/api_accuracy_checker.py +247 -0
  68. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/api_info.py +21 -6
  69. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/api_runner.py +43 -18
  70. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/base_compare_algorithm.py +21 -7
  71. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/checker_support_api.yaml +77 -0
  72. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/cmd_parser.py +68 -0
  73. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/compute_element.py +59 -24
  74. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/data_manager.py +264 -0
  75. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/main.py +33 -0
  76. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/multi_api_accuracy_checker.py +206 -0
  77. mindstudio_probe-1.1.1/msprobe/mindspore/api_accuracy_checker/multi_data_manager.py +58 -0
  78. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/type_mapping.py +22 -5
  79. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/utils.py +34 -17
  80. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/cell_processor.py +33 -12
  81. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/common/const.py +33 -13
  82. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/common/log.py +5 -9
  83. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/common/utils.py +43 -4
  84. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/compare/distributed_compare.py +22 -22
  85. mindstudio_probe-1.1.1/msprobe/mindspore/compare/ms_compare.py +380 -0
  86. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/compare/ms_graph_compare.py +81 -47
  87. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/debugger/debugger_config.py +4 -1
  88. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/debugger/precision_debugger.py +7 -1
  89. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/dump_tool_factory.py +3 -1
  90. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/hook_cell/api_registry.py +12 -2
  91. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/hook_cell/primitive_hooks.py +13 -16
  92. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/hook_cell/support_wrap_ops.yaml +25 -0
  93. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/jit_dump.py +17 -5
  94. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/kernel_graph_dump.py +2 -4
  95. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/kernel_kbyk_dump.py +2 -4
  96. mindstudio_probe-1.1.1/msprobe/mindspore/dym_loader/hook_dynamic_loader.cc +140 -0
  97. mindstudio_probe-1.1.1/msprobe/mindspore/dym_loader/hook_dynamic_loader.h +53 -0
  98. mindstudio_probe-1.1.1/msprobe/mindspore/free_benchmark/api_pynative_self_check.py +237 -0
  99. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/common/handler_params.py +1 -2
  100. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/common/utils.py +19 -4
  101. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/data/support_wrap_ops.yaml +0 -204
  102. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/handler/base_handler.py +3 -3
  103. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/handler/check_handler.py +4 -5
  104. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/handler/fix_handler.py +4 -4
  105. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/handler/handler_factory.py +4 -4
  106. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/add_noise.py +2 -2
  107. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/base_perturbation.py +15 -6
  108. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/bit_noise.py +4 -4
  109. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/exchange_value.py +2 -2
  110. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/improve_precision.py +13 -6
  111. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/perturbation_factory.py +2 -2
  112. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/self_check_tool_factory.py +2 -2
  113. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/global_context.py +28 -8
  114. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/grad_analyzer.py +27 -13
  115. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/grad_monitor.py +16 -1
  116. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/grad_stat_csv.py +33 -5
  117. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/hook.py +24 -10
  118. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/grad_probe/utils.py +18 -5
  119. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/ms_config.py +22 -15
  120. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/overflow_check/kernel_graph_overflow_check.py +2 -4
  121. mindstudio_probe-1.1.1/msprobe/mindspore/runtime.py +19 -0
  122. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/service.py +36 -30
  123. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/task_handler_factory.py +15 -0
  124. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/msprobe.py +24 -7
  125. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/__init__.py +3 -2
  126. mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/common/config.py +132 -0
  127. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/api_precision_compare.py +3 -4
  128. mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/generate_op_script/config_op.json +9 -0
  129. mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/generate_op_script/op_generator.py +454 -0
  130. mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/generate_op_script/operator_replication.template +365 -0
  131. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/data_generate.py +6 -1
  132. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/multi_run_ut.py +19 -14
  133. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py +13 -9
  134. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py +77 -53
  135. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut_utils.py +15 -4
  136. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/attl.py +9 -24
  137. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/client.py +4 -12
  138. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/dump_dispatch.py +9 -4
  139. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/server.py +3 -11
  140. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/utils.py +2 -2
  141. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/confusion_transpose.py +5 -1
  142. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/matmul_backward.py +12 -0
  143. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/npu_fusion_attention.py +100 -6
  144. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/rotary_mul.py +4 -0
  145. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/swiglu.py +10 -2
  146. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/common/parse_json.py +6 -6
  147. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/common/utils.py +56 -5
  148. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/compare/distributed_compare.py +8 -9
  149. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/compare/pt_compare.py +8 -6
  150. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/debugger/debugger_config.py +19 -15
  151. mindstudio_probe-1.1.1/msprobe/pytorch/dump/kernel_dump/kernel_config.py +33 -0
  152. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/common/constant.py +15 -0
  153. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/common/counter.py +15 -0
  154. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/common/enums.py +15 -0
  155. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/common/params.py +8 -1
  156. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/common/utils.py +26 -4
  157. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/compare/grad_saver.py +20 -3
  158. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/compare/single_benchmark.py +2 -0
  159. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/add_noise.py +3 -1
  160. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/bit_noise.py +6 -4
  161. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/change_value.py +2 -0
  162. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/improve_precision.py +4 -0
  163. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/result_handlers/base_handler.py +10 -0
  164. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/result_handlers/fix_handler.py +6 -5
  165. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/grad_probe/grad_monitor.py +23 -6
  166. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/grad_probe/grad_stat_csv.py +40 -10
  167. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/support_wrap_ops.yaml +1 -0
  168. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_functional.py +14 -12
  169. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/module_processer.py +2 -5
  170. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/anomaly_analyse.py +201 -0
  171. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/anomaly_detect.py +340 -0
  172. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/distributed/distributed_ops.yaml +19 -0
  173. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/distributed/stack_blacklist.yaml +5 -0
  174. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/distributed/wrap_distributed.py +272 -0
  175. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/features.py +108 -0
  176. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/module_hook.py +870 -0
  177. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/module_metric.py +193 -0
  178. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/module_spec_verifier.py +93 -0
  179. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/optimizer_collect.py +295 -0
  180. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/unittest/test_monitor.py +145 -0
  181. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/utils.py +250 -0
  182. mindstudio_probe-1.1.1/msprobe/pytorch/monitor/visualizer.py +59 -0
  183. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/__init__.py +2 -3
  184. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/compare.py +29 -38
  185. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/dispatch.py +50 -25
  186. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/dump_compare.py +21 -9
  187. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/single_compare.py +53 -32
  188. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/torch_ops_config.yaml +1 -1
  189. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/online_dispatch/utils.py +49 -21
  190. mindstudio_probe-1.1.1/msprobe/pytorch/parse_tool/__init__.py +0 -0
  191. mindstudio_probe-1.1.1/msprobe/pytorch/parse_tool/lib/__init__.py +0 -0
  192. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/compare.py +12 -18
  193. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/config.py +1 -1
  194. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/parse_tool.py +1 -2
  195. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/utils.py +16 -35
  196. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/visualization.py +2 -0
  197. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/pt_config.py +31 -8
  198. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/service.py +15 -5
  199. mindstudio_probe-1.1.1/msprobe/visualization/__init__.py +14 -0
  200. mindstudio_probe-1.1.1/msprobe/visualization/builder/__init__.py +14 -0
  201. mindstudio_probe-1.1.1/msprobe/visualization/builder/graph_builder.py +165 -0
  202. mindstudio_probe-1.1.1/msprobe/visualization/builder/msprobe_adapter.py +205 -0
  203. mindstudio_probe-1.1.1/msprobe/visualization/compare/__init__.py +14 -0
  204. mindstudio_probe-1.1.1/msprobe/visualization/compare/graph_comparator.py +130 -0
  205. mindstudio_probe-1.1.1/msprobe/visualization/compare/mode_adapter.py +211 -0
  206. mindstudio_probe-1.1.1/msprobe/visualization/graph/__init__.py +14 -0
  207. mindstudio_probe-1.1.1/msprobe/visualization/graph/base_node.py +124 -0
  208. mindstudio_probe-1.1.1/msprobe/visualization/graph/graph.py +200 -0
  209. mindstudio_probe-1.1.1/msprobe/visualization/graph/node_colors.py +95 -0
  210. mindstudio_probe-1.1.1/msprobe/visualization/graph/node_op.py +39 -0
  211. mindstudio_probe-1.1.1/msprobe/visualization/graph_service.py +214 -0
  212. mindstudio_probe-1.1.1/msprobe/visualization/utils.py +232 -0
  213. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/setup.py +4 -5
  214. mindstudio-probe-1.1.0/msprobe/core/compare/utils.py +0 -464
  215. mindstudio-probe-1.1.0/msprobe/docs/04.acl_config_examples.md +0 -78
  216. mindstudio-probe-1.1.0/msprobe/docs/06.data_dump_MindSpore.md +0 -285
  217. mindstudio-probe-1.1.0/msprobe/docs/09.accuracy_checker_MindSpore.md +0 -68
  218. mindstudio-probe-1.1.0/msprobe/docs/13.overflow_check_MindSpore.md +0 -31
  219. mindstudio-probe-1.1.0/msprobe/mindspore/__init__.py +0 -2
  220. mindstudio-probe-1.1.0/msprobe/mindspore/api_accuracy_checker/api_accuracy_checker.py +0 -279
  221. mindstudio-probe-1.1.0/msprobe/mindspore/api_accuracy_checker/cmd_parser.py +0 -6
  222. mindstudio-probe-1.1.0/msprobe/mindspore/api_accuracy_checker/main.py +0 -9
  223. mindstudio-probe-1.1.0/msprobe/mindspore/compare/layer_mapping.py +0 -146
  224. mindstudio-probe-1.1.0/msprobe/mindspore/compare/modify_mapping.py +0 -107
  225. mindstudio-probe-1.1.0/msprobe/mindspore/compare/ms_compare.py +0 -357
  226. mindstudio-probe-1.1.0/msprobe/mindspore/free_benchmark/api_pynative_self_check.py +0 -131
  227. mindstudio-probe-1.1.0/msprobe/mindspore/free_benchmark/decorator/dec_forward.py +0 -57
  228. mindstudio-probe-1.1.0/msprobe/mindspore/free_benchmark/decorator/decorator_factory.py +0 -122
  229. mindstudio-probe-1.1.0/msprobe/mindspore/runtime.py +0 -4
  230. mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker/common/config.py +0 -70
  231. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/LICENSE +0 -0
  232. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/MANIFEST.in +0 -0
  233. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/dependency_links.txt +0 -0
  234. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/not-zip-safe +0 -0
  235. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/mindstudio_probe.egg-info/top_level.txt +0 -0
  236. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/__init__.py +0 -0
  237. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/__init__.py +0 -0
  238. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/advisor/advisor_const.py +0 -0
  239. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/advisor/advisor_result.py +0 -0
  240. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/common/inplace_ops.yaml +0 -0
  241. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/compare/multiprocessing_compute.py +0 -0
  242. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/data_processor/factory.py +0 -0
  243. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/data_dump/json_writer.py +0 -0
  244. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/core/grad_probe/__init__.py +0 -0
  245. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/14.data_parse_PyTorch.md +0 -0
  246. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/18.online_dispatch.md +0 -0
  247. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/S02.report_free_benchmarking_validation_performance_baseline.md +0 -0
  248. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/BLOOM-7B_1.png +0 -0
  249. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/BLOOM-7B_2.png +0 -0
  250. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/BLOOM-7B_3.png +0 -0
  251. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/BLOOM-7B_4.png +0 -0
  252. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_1.png +0 -0
  253. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_2.png +0 -0
  254. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_3.png +0 -0
  255. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_4.png +0 -0
  256. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_5.png +0 -0
  257. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_6.png +0 -0
  258. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_7.png +0 -0
  259. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/GPT-3_8.png +0 -0
  260. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/YOLOV5S_1.png +0 -0
  261. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/YOLOV5S_2.png +0 -0
  262. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/accuracy_checking_details.png +0 -0
  263. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/accuracy_checking_result.png +0 -0
  264. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/api_precision_compare_details.png +0 -0
  265. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/api_precision_compare_result.png +0 -0
  266. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/auto_analyze_log.png +0 -0
  267. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/compare_result_pkl.png +0 -0
  268. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/compare_result_pkl_md5.png.png +0 -0
  269. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/cpu_info.png +0 -0
  270. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/free_benchmark.png +0 -0
  271. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/free_benchmark_framework.png +0 -0
  272. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/grad_probe_image-1.png +0 -0
  273. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/grad_probe_image-2.png +0 -0
  274. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/grad_probe_image-3.png +0 -0
  275. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/grad_probe_image-4.png +0 -0
  276. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/grad_probe_image.png +0 -0
  277. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/module_compare.png +0 -0
  278. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/ms_dump.png +0 -0
  279. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/ms_layer.png +0 -0
  280. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/docs/img/pt_dump.png +0 -0
  281. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/api_accuracy_checker/__init__.py +0 -0
  282. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/compare/ms_to_pt_api.yaml +0 -0
  283. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/debugger/__init__.py +0 -0
  284. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/__init__.py +0 -0
  285. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/hook_cell/hook_cell.py +0 -0
  286. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/dump/hook_cell/wrap_api.py +0 -0
  287. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/__init__.py +0 -0
  288. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/common/__init__.py +0 -0
  289. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/common/config.py +0 -0
  290. {mindstudio-probe-1.1.0/msprobe/mindspore/free_benchmark/decorator → mindstudio_probe-1.1.1/msprobe/mindspore/free_benchmark/handler}/__init__.py +0 -0
  291. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/free_benchmark/perturbation/no_change.py +0 -0
  292. {mindstudio-probe-1.1.0/msprobe/mindspore/free_benchmark/handler → mindstudio_probe-1.1.1/msprobe/mindspore/grad_probe}/__init__.py +0 -0
  293. {mindstudio-probe-1.1.0/msprobe/mindspore/grad_probe → mindstudio_probe-1.1.1/msprobe/mindspore/overflow_check}/__init__.py +0 -0
  294. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/mindspore/overflow_check/overflow_check_tool_factory.py +0 -0
  295. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/.keep +0 -0
  296. {mindstudio-probe-1.1.0/msprobe/mindspore/overflow_check → mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker}/__init__.py +0 -0
  297. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/common/.keep +0 -0
  298. {mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker → mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/common}/__init__.py +0 -0
  299. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/common/utils.py +0 -0
  300. {mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker/common → mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/compare}/__init__.py +0 -0
  301. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/algorithm.py +0 -0
  302. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/api_precision_standard.yaml +0 -0
  303. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/api_precision_threshold.yaml +0 -0
  304. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/compare.py +0 -0
  305. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/compare_column.py +0 -0
  306. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/compare/compare_utils.py +0 -0
  307. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/config.yaml +0 -0
  308. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/.keep +0 -0
  309. {mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker/compare → mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/run_ut}/__init__.py +0 -0
  310. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/run_ut/torch_ut_setting.json +0 -0
  311. {mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker/run_ut → mindstudio_probe-1.1.1/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer}/__init__.py +0 -0
  312. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/device_dispatch.py +0 -0
  313. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer/torch_ops_config.yaml +0 -0
  314. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/__init__.py +0 -0
  315. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/apply_adam_w.py +0 -0
  316. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/fast_gelu.py +0 -0
  317. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/layer_norm_eval.py +0 -0
  318. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/linear.py +0 -0
  319. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/rms_norm.py +0 -0
  320. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/bench_functions/scaled_mask_softmax.py +0 -0
  321. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/common/__init__.py +0 -0
  322. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/common/compare_script.template +0 -0
  323. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/common/log.py +0 -0
  324. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/compare/mapping.yaml +0 -0
  325. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/compare/match.py +0 -0
  326. {mindstudio-probe-1.1.0/msprobe/pytorch/api_accuracy_checker/tensor_transport_layer → mindstudio_probe-1.1.1/msprobe/pytorch/debugger}/__init__.py +0 -0
  327. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/debugger/precision_debugger.py +0 -0
  328. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/__init__.py +0 -0
  329. {mindstudio-probe-1.1.0/msprobe/pytorch/debugger → mindstudio_probe-1.1.1/msprobe/pytorch/free_benchmark/common}/__init__.py +0 -0
  330. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/main.py +0 -0
  331. {mindstudio-probe-1.1.0/msprobe/pytorch/free_benchmark/common → mindstudio_probe-1.1.1/msprobe/pytorch/free_benchmark/perturbed_layers}/__init__.py +0 -0
  332. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/base_layer.py +0 -0
  333. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/layer_factory.py +0 -0
  334. {mindstudio-probe-1.1.0/msprobe/pytorch/free_benchmark/perturbed_layers → mindstudio_probe-1.1.1/msprobe/pytorch/free_benchmark/perturbed_layers/npu}/__init__.py +0 -0
  335. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/no_change.py +0 -0
  336. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/npu/npu_base_layser.py +0 -0
  337. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/perturbed_layers/run_cpu.py +0 -0
  338. {mindstudio-probe-1.1.0/msprobe/pytorch/free_benchmark/perturbed_layers/npu → mindstudio_probe-1.1.1/msprobe/pytorch/free_benchmark/result_handlers}/__init__.py +0 -0
  339. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/result_handlers/check_handler.py +0 -0
  340. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/result_handlers/handler_factory.py +0 -0
  341. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/free_benchmark/result_handlers/preheat_handler.py +0 -0
  342. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/function_factory.py +0 -0
  343. {mindstudio-probe-1.1.0/msprobe/pytorch/free_benchmark/result_handlers → mindstudio_probe-1.1.1/msprobe/pytorch/functional}/__init__.py +0 -0
  344. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/functional/module_dump.py +0 -0
  345. {mindstudio-probe-1.1.0/msprobe/pytorch/functional → mindstudio_probe-1.1.1/msprobe/pytorch/grad_probe}/__init__.py +0 -0
  346. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/__init__.py +0 -0
  347. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/api_registry.py +0 -0
  348. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/hook_module.py +0 -0
  349. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/utils.py +0 -0
  350. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_aten.py +0 -0
  351. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_distributed.py +0 -0
  352. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_npu_custom.py +0 -0
  353. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_tensor.py +0 -0
  354. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_torch.py +0 -0
  355. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/hook_module/wrap_vf.py +0 -0
  356. {mindstudio-probe-1.1.0/msprobe/pytorch/grad_probe → mindstudio_probe-1.1.1/msprobe/pytorch/monitor}/__init__.py +0 -0
  357. {mindstudio-probe-1.1.0/msprobe/pytorch/parse_tool → mindstudio_probe-1.1.1/msprobe/pytorch/monitor/distributed}/__init__.py +0 -0
  358. {mindstudio-probe-1.1.0/msprobe/pytorch/parse_tool/lib → mindstudio_probe-1.1.1/msprobe/pytorch/monitor/unittest}/__init__.py +0 -0
  359. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse.py +0 -0
  360. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/cli.py +0 -0
  361. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/file_desc.py +0 -0
  362. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/interactive_cli.py +0 -0
  363. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/msprobe/pytorch/parse_tool/lib/parse_exception.py +0 -0
  364. {mindstudio-probe-1.1.0 → mindstudio_probe-1.1.1}/setup.cfg +0 -0
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mindstudio-probe
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Pytorch Ascend Probe Utils
5
5
  Home-page: https://gitee.com/ascend/mstt/tree/master/debug/accuracy_tools/msprobe
6
6
  Author: Ascend Team
7
7
  Author-email: pmail_mindstudio@huawei.com
8
8
  License: Apache License 2.0
9
9
  Keywords: pytorch msprobe ascend
10
- Platform: UNKNOWN
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: Intended Audience :: Education
13
12
  Classifier: Intended Audience :: Science/Research
@@ -20,6 +19,18 @@ Classifier: Topic :: Software Development :: Libraries
20
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
20
  Requires-Python: >=3.6.2
22
21
  License-File: LICENSE
22
+ Requires-Dist: wheel
23
+ Requires-Dist: einops
24
+ Requires-Dist: numpy<2.0
25
+ Requires-Dist: pandas<2.1,>=1.3.5
26
+ Requires-Dist: pyyaml
27
+ Requires-Dist: rich
28
+ Requires-Dist: tqdm
29
+ Requires-Dist: openpyxl
30
+ Requires-Dist: pyopenssl
31
+ Requires-Dist: twisted
32
+ Requires-Dist: matplotlib
33
+ Requires-Dist: tensorboard
34
+ Requires-Dist: tabulate
23
35
 
24
36
  MindStudio-Probe is a set of tools for diagnosing and improving model accuracy on Ascend NPU, including API acc checker, ptdbg, grad tool etc.
25
-
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mindstudio-probe
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Pytorch Ascend Probe Utils
5
5
  Home-page: https://gitee.com/ascend/mstt/tree/master/debug/accuracy_tools/msprobe
6
6
  Author: Ascend Team
7
7
  Author-email: pmail_mindstudio@huawei.com
8
8
  License: Apache License 2.0
9
9
  Keywords: pytorch msprobe ascend
10
- Platform: UNKNOWN
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: Intended Audience :: Education
13
12
  Classifier: Intended Audience :: Science/Research
@@ -20,6 +19,18 @@ Classifier: Topic :: Software Development :: Libraries
20
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
20
  Requires-Python: >=3.6.2
22
21
  License-File: LICENSE
22
+ Requires-Dist: wheel
23
+ Requires-Dist: einops
24
+ Requires-Dist: numpy<2.0
25
+ Requires-Dist: pandas<2.1,>=1.3.5
26
+ Requires-Dist: pyyaml
27
+ Requires-Dist: rich
28
+ Requires-Dist: tqdm
29
+ Requires-Dist: openpyxl
30
+ Requires-Dist: pyopenssl
31
+ Requires-Dist: twisted
32
+ Requires-Dist: matplotlib
33
+ Requires-Dist: tensorboard
34
+ Requires-Dist: tabulate
23
35
 
24
36
  MindStudio-Probe is a set of tools for diagnosing and improving model accuracy on Ascend NPU, including API acc checker, ptdbg, grad tool etc.
25
-
@@ -31,6 +31,10 @@ msprobe/core/compare/highlight.py
31
31
  msprobe/core/compare/multiprocessing_compute.py
32
32
  msprobe/core/compare/npy_compare.py
33
33
  msprobe/core/compare/utils.py
34
+ msprobe/core/compare/layer_mapping/__init__.py
35
+ msprobe/core/compare/layer_mapping/data_scope_parser.py
36
+ msprobe/core/compare/layer_mapping/layer_mapping.py
37
+ msprobe/core/compare/layer_mapping/postprocess_pass.py
34
38
  msprobe/core/data_dump/data_collector.py
35
39
  msprobe/core/data_dump/json_writer.py
36
40
  msprobe/core/data_dump/scope.py
@@ -42,10 +46,17 @@ msprobe/core/grad_probe/__init__.py
42
46
  msprobe/core/grad_probe/constant.py
43
47
  msprobe/core/grad_probe/grad_compare.py
44
48
  msprobe/core/grad_probe/utils.py
49
+ msprobe/core/overflow_check/abnormal_scene.py
50
+ msprobe/core/overflow_check/api_info.py
51
+ msprobe/core/overflow_check/checker.py
52
+ msprobe/core/overflow_check/filter.py
53
+ msprobe/core/overflow_check/ignore_rules.yaml
54
+ msprobe/core/overflow_check/level.py
55
+ msprobe/core/overflow_check/utils.py
45
56
  msprobe/docs/01.installation.md
46
57
  msprobe/docs/02.config_introduction.md
47
58
  msprobe/docs/03.config_examples.md
48
- msprobe/docs/04.acl_config_examples.md
59
+ msprobe/docs/04.kernel_dump_PyTorch.md
49
60
  msprobe/docs/05.data_dump_PyTorch.md
50
61
  msprobe/docs/06.data_dump_MindSpore.md
51
62
  msprobe/docs/07.accuracy_checker_PyTorch.md
@@ -60,8 +71,14 @@ msprobe/docs/15.free_benchmarking_PyTorch.md
60
71
  msprobe/docs/16.free_benchmarking_MindSpore.md
61
72
  msprobe/docs/17.grad_probe.md
62
73
  msprobe/docs/18.online_dispatch.md
74
+ msprobe/docs/19.monitor.md
75
+ msprobe/docs/20.monitor_performance_baseline.md
76
+ msprobe/docs/21.visualization_PyTorch.md
77
+ msprobe/docs/22.visualization_MindSpore.md
78
+ msprobe/docs/23.tool_function_introduction.md
63
79
  msprobe/docs/FAQ.md
64
80
  msprobe/docs/S02.report_free_benchmarking_validation_performance_baseline.md
81
+ msprobe/docs/data_dump_Mindspore/dynamic_graph_quick_start_example.md
65
82
  msprobe/docs/img/BLOOM-7B_1.png
66
83
  msprobe/docs/img/BLOOM-7B_2.png
67
84
  msprobe/docs/img/BLOOM-7B_3.png
@@ -81,6 +98,7 @@ msprobe/docs/img/accuracy_checking_result.png
81
98
  msprobe/docs/img/api_precision_compare_details.png
82
99
  msprobe/docs/img/api_precision_compare_result.png
83
100
  msprobe/docs/img/auto_analyze_log.png
101
+ msprobe/docs/img/compare_result.png
84
102
  msprobe/docs/img/compare_result_pkl.png
85
103
  msprobe/docs/img/compare_result_pkl_md5.png.png
86
104
  msprobe/docs/img/cpu_info.png
@@ -95,6 +113,7 @@ msprobe/docs/img/module_compare.png
95
113
  msprobe/docs/img/ms_dump.png
96
114
  msprobe/docs/img/ms_layer.png
97
115
  msprobe/docs/img/pt_dump.png
116
+ msprobe/docs/img/monitor/cpu_info.png
98
117
  msprobe/mindspore/__init__.py
99
118
  msprobe/mindspore/cell_processor.py
100
119
  msprobe/mindspore/ms_config.py
@@ -106,17 +125,19 @@ msprobe/mindspore/api_accuracy_checker/api_accuracy_checker.py
106
125
  msprobe/mindspore/api_accuracy_checker/api_info.py
107
126
  msprobe/mindspore/api_accuracy_checker/api_runner.py
108
127
  msprobe/mindspore/api_accuracy_checker/base_compare_algorithm.py
128
+ msprobe/mindspore/api_accuracy_checker/checker_support_api.yaml
109
129
  msprobe/mindspore/api_accuracy_checker/cmd_parser.py
110
130
  msprobe/mindspore/api_accuracy_checker/compute_element.py
131
+ msprobe/mindspore/api_accuracy_checker/data_manager.py
111
132
  msprobe/mindspore/api_accuracy_checker/main.py
133
+ msprobe/mindspore/api_accuracy_checker/multi_api_accuracy_checker.py
134
+ msprobe/mindspore/api_accuracy_checker/multi_data_manager.py
112
135
  msprobe/mindspore/api_accuracy_checker/type_mapping.py
113
136
  msprobe/mindspore/api_accuracy_checker/utils.py
114
137
  msprobe/mindspore/common/const.py
115
138
  msprobe/mindspore/common/log.py
116
139
  msprobe/mindspore/common/utils.py
117
140
  msprobe/mindspore/compare/distributed_compare.py
118
- msprobe/mindspore/compare/layer_mapping.py
119
- msprobe/mindspore/compare/modify_mapping.py
120
141
  msprobe/mindspore/compare/ms_compare.py
121
142
  msprobe/mindspore/compare/ms_graph_compare.py
122
143
  msprobe/mindspore/compare/ms_to_pt_api.yaml
@@ -133,6 +154,8 @@ msprobe/mindspore/dump/hook_cell/hook_cell.py
133
154
  msprobe/mindspore/dump/hook_cell/primitive_hooks.py
134
155
  msprobe/mindspore/dump/hook_cell/support_wrap_ops.yaml
135
156
  msprobe/mindspore/dump/hook_cell/wrap_api.py
157
+ msprobe/mindspore/dym_loader/hook_dynamic_loader.cc
158
+ msprobe/mindspore/dym_loader/hook_dynamic_loader.h
136
159
  msprobe/mindspore/free_benchmark/__init__.py
137
160
  msprobe/mindspore/free_benchmark/api_pynative_self_check.py
138
161
  msprobe/mindspore/free_benchmark/self_check_tool_factory.py
@@ -141,9 +164,6 @@ msprobe/mindspore/free_benchmark/common/config.py
141
164
  msprobe/mindspore/free_benchmark/common/handler_params.py
142
165
  msprobe/mindspore/free_benchmark/common/utils.py
143
166
  msprobe/mindspore/free_benchmark/data/support_wrap_ops.yaml
144
- msprobe/mindspore/free_benchmark/decorator/__init__.py
145
- msprobe/mindspore/free_benchmark/decorator/dec_forward.py
146
- msprobe/mindspore/free_benchmark/decorator/decorator_factory.py
147
167
  msprobe/mindspore/free_benchmark/handler/__init__.py
148
168
  msprobe/mindspore/free_benchmark/handler/base_handler.py
149
169
  msprobe/mindspore/free_benchmark/handler/check_handler.py
@@ -187,6 +207,9 @@ msprobe/pytorch/api_accuracy_checker/compare/api_precision_threshold.yaml
187
207
  msprobe/pytorch/api_accuracy_checker/compare/compare.py
188
208
  msprobe/pytorch/api_accuracy_checker/compare/compare_column.py
189
209
  msprobe/pytorch/api_accuracy_checker/compare/compare_utils.py
210
+ msprobe/pytorch/api_accuracy_checker/generate_op_script/config_op.json
211
+ msprobe/pytorch/api_accuracy_checker/generate_op_script/op_generator.py
212
+ msprobe/pytorch/api_accuracy_checker/generate_op_script/operator_replication.template
190
213
  msprobe/pytorch/api_accuracy_checker/run_ut/.keep
191
214
  msprobe/pytorch/api_accuracy_checker/run_ut/__init__.py
192
215
  msprobe/pytorch/api_accuracy_checker/run_ut/data_generate.py
@@ -227,6 +250,7 @@ msprobe/pytorch/compare/pt_compare.py
227
250
  msprobe/pytorch/debugger/__init__.py
228
251
  msprobe/pytorch/debugger/debugger_config.py
229
252
  msprobe/pytorch/debugger/precision_debugger.py
253
+ msprobe/pytorch/dump/kernel_dump/kernel_config.py
230
254
  msprobe/pytorch/free_benchmark/__init__.py
231
255
  msprobe/pytorch/free_benchmark/main.py
232
256
  msprobe/pytorch/free_benchmark/common/__init__.py
@@ -271,6 +295,22 @@ msprobe/pytorch/hook_module/wrap_npu_custom.py
271
295
  msprobe/pytorch/hook_module/wrap_tensor.py
272
296
  msprobe/pytorch/hook_module/wrap_torch.py
273
297
  msprobe/pytorch/hook_module/wrap_vf.py
298
+ msprobe/pytorch/monitor/__init__.py
299
+ msprobe/pytorch/monitor/anomaly_analyse.py
300
+ msprobe/pytorch/monitor/anomaly_detect.py
301
+ msprobe/pytorch/monitor/features.py
302
+ msprobe/pytorch/monitor/module_hook.py
303
+ msprobe/pytorch/monitor/module_metric.py
304
+ msprobe/pytorch/monitor/module_spec_verifier.py
305
+ msprobe/pytorch/monitor/optimizer_collect.py
306
+ msprobe/pytorch/monitor/utils.py
307
+ msprobe/pytorch/monitor/visualizer.py
308
+ msprobe/pytorch/monitor/distributed/__init__.py
309
+ msprobe/pytorch/monitor/distributed/distributed_ops.yaml
310
+ msprobe/pytorch/monitor/distributed/stack_blacklist.yaml
311
+ msprobe/pytorch/monitor/distributed/wrap_distributed.py
312
+ msprobe/pytorch/monitor/unittest/__init__.py
313
+ msprobe/pytorch/monitor/unittest/test_monitor.py
274
314
  msprobe/pytorch/online_dispatch/__init__.py
275
315
  msprobe/pytorch/online_dispatch/compare.py
276
316
  msprobe/pytorch/online_dispatch/dispatch.py
@@ -288,4 +328,18 @@ msprobe/pytorch/parse_tool/lib/interactive_cli.py
288
328
  msprobe/pytorch/parse_tool/lib/parse_exception.py
289
329
  msprobe/pytorch/parse_tool/lib/parse_tool.py
290
330
  msprobe/pytorch/parse_tool/lib/utils.py
291
- msprobe/pytorch/parse_tool/lib/visualization.py
331
+ msprobe/pytorch/parse_tool/lib/visualization.py
332
+ msprobe/visualization/__init__.py
333
+ msprobe/visualization/graph_service.py
334
+ msprobe/visualization/utils.py
335
+ msprobe/visualization/builder/__init__.py
336
+ msprobe/visualization/builder/graph_builder.py
337
+ msprobe/visualization/builder/msprobe_adapter.py
338
+ msprobe/visualization/compare/__init__.py
339
+ msprobe/visualization/compare/graph_comparator.py
340
+ msprobe/visualization/compare/mode_adapter.py
341
+ msprobe/visualization/graph/__init__.py
342
+ msprobe/visualization/graph/base_node.py
343
+ msprobe/visualization/graph/graph.py
344
+ msprobe/visualization/graph/node_colors.py
345
+ msprobe/visualization/graph/node_op.py
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  msprobe = msprobe.msprobe:main
3
-
@@ -9,3 +9,5 @@ openpyxl
9
9
  pyopenssl
10
10
  twisted
11
11
  matplotlib
12
+ tensorboard
13
+ tabulate
@@ -9,7 +9,7 @@
9
9
  为方便使用,本工具提供了统一、简易的程序接口:**PrecisionDebugger**。以 PyTorch 框架为例,通过以下示例模板和 **config.json** 可以轻松使用各种功能。
10
10
 
11
11
  ```python
12
- from msprobe.pytorch import PrecisionDebugger
12
+ from msprobe.pytorch import PrecisionDebugger
13
13
 
14
14
  debugger = PrecisionDebugger(config_path='./config.json')
15
15
  ...
@@ -33,12 +33,34 @@ export MSPROBE_LOG_LEVEL={x}
33
33
  ```
34
34
  **config.json** 的配置要求和各功能具体的使用指导详见后续章节。
35
35
 
36
+ ## 环境和依赖
37
+
38
+ - 硬件环境请参见《[昇腾产品形态说明](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2Fcanncommercial%2F80RC22%2Fquickstart%2Fquickstart%2Fquickstart_18_0002.html)》。
39
+ - 软件环境请参见《[CANN 软件安装指南](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fdocument%2Fdetail%2Fzh%2Fcanncommercial%2F80RC22%2Fsoftwareinst%2Finstg%2Finstg_0000.html%3FMode%3DPmIns%26OS%3DUbuntu%26Software%3DcannToolKit)》安装昇腾设备开发或运行环境,即toolkit软件包。
40
+
41
+ 以上环境依赖请根据实际环境选择适配的版本。
42
+
43
+ ## 版本配套说明
44
+
45
+ - msprobe支持AscendPyTorch 1.11.0或更高版本,支持的PyTorch和CANN以及PyTorch和python软件版本配套关系请参见《[Ascend Extension for PyTorch插件](https://gitee.com/ascend/pytorch)》。
46
+ - msprobe支持MindSpore 2.4.0或更高版本,支持的MindSpore和CANN以及MindSpore和python软件版本配套关系请参见《[MindSpore版本发布列表](https://www.mindspore.cn/versions)》。
47
+ - msprobe支持的固件驱动版本与配套CANN软件支持的固件驱动版本相同,开发者可通过“[昇腾社区-固件与驱动](https://gitee.com/link?target=https%3A%2F%2Fwww.hiascend.com%2Fhardware%2Ffirmware-drivers%2Fcommunity%3Fproduct%3D2%26model%3D28%26cann%3D8.0.RC3.alpha003%26driver%3D1.0.25.alpha)”页面根据产品型号与CANN软件版本获取配套的固件与驱动。
48
+
49
+
50
+ ## 🚨 工具限制与注意事项
51
+
52
+ **1. Pytorch 框架下,工具暂不支持 Fully Sharded Data Parallel(FSDP)。**
53
+
36
54
  ## ⚙️ [安装](./docs/01.installation.md)
37
55
 
38
56
  ## 🛠️ config.json [介绍](./docs/02.config_introduction.md) 和 [示例](./docs/03.config_examples.md)
39
57
 
40
58
  ## 🧰 主要功能
41
59
 
60
+ ### 0 用前必看
61
+
62
+ 使用工具前,建议先浏览[**工具功能模块简介、适用场景和当前版本局限性**](./docs/23.tool_function_introduction.md),了解功能特性。
63
+
42
64
  ### 1 数据采集
43
65
 
44
66
  msprobe 通过在训练脚本中添加 PrecisionDebugger 接口的方式对 API 执行精度数据 dump 操作,对应 config.json 中的 task 为 statistics 或 tensor。
@@ -95,9 +117,23 @@ MindSpore 动态图场景的[离线预检](./docs/09.accuracy_checker_MindSpore.
95
117
 
96
118
  [PyTorch 场景的在线精度比对](./docs/18.online_dispatch.md)
97
119
 
120
+ ### 9 训练状态监控
121
+
122
+ 该功能收集和聚合模型训练过程中的网络层,优化器, 通信算子的中间值,帮助诊断模型训练过程中计算, 通信,优化器各部分出现的异常情况。
123
+
124
+ [PyTorch 场景的训练状态监控](./docs/19.monitor.md)
125
+
126
+ ### 10 分级可视化构图比对
127
+
128
+ 该功能将msprobe工具dump的精度数据进行解析,还原模型图结构,实现模型各个层级的精度数据比对,方便用户理解模型结构、分析精度问题。
129
+
130
+ [PyTorch 场景的分级可视化构图比对](./docs/21.visualization_PyTorch.md)
131
+
132
+ [MindSpore 场景的分级可视化构图比对](./docs/22.visualization_MindSpore.md)
133
+
98
134
  ## 🌟 新版本特性
99
135
 
100
- 若查看历史版本特性,请点击[安装](./docs/01.installation.md)。
136
+ 若查看历史版本特性,请参见[安装](./docs/01.installation.md)。
101
137
 
102
138
  【数据采集】
103
139
  - 支持 config.json 中的 step 传入范围;
@@ -128,4 +164,4 @@ MindSpore 动态图场景的[离线预检](./docs/09.accuracy_checker_MindSpore.
128
164
 
129
165
  ## ❓ FAQ
130
166
 
131
- [FAQ for PyTorch](./docs/FAQ_PyTorch.md)
167
+ [FAQ for PyTorch](./docs/FAQ.md)
@@ -5,12 +5,10 @@
5
5
  "step": [],
6
6
  "level": "L1",
7
7
  "enable_dataloader": false,
8
- "acl_config": "",
9
8
  "tensor": {
10
9
  "scope": [],
11
10
  "list":[],
12
- "data_mode": ["all"],
13
- "backward_input": [],
11
+ "data_mode": ["all"],
14
12
  "file_format": "npy"
15
13
  },
16
14
  "statistics": {
@@ -62,7 +62,12 @@ class Advisor:
62
62
  .format(item[CompareConst.NPU_NAME]))
63
63
 
64
64
  def gen_advisor_result(self, pd_data):
65
- first_failing_data = pd_data.iloc[0]
65
+ try:
66
+ first_failing_data = pd_data.iloc[0]
67
+ except IndexError as e:
68
+ err_msg = "index out of bounds error occurs, pd_data is empty, please check!"
69
+ logger.error(err_msg)
70
+ raise CompareException(CompareException.INDEX_OUT_OF_BOUNDS_ERROR) from e
66
71
  node_name = first_failing_data[CompareConst.NPU_NAME]
67
72
  index = first_failing_data['index']
68
73
  message = self.gen_advisor_message(node_name)
@@ -87,7 +92,7 @@ class Advisor:
87
92
  return message
88
93
 
89
94
  def analysis(self):
90
- self._check_path_vaild()
95
+ self._check_path_valid()
91
96
  analyze_data = self._parse_input_data()
92
97
  logger.info("Start analyzing the comparison result: %s" % self.file_type)
93
98
  self.analyze_unmatched(analyze_data)
@@ -119,6 +124,6 @@ class Advisor:
119
124
  df = self.input_data.reset_index()
120
125
  return df
121
126
 
122
- def _check_path_vaild(self):
127
+ def _check_path_valid(self):
123
128
  out_path_checker = FileChecker(self.out_path, FileCheckConst.DIR, FileCheckConst.WRITE_ABLE)
124
129
  out_path_checker.common_check()
@@ -1,3 +1,18 @@
1
+ # Copyright (c) 2024-2024, Huawei Technologies Co., Ltd.
2
+ # All rights reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
1
16
  import os
2
17
  import stat
3
18
 
@@ -10,6 +25,7 @@ class Const:
10
25
  """
11
26
  TOOL_NAME = "msprobe"
12
27
 
28
+ ipv4_pattern = "([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(\.([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])){3}$"
13
29
  SEP = "."
14
30
  REGEX_PREFIX_MAX_LENGTH = 20
15
31
  REGEX_PREFIX_PATTERN = r"^[a-zA-Z0-9_-]+$"
@@ -20,6 +36,8 @@ class Const:
20
36
  OFF = 'OFF'
21
37
  BACKWARD = 'backward'
22
38
  FORWARD = 'forward'
39
+ PROGRESS_TIMEOUT = 3000
40
+ EXCEPTION_NONE = None
23
41
  JIT = 'Jit'
24
42
  PRIMITIVE_PREFIX = 'Primitive'
25
43
  DEFAULT_LIST = []
@@ -82,6 +100,7 @@ class Const:
82
100
  GRAD_PROBE = "grad_probe"
83
101
  TASK_LIST = [TENSOR, STATISTICS, OVERFLOW_CHECK, FREE_BENCHMARK, RUN_UT, GRAD_PROBE]
84
102
  DUMP_DATA_COLLECTION_LIST = [STATISTICS, TENSOR]
103
+ DUMP_DATA_MODE_LIST = [ALL, INPUT, OUTPUT, FORWARD, BACKWARD]
85
104
  LEVEL_L0 = "L0"
86
105
  LEVEL_L1 = "L1"
87
106
  LEVEL_L2 = "L2"
@@ -93,6 +112,7 @@ class Const:
93
112
  DATA = "data"
94
113
  PT_FRAMEWORK = "pytorch"
95
114
  MS_FRAMEWORK = "mindspore"
115
+ UNKNOWN_FRAMEWORK = "unknown"
96
116
  DIRECTORY_LENGTH = 4096
97
117
  FILE_NAME_LENGTH = 255
98
118
  FLOAT_TYPE = [np.half, np.single, float, np.double, np.float64, np.longdouble, np.float32, np.float16]
@@ -103,6 +123,8 @@ class Const:
103
123
  CPU_LOWERCASE = 'cpu'
104
124
  CUDA_LOWERCASE = 'cuda'
105
125
  DISTRIBUTED = 'Distributed'
126
+ DUMP_PREFIX = ["Distributed", "Functional", "Torch", "Tensor", "Mint", "MintFunctional", "Primitive",
127
+ "Aten", "VF", "NPU", "Jit"]
106
128
 
107
129
  # struct json param
108
130
  ORIGIN_DATA = "origin_data"
@@ -113,21 +135,25 @@ class Const:
113
135
  MODULE_WHITE_LIST = ["torch", "numpy"]
114
136
 
115
137
  FUNC_SKIP_LIST = ["construct", "__call__"]
116
-
117
- FILE_SKIP_LIST = ["site-packages/mindspore", "package/mindspore", "msprobe", "site-packages/torch", "package/torch"]
138
+ FILE_SKIP_LIST = ["msprobe", "MindSpeed"]
139
+ DATA_TYPE_SKIP_LIST = ["Primitive", "Jit"]
118
140
 
119
141
  STACK_FILE_INDEX = 0
120
-
121
142
  STACK_FUNC_INDEX = 2
122
-
123
143
  STACK_FUNC_ELE_INDEX = 1
124
144
 
125
- CONSTRUCT_NAME_INDEX = -3
126
-
127
- NAME_FIRST_POSSIBLE_INDEX = -4
128
-
129
- NAME_SECOND_POSSIBLE_INDEX = -5
130
-
145
+ SCOPE_ID_INDEX = -1
146
+ SCOPE_DIRECTION_INDEX = -2
147
+ TYPE_NAME_INDEX = -3
148
+ LAYER_NAME_INDEX = -4
149
+ API_TYPE_INDEX = 0
150
+ LEFT_MOVE_INDEX = -1
151
+ RIGHT_MOVE_INDEX = 1
152
+
153
+ TOP_LAYER = "TopLayer"
154
+ CELL = "Cell"
155
+ MODULE = "Module"
156
+ FRAME_FILE_LIST = ["site-packages/torch", "package/torch", "site-packages/mindspore", "package/mindspore"]
131
157
  INPLACE_LIST = [
132
158
  "broadcast", "all_reduce", "reduce", "all_gather", "gather", "scatter", "reduce_scatter",
133
159
  "_reduce_scatter_base", "_all_gather_base", "send", "recv", "irecv", "isend", "all_to_all_single", "all_to_all",
@@ -145,11 +171,12 @@ class Const:
145
171
  FILL_CHAR_NUMS = 50
146
172
  TOOL_ENDS_SUCCESSFULLY = f"{TOOL_NAME} ends successfully."
147
173
  WITHOUT_CALL_STACK = "The call stack retrieval failed."
148
-
174
+
149
175
  STEP = "step"
150
176
  RANK = "rank"
151
177
  HYPHEN = "-"
152
- STEP_RANK_MAXIMUM_RANGE = [int(0), int(1e6)]
178
+ STEP_RANK_MINIMUM_VALUE = 0
179
+ STEP_RANK_MAXIMUM_VALUE = int(1e6)
153
180
 
154
181
  # data type const
155
182
  FLOAT16 = "Float16"
@@ -159,6 +186,13 @@ class Const:
159
186
  TORCH_FLOAT32 = "torch.float32"
160
187
  TORCH_BFLOAT16 = "torch.bfloat16"
161
188
 
189
+ DTYPE = 'dtype'
190
+ SHAPE = 'shape'
191
+ MAX = 'Max'
192
+ MIN = 'Min'
193
+ MEAN = 'Mean'
194
+ NORM = 'Norm'
195
+
162
196
 
163
197
  class CompareConst:
164
198
  """
@@ -201,10 +235,17 @@ class CompareConst:
201
235
  RESULT = "Result"
202
236
  MAGNITUDE = 0.5
203
237
  OP_NAME = "op_name"
238
+ STRUCT = "struct"
204
239
  INPUT_STRUCT = "input_struct"
240
+ KWARGS_STRUCT = "kwargs_struct"
205
241
  OUTPUT_STRUCT = "output_struct"
206
242
  SUMMARY = "summary"
207
243
  MAX_EXCEL_LENGTH = 1048576
244
+ YES = "Yes"
245
+ NO = "No"
246
+ STATISTICS_INDICATOR_NUM = 4
247
+ EPSILON = 1e-10
248
+ COMPARE_ENDS_SUCCESSFULLY = "msprobe compare ends successfully."
208
249
 
209
250
  COMPARE_RESULT_HEADER = [
210
251
  NPU_NAME, BENCH_NAME, NPU_DTYPE, BENCH_DTYPE, NPU_SHAPE, BENCH_SHAPE, COSINE, MAX_ABS_ERR, MAX_RELATIVE_ERR,
@@ -222,6 +263,12 @@ class CompareConst:
222
263
  NPU_NAME, BENCH_NAME, NPU_DTYPE, BENCH_DTYPE, NPU_SHAPE, BENCH_SHAPE, NPU_MD5, BENCH_MD5, RESULT
223
264
  ]
224
265
 
266
+ HEAD_OF_COMPARE_MODE = {
267
+ Const.ALL: COMPARE_RESULT_HEADER,
268
+ Const.SUMMARY: SUMMARY_COMPARE_RESULT_HEADER,
269
+ Const.MD5: MD5_COMPARE_RESULT_HEADER
270
+ }
271
+
225
272
  # compare standard
226
273
  HUNDRED_RATIO_THRESHOLD = 0.01
227
274
  THOUSAND_RATIO_THRESHOLD = 0.001
@@ -241,6 +288,8 @@ class CompareConst:
241
288
  PASS = 'pass'
242
289
  WARNING = 'Warning'
243
290
  ERROR = 'error'
291
+ TRUE = 'TRUE'
292
+ FALSE = 'FALSE'
244
293
  SKIP = 'SKIP'
245
294
  N_A = 'N/A'
246
295
  INF = 'inf'
@@ -298,6 +347,13 @@ class CompareConst:
298
347
  MAX_DIFF: None, MIN_DIFF: None, MEAN_DIFF: None, NORM_DIFF: None, MAX_RELATIVE_ERR: None,
299
348
  MIN_RELATIVE_ERR: None, MEAN_RELATIVE_ERR: None, NORM_RELATIVE_ERR: None
300
349
  }
350
+ INPUT_PATTERN = Const.SEP + Const.INPUT + Const.SEP
351
+ KWARGS_PATTERN = Const.SEP + Const.KWARGS + Const.SEP
352
+ OUTPUT_PATTERN = Const.SEP + Const.OUTPUT + Const.SEP
353
+ COMPARE_KEY = 'compare_key'
354
+ COMPARE_SHAPE = 'compare_shape'
355
+ INTERNAL_API_MAPPING_FILE = 'ms_to_pt_api.yaml'
356
+ UNREADABLE = 'unreadable data'
301
357
 
302
358
 
303
359
  class FileCheckConst:
@@ -322,7 +378,7 @@ class FileCheckConst:
322
378
  MAX_JSON_SIZE = 1073741824 # 1 * 1024 * 1024 * 1024
323
379
  MAX_PT_SIZE = 10737418240 # 10 * 1024 * 1024 * 1024
324
380
  MAX_CSV_SIZE = 1073741824 # 1 * 1024 * 1024 * 1024
325
- MAX_YAML_SIZE = 1048576 # 1 * 1024 * 1024
381
+ MAX_YAML_SIZE = 1073741824 # 1 * 1024 * 1024 * 1024
326
382
  COMMOM_FILE_SIZE = 1048576 # 1 * 1024 * 1024
327
383
  DIR = "dir"
328
384
  FILE = "file"
@@ -351,6 +407,9 @@ class MsCompareConst:
351
407
  # api_info field
352
408
  MINT = "Mint"
353
409
  MINT_FUNCTIONAL = "MintFunctional"
410
+ TENSOR_API = "Tensor"
411
+
412
+ API_NAME_STR_LENGTH = 4
354
413
 
355
414
  TASK_FIELD = "task"
356
415
  STATISTICS_TASK = "statistics"
@@ -358,6 +417,10 @@ class MsCompareConst:
358
417
  DUMP_DATA_DIR_FIELD = "dump_data_dir"
359
418
  DATA_FIELD = "data"
360
419
 
420
+ # supported api yaml
421
+ SUPPORTED_API_LIST_FILE = "checker_support_api.yaml"
422
+ SUPPORTED_TENSOR_LIST_KEY = "tensor"
423
+
361
424
  # detail_csv
362
425
  DETAIL_CSV_API_NAME = "API Name"
363
426
  DETAIL_CSV_BENCH_DTYPE = "Bench Dtype"
@@ -382,15 +445,20 @@ class MsgConst:
382
445
  MSPROBE_LOG_LEVEL = "MSPROBE_LOG_LEVEL"
383
446
  LOG_LEVEL_ENUM = ["0", "1", "2", "3", "4"]
384
447
  LOG_LEVEL = ["DEBUG", "INFO", "WARNING", "ERROR"]
448
+
385
449
  class LogLevel:
386
450
  class DEBUG:
387
451
  value = 0
452
+
388
453
  class INFO:
389
454
  value = 1
455
+
390
456
  class WARNING:
391
457
  value = 2
458
+
392
459
  class ERROR:
393
460
  value = 3
461
+
394
462
  SPECIAL_CHAR = ["\n", "\r", "\u007F", "\b", "\f", "\t", "\u000B", "%08", "%0a", "%0b", "%0c", "%0d", "%7f"]
395
463
 
396
464
  NOT_CREATED_INSTANCE = "PrecisionDebugger instance is not created."
@@ -400,3 +468,35 @@ class GraphMode:
400
468
  NPY_MODE = "NPY_MODE"
401
469
  STATISTIC_MODE = "STATISTIC_MODE"
402
470
  ERROR_MODE = "ERROR_MODE"
471
+
472
+
473
+ class MonitorConst:
474
+ """
475
+ Class for monitor const
476
+ """
477
+ OP_LIST = ["min", "max", "norm", "zeros", "nans", "id", "mean"]
478
+ MONITOR_OUTPUT_DIR = "MONITOR_OUTPUT_DIR"
479
+ DEFAULT_MONITOR_OUTPUT_DIR = "./monitor_output"
480
+ DATABASE = "database"
481
+ EMAIL = "email"
482
+ OPT_TY = ['Megatron_DistributedOptimizer', 'Megatron_Float16OptimizerWithFloat16Params']
483
+ DEEPSPEED_OPT_TY = ("DeepSpeedZeroOptimizer_Stage0", "DeepSpeedZeroOptimizer_Stage1_or_2", "DeepSpeedZeroOptimizer_Stage3")
484
+ RULE_NAME = ['AnomalyTurbulence']
485
+
486
+ DOT = "."
487
+ VPP_SEP = ":"
488
+ ACTV_IN = "input"
489
+ ACTV_OUT = "output"
490
+ ACTVGRAD_IN = "input_grad"
491
+ ACTVGRAD_OUT = "output_grad"
492
+ POST_GRAD = "post_grad"
493
+ PRE_GRAD = "pre_grad"
494
+ PREFIX_POST = "post"
495
+ PREFIX_PRE = "pre"
496
+
497
+
498
+ ANOMALY_JSON = "anomaly.json"
499
+ ANALYSE_JSON = "anomaly_analyse.json"
500
+ TENSORBOARD = "tensorboard"
501
+ CSV = "csv"
502
+ API = "api"