mindspore 2.6.0__cp311-cp311-win_amd64.whl → 2.7.0__cp311-cp311-win_amd64.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.
Potentially problematic release.
This version of mindspore might be problematic. Click here for more details.
- mindspore/.commit_id +1 -1
- mindspore/Microsoft.VisualStudio.Telemetry.dll +0 -0
- mindspore/Newtonsoft.Json.dll +0 -0
- mindspore/__init__.py +2 -2
- mindspore/_c_dataengine.cp311-win_amd64.pyd +0 -0
- mindspore/_c_expression.cp311-win_amd64.pyd +0 -0
- mindspore/_c_mindrecord.cp311-win_amd64.pyd +0 -0
- mindspore/_checkparam.py +42 -11
- mindspore/_extends/builtin_operations.py +3 -3
- mindspore/{_deprecated → _extends/optimize}/__init__.py +9 -3
- mindspore/_extends/optimize/cell_utils.py +96 -0
- mindspore/_extends/parallel_compile/akg_compiler/custom.py +1109 -0
- mindspore/_extends/parallel_compile/akg_compiler/gen_custom_op_files.py +1 -1
- mindspore/_extends/parse/__init__.py +3 -3
- mindspore/_extends/parse/compile_config.py +44 -22
- mindspore/_extends/parse/deprecated/deprecated_tensor_method.py +1 -2
- mindspore/_extends/parse/parser.py +64 -83
- mindspore/_extends/parse/resources.py +39 -0
- mindspore/_extends/parse/standard_method.py +47 -14
- mindspore/_extends/parse/trope.py +8 -1
- mindspore/_extends/pijit/__init__.py +1 -2
- mindspore/_extends/pijit/pijit_func_white_list.py +2 -5
- mindspore/amp.py +4 -22
- mindspore/atlprov.dll +0 -0
- mindspore/avcodec-59.dll +0 -0
- mindspore/avdevice-59.dll +0 -0
- mindspore/avfilter-8.dll +0 -0
- mindspore/avformat-59.dll +0 -0
- mindspore/avutil-57.dll +0 -0
- mindspore/boost/adasum.py +1 -1
- mindspore/boost/boost_cell_wrapper.py +4 -4
- mindspore/c1.dll +0 -0
- mindspore/c1xx.dll +0 -0
- mindspore/c2.dll +0 -0
- mindspore/common/__init__.py +43 -12
- mindspore/common/_grad_function.py +2 -1
- mindspore/common/_pijit_context.py +28 -7
- mindspore/common/_stub_tensor.py +1 -209
- mindspore/common/_tensor_cpp_method.py +1 -1
- mindspore/common/_tensor_docs.py +177 -52
- mindspore/common/_utils.py +9 -1
- mindspore/common/api.py +338 -208
- mindspore/common/dtype.py +108 -57
- mindspore/common/dump.py +11 -16
- mindspore/common/dynamic_shape/__init__.py +0 -0
- mindspore/common/{auto_dynamic_shape.py → dynamic_shape/auto_dynamic_shape.py} +17 -23
- mindspore/common/dynamic_shape/enable_dynamic.py +197 -0
- mindspore/common/file_system.py +59 -9
- mindspore/common/generator.py +2 -3
- mindspore/common/hook_handle.py +33 -5
- mindspore/common/jit_config.py +1 -1
- mindspore/common/jit_trace.py +84 -105
- mindspore/common/np_dtype.py +3 -3
- mindspore/common/parameter.py +27 -29
- mindspore/common/recompute.py +5 -7
- mindspore/common/sparse_tensor.py +0 -3
- mindspore/common/symbol.py +0 -1
- mindspore/common/tensor.py +84 -133
- mindspore/communication/_comm_helper.py +46 -4
- mindspore/communication/management.py +79 -7
- mindspore/context.py +47 -38
- mindspore/dataset/__init__.py +1 -1
- mindspore/dataset/audio/transforms.py +1 -1
- mindspore/dataset/core/config.py +38 -4
- mindspore/dataset/engine/datasets.py +350 -322
- mindspore/dataset/engine/datasets_user_defined.py +69 -23
- mindspore/dataset/engine/iterators.py +2 -2
- mindspore/dataset/engine/obs/config_loader.py +2 -2
- mindspore/dataset/engine/obs/obs_mindrecord_dataset.py +8 -0
- mindspore/dataset/transforms/c_transforms.py +2 -2
- mindspore/dataset/transforms/py_transforms.py +7 -3
- mindspore/dataset/transforms/transforms.py +10 -6
- mindspore/dataset/vision/__init__.py +1 -1
- mindspore/dataset/vision/py_transforms.py +8 -8
- mindspore/dataset/vision/transforms.py +17 -5
- mindspore/dataset/vision/utils.py +632 -21
- mindspore/dataset/vision/validators.py +1 -0
- mindspore/device_context/ascend/device.py +1 -1
- mindspore/device_context/ascend/op_tuning.py +35 -1
- mindspore/device_context/gpu/__init__.py +2 -2
- mindspore/device_context/gpu/device.py +1 -1
- mindspore/device_context/gpu/op_precision.py +4 -2
- mindspore/device_context/gpu/op_tuning.py +6 -3
- mindspore/device_manager.py +16 -9
- mindspore/dnnl.dll +0 -0
- mindspore/dpcmi.dll +0 -0
- mindspore/experimental/llm_boost/ascend_native/llama_boost_ascend_native.py +5 -4
- mindspore/experimental/llm_boost/atb/boost_base.py +2 -3
- mindspore/experimental/optim/adadelta.py +13 -20
- mindspore/experimental/optim/adagrad.py +15 -22
- mindspore/experimental/optim/adam.py +17 -24
- mindspore/experimental/optim/adamax.py +14 -22
- mindspore/experimental/optim/adamw.py +28 -34
- mindspore/experimental/optim/asgd.py +15 -25
- mindspore/experimental/optim/lr_scheduler.py +27 -45
- mindspore/experimental/optim/nadam.py +14 -24
- mindspore/experimental/optim/optimizer.py +13 -23
- mindspore/experimental/optim/radam.py +18 -24
- mindspore/experimental/optim/rmsprop.py +14 -25
- mindspore/experimental/optim/rprop.py +15 -26
- mindspore/experimental/optim/sgd.py +9 -19
- mindspore/hal/__init__.py +4 -4
- mindspore/hal/contiguous_tensors_handle.py +2 -2
- mindspore/hal/memory.py +1 -0
- mindspore/include/api/cell.h +65 -5
- mindspore/include/api/cfg.h +24 -7
- mindspore/include/api/context.h +1 -0
- mindspore/include/api/delegate.h +10 -2
- mindspore/include/api/dual_abi_helper.h +100 -19
- mindspore/include/api/graph.h +14 -1
- mindspore/include/api/kernel.h +16 -3
- mindspore/include/api/kernel_api.h +9 -1
- mindspore/include/api/metrics/accuracy.h +9 -0
- mindspore/include/api/model.h +8 -1
- mindspore/include/api/model_group.h +4 -0
- mindspore/include/api/model_parallel_runner.h +2 -0
- mindspore/include/api/status.h +48 -10
- mindspore/include/api/types.h +8 -3
- mindspore/include/c_api/model_c.h +0 -58
- mindspore/include/c_api/tensor_c.h +0 -26
- mindspore/include/dataset/constants.h +9 -0
- mindspore/include/dataset/vision_ascend.h +1 -1
- mindspore/jpeg62.dll +0 -0
- mindspore/mindrecord/tools/cifar10.py +61 -11
- mindspore/mindrecord/tools/cifar10_to_mr.py +5 -0
- mindspore/mindspore_backend_common.dll +0 -0
- mindspore/mindspore_backend_manager.dll +0 -0
- mindspore/mindspore_common.dll +0 -0
- mindspore/mindspore_core.dll +0 -0
- mindspore/mindspore_cpu_res_manager.dll +0 -0
- mindspore/mindspore_dump.dll +0 -0
- mindspore/mindspore_frontend.dll +0 -0
- mindspore/mindspore_glog.dll +0 -0
- mindspore/mindspore_memory_pool.dll +0 -0
- mindspore/mindspore_ms_backend.dll +0 -0
- mindspore/mindspore_ops.dll +0 -0
- mindspore/mindspore_ops_host.dll +0 -0
- mindspore/mindspore_ops_kernel_common.dll +0 -0
- mindspore/mindspore_profiler.dll +0 -0
- mindspore/mindspore_pyboost.dll +0 -0
- mindspore/mindspore_pynative.dll +0 -0
- mindspore/mindspore_res_manager.dll +0 -0
- mindspore/mindspore_runtime_pipeline.dll +0 -0
- mindspore/mint/__init__.py +4 -44
- mindspore/mint/distributed/__init__.py +5 -0
- mindspore/mint/distributed/distributed.py +425 -19
- mindspore/mint/nn/__init__.py +1 -1
- mindspore/mint/nn/functional.py +53 -6
- mindspore/mint/nn/layer/_functions.py +163 -294
- mindspore/mint/nn/layer/activation.py +8 -6
- mindspore/mint/nn/layer/conv.py +125 -101
- mindspore/mint/nn/layer/normalization.py +11 -25
- mindspore/mint/optim/adam.py +19 -18
- mindspore/mint/optim/adamw.py +14 -8
- mindspore/mint/optim/sgd.py +5 -5
- mindspore/msobj140.dll +0 -0
- mindspore/mspdb140.dll +0 -0
- mindspore/mspdbcore.dll +0 -0
- mindspore/mspdbst.dll +0 -0
- mindspore/mspft140.dll +0 -0
- mindspore/msvcdis140.dll +0 -0
- mindspore/msvcp140_1.dll +0 -0
- mindspore/msvcp140_2.dll +0 -0
- mindspore/msvcp140_atomic_wait.dll +0 -0
- mindspore/msvcp140_codecvt_ids.dll +0 -0
- mindspore/nn/cell.py +488 -620
- mindspore/nn/grad/cell_grad.py +11 -12
- mindspore/nn/layer/activation.py +36 -36
- mindspore/nn/layer/basic.py +74 -77
- mindspore/nn/layer/channel_shuffle.py +4 -4
- mindspore/nn/layer/combined.py +4 -2
- mindspore/nn/layer/conv.py +86 -85
- mindspore/nn/layer/dense.py +9 -7
- mindspore/nn/layer/embedding.py +50 -52
- mindspore/nn/layer/image.py +38 -40
- mindspore/nn/layer/math.py +111 -112
- mindspore/nn/layer/normalization.py +56 -44
- mindspore/nn/layer/pooling.py +58 -63
- mindspore/nn/layer/rnn_cells.py +33 -33
- mindspore/nn/layer/rnns.py +56 -56
- mindspore/nn/layer/thor_layer.py +74 -73
- mindspore/nn/layer/transformer.py +11 -1
- mindspore/nn/learning_rate_schedule.py +20 -20
- mindspore/nn/loss/loss.py +79 -81
- mindspore/nn/optim/adam.py +2 -4
- mindspore/nn/optim/adasum.py +2 -2
- mindspore/nn/optim/lamb.py +1 -3
- mindspore/nn/optim/optimizer.py +1 -1
- mindspore/nn/optim/tft_wrapper.py +2 -3
- mindspore/nn/optim/thor.py +2 -2
- mindspore/nn/probability/distribution/_utils/utils.py +2 -2
- mindspore/nn/probability/distribution/exponential.py +2 -1
- mindspore/nn/probability/distribution/poisson.py +2 -1
- mindspore/nn/sparse/sparse.py +3 -3
- mindspore/nn/wrap/cell_wrapper.py +73 -42
- mindspore/nn/wrap/grad_reducer.py +37 -52
- mindspore/nn/wrap/loss_scale.py +72 -74
- mindspore/numpy/array_creations.py +7 -7
- mindspore/numpy/fft.py +1 -1
- mindspore/numpy/math_ops.py +1 -1
- mindspore/numpy/utils_const.py +1 -1
- mindspore/opencv_core452.dll +0 -0
- mindspore/opencv_imgcodecs452.dll +0 -0
- mindspore/opencv_imgproc452.dll +0 -0
- mindspore/ops/_grad_experimental/grad_comm_ops.py +51 -13
- mindspore/ops/_grad_experimental/grad_debug_ops.py +14 -0
- mindspore/ops/_grad_experimental/grad_inner_ops.py +0 -9
- mindspore/ops/_op_impl/cpu/__init__.py +1 -0
- mindspore/{experimental/es/__init__.py → ops/_op_impl/cpu/joinedstr_op.py} +12 -6
- mindspore/ops/_vmap/vmap_array_ops.py +6 -13
- mindspore/ops/_vmap/vmap_nn_ops.py +8 -16
- mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +29 -10
- mindspore/ops/auto_generate/gen_extend_func.py +5 -55
- mindspore/ops/auto_generate/gen_ops_def.py +753 -273
- mindspore/ops/auto_generate/gen_ops_prim.py +1687 -958
- mindspore/ops/auto_generate/pyboost_inner_prim.py +31 -1
- mindspore/ops/composite/__init__.py +10 -0
- mindspore/ops/composite/base.py +9 -5
- mindspore/ops/composite/multitype_ops/__init__.py +12 -1
- mindspore/ops/composite/multitype_ops/_compile_utils.py +132 -108
- mindspore/ops/composite/multitype_ops/_constexpr_utils.py +1 -1
- mindspore/ops/composite/multitype_ops/add_impl.py +70 -2
- mindspore/ops/composite/multitype_ops/div_impl.py +49 -0
- mindspore/ops/composite/multitype_ops/floordiv_impl.py +29 -0
- mindspore/ops/composite/multitype_ops/getitem_impl.py +11 -0
- mindspore/ops/composite/multitype_ops/mod_impl.py +5 -3
- mindspore/ops/composite/multitype_ops/mul_impl.py +49 -0
- mindspore/ops/composite/multitype_ops/setitem_impl.py +57 -0
- mindspore/ops/composite/multitype_ops/sub_impl.py +34 -0
- mindspore/ops/composite/multitype_ops/zeros_like_impl.py +14 -0
- mindspore/ops/function/__init__.py +4 -1
- mindspore/ops/function/_add_attr_func.py +11 -6
- mindspore/ops/function/array_func.py +17 -100
- mindspore/ops/function/debug_func.py +8 -5
- mindspore/ops/function/grad/grad_func.py +5 -13
- mindspore/ops/function/math_func.py +65 -399
- mindspore/ops/function/nn_func.py +44 -61
- mindspore/ops/function/other_func.py +4 -1
- mindspore/ops/function/random_func.py +31 -4
- mindspore/ops/functional.py +2 -3
- mindspore/ops/functional_overload.py +486 -18
- mindspore/ops/op_info_register.py +21 -0
- mindspore/ops/operations/__init__.py +5 -2
- mindspore/ops/operations/_custom_ops_utils.py +675 -8
- mindspore/ops/operations/_inner_ops.py +14 -18
- mindspore/ops/operations/_sequence_ops.py +1 -1
- mindspore/ops/operations/array_ops.py +4 -50
- mindspore/ops/operations/comm_ops.py +186 -41
- mindspore/ops/operations/custom_ops.py +244 -175
- mindspore/ops/operations/debug_ops.py +55 -4
- mindspore/ops/operations/image_ops.py +13 -13
- mindspore/ops/operations/manually_defined/ops_def.py +27 -28
- mindspore/ops/operations/math_ops.py +8 -9
- mindspore/ops/operations/nn_ops.py +6 -7
- mindspore/ops/primitive.py +9 -20
- mindspore/ops/tensor_method.py +52 -11
- mindspore/ops_generate/api/cpp_create_prim_instance_helper_generator.py +1 -1
- mindspore/ops_generate/api/functional_map_cpp_generator.py +10 -9
- mindspore/ops_generate/api/functions_cc_generator.py +58 -10
- mindspore/ops_generate/api/tensor_func_reg_cpp_generator.py +1 -1
- mindspore/ops_generate/common/base_generator.py +14 -0
- mindspore/ops_generate/common/gen_constants.py +7 -2
- mindspore/ops_generate/common/gen_utils.py +0 -19
- mindspore/ops_generate/common/op_proto.py +11 -4
- mindspore/ops_generate/common/template.py +88 -11
- mindspore/ops_generate/gen_ops.py +1 -1
- mindspore/ops_generate/op_def/lite_ops_cpp_generator.py +4 -4
- mindspore/ops_generate/op_def/ops_name_h_generator.py +0 -3
- mindspore/ops_generate/op_def/ops_primitive_h_generator.py +0 -4
- mindspore/ops_generate/op_def_py/op_prim_py_generator.py +5 -2
- mindspore/ops_generate/pyboost/auto_grad_impl_cc_generator.py +49 -8
- mindspore/ops_generate/pyboost/auto_grad_reg_cc_generator.py +2 -2
- mindspore/ops_generate/pyboost/gen_pyboost_func.py +31 -16
- mindspore/ops_generate/pyboost/op_template_parser.py +98 -72
- mindspore/ops_generate/pyboost/pyboost_functions_cpp_generator.py +70 -273
- mindspore/ops_generate/pyboost/pyboost_functions_h_generator.py +14 -6
- mindspore/ops_generate/pyboost/pyboost_functions_impl_cpp_generator.py +316 -0
- mindspore/ops_generate/pyboost/pyboost_functions_py_generator.py +1 -1
- mindspore/ops_generate/pyboost/pyboost_grad_function_cpp_generator.py +5 -3
- mindspore/ops_generate/pyboost/pyboost_inner_prim_generator.py +1 -1
- mindspore/ops_generate/pyboost/pyboost_internal_functions_cpp_generator.py +76 -0
- mindspore/ops_generate/pyboost/pyboost_internal_functions_h_generator.py +76 -0
- mindspore/ops_generate/pyboost/pyboost_internal_kernel_info_adapter_generator.py +125 -0
- mindspore/ops_generate/pyboost/pyboost_native_grad_functions_generator.py +4 -3
- mindspore/ops_generate/pyboost/pyboost_op_cpp_code_generator.py +348 -61
- mindspore/ops_generate/pyboost/pyboost_overload_functions_cpp_generator.py +1 -1
- mindspore/ops_generate/pyboost/pyboost_utils.py +118 -9
- mindspore/ops_generate/tensor_py_cc_generator.py +1 -24
- mindspore/parallel/_auto_parallel_context.py +9 -17
- mindspore/parallel/_cell_wrapper.py +106 -40
- mindspore/parallel/_parallel_serialization.py +4 -3
- mindspore/parallel/_ps_context.py +4 -6
- mindspore/parallel/_tensor.py +167 -12
- mindspore/parallel/_transformer/moe.py +1 -1
- mindspore/parallel/_transformer/transformer.py +17 -12
- mindspore/parallel/_utils.py +5 -11
- mindspore/parallel/auto_parallel.py +33 -12
- mindspore/parallel/checkpoint_convert.py +3 -3
- mindspore/parallel/checkpoint_transform.py +5 -1
- mindspore/parallel/cluster/process_entity/_api.py +88 -49
- mindspore/parallel/cluster/process_entity/_utils.py +95 -7
- mindspore/parallel/cluster/run.py +48 -7
- mindspore/parallel/function/__init__.py +8 -1
- mindspore/parallel/function/reshard_func.py +7 -6
- mindspore/parallel/nn/__init__.py +15 -2
- mindspore/parallel/nn/parallel_cell_wrapper.py +50 -14
- mindspore/parallel/nn/parallel_grad_reducer.py +7 -14
- mindspore/parallel/shard.py +9 -23
- mindspore/parallel/transform_safetensors.py +468 -174
- mindspore/pgodb140.dll +0 -0
- mindspore/pgort140.dll +0 -0
- mindspore/profiler/__init__.py +2 -1
- mindspore/profiler/analysis/parser/timeline_assembly_factory/ascend_timeline_assembler.py +7 -7
- mindspore/profiler/analysis/parser/timeline_assembly_factory/base_timeline_assembler.py +3 -0
- mindspore/profiler/analysis/parser/timeline_assembly_factory/trace_view_container.py +3 -0
- mindspore/profiler/analysis/parser/timeline_creator/cpu_op_timeline_creator.py +3 -3
- mindspore/profiler/analysis/parser/timeline_creator/fwk_timeline_creator.py +3 -3
- mindspore/profiler/analysis/parser/timeline_creator/msprof_timeline_creator.py +4 -4
- mindspore/profiler/analysis/parser/timeline_creator/scope_layer_timeline_creator.py +3 -3
- mindspore/profiler/analysis/parser/timeline_event/fwk_event.py +4 -1
- mindspore/profiler/analysis/parser/timeline_event/timeline_event_pool.py +2 -1
- mindspore/profiler/analysis/task_manager.py +1 -1
- mindspore/profiler/analysis/viewer/ascend_communication_viewer.py +5 -1
- mindspore/profiler/analysis/viewer/ascend_integrate_viewer.py +2 -1
- mindspore/profiler/analysis/viewer/ascend_kernel_details_viewer.py +10 -9
- mindspore/profiler/analysis/viewer/ascend_op_memory_viewer.py +43 -23
- mindspore/profiler/analysis/viewer/ascend_step_trace_time_viewer.py +3 -2
- mindspore/profiler/analysis/viewer/ms_minddata_viewer.py +9 -5
- mindspore/profiler/analysis/viewer/ms_operator_details_viewer.py +132 -0
- mindspore/profiler/common/constant.py +16 -0
- mindspore/profiler/common/msprof_cmd_tool.py +2 -2
- mindspore/profiler/common/path_manager.py +9 -0
- mindspore/profiler/common/profiler_context.py +50 -29
- mindspore/profiler/common/profiler_info.py +0 -16
- mindspore/profiler/common/profiler_meta_data.py +1 -0
- mindspore/profiler/common/profiler_op_analyse.py +239 -0
- mindspore/profiler/common/profiler_output_path.py +23 -8
- mindspore/profiler/common/profiler_parameters.py +128 -35
- mindspore/profiler/dynamic_profile/__init__.py +0 -0
- mindspore/profiler/dynamic_profile/dynamic_monitor_proxy.py +39 -0
- mindspore/profiler/dynamic_profile/dynamic_profiler_config_context.py +666 -0
- mindspore/profiler/dynamic_profile/dynamic_profiler_utils.py +62 -0
- mindspore/profiler/dynamic_profiler.py +374 -338
- mindspore/profiler/envprofiler.py +42 -12
- mindspore/profiler/experimental_config.py +112 -7
- mindspore/profiler/mstx.py +33 -12
- mindspore/profiler/platform/__init__.py +2 -3
- mindspore/profiler/platform/cpu_profiler.py +10 -4
- mindspore/profiler/platform/npu_profiler.py +30 -20
- mindspore/profiler/profiler.py +218 -154
- mindspore/profiler/profiler_action_controller.py +65 -77
- mindspore/profiler/profiler_interface.py +2 -2
- mindspore/profiler/schedule.py +10 -4
- mindspore/rewrite/common/config.py +1 -0
- mindspore/rewrite/common/namer.py +1 -0
- mindspore/rewrite/common/namespace.py +1 -0
- mindspore/rewrite/node/node.py +31 -11
- mindspore/rewrite/parsers/assign_parser.py +1 -1
- mindspore/rewrite/symbol_tree/symbol_tree.py +2 -2
- mindspore/run_check/_check_version.py +7 -10
- mindspore/runtime/__init__.py +8 -6
- mindspore/runtime/event.py +10 -4
- mindspore/runtime/executor.py +87 -45
- mindspore/runtime/memory.py +22 -30
- mindspore/runtime/thread_bind_core.py +299 -165
- mindspore/safeguard/rewrite_obfuscation.py +12 -13
- mindspore/swresample-4.dll +0 -0
- mindspore/swscale-6.dll +0 -0
- mindspore/tbbmalloc.dll +0 -0
- mindspore/tinyxml2.dll +0 -0
- mindspore/train/_utils.py +9 -5
- mindspore/train/amp.py +43 -23
- mindspore/train/callback/__init__.py +5 -5
- mindspore/train/callback/_callback.py +2 -1
- mindspore/train/callback/_checkpoint.py +4 -14
- mindspore/train/callback/_flops_collector.py +11 -7
- mindspore/train/callback/_landscape.py +0 -1
- mindspore/train/callback/_train_fault_tolerance.py +72 -18
- mindspore/train/data_sink.py +15 -6
- mindspore/train/dataset_helper.py +14 -5
- mindspore/train/model.py +49 -47
- mindspore/train/serialization.py +168 -126
- mindspore/train/summary/summary_record.py +13 -2
- mindspore/train/train_thor/model_thor.py +2 -2
- mindspore/turbojpeg.dll +0 -0
- mindspore/utils/__init__.py +3 -2
- mindspore/utils/dryrun.py +0 -6
- mindspore/utils/runtime_execution_order_check.py +162 -78
- mindspore/utils/sdc_detect.py +68 -0
- mindspore/utils/utils.py +14 -17
- mindspore/vcmeta.dll +0 -0
- mindspore/vcruntime140.dll +0 -0
- mindspore/vcruntime140_1.dll +0 -0
- mindspore/version.py +1 -1
- {mindspore-2.6.0.dist-info → mindspore-2.7.0.dist-info}/METADATA +5 -4
- {mindspore-2.6.0.dist-info → mindspore-2.7.0.dist-info}/RECORD +400 -439
- mindspore/_deprecated/jit.py +0 -198
- mindspore/_extends/remote/kernel_build_server_ascend.py +0 -75
- mindspore/communication/_hccl_management.py +0 -297
- mindspore/experimental/es/embedding_service.py +0 -891
- mindspore/experimental/es/embedding_service_layer.py +0 -581
- mindspore/profiler/common/validator/__init__.py +0 -14
- mindspore/profiler/common/validator/validate_path.py +0 -84
- mindspore/profiler/parser/__init__.py +0 -14
- mindspore/profiler/parser/aicpu_data_parser.py +0 -272
- mindspore/profiler/parser/ascend_analysis/__init__.py +0 -14
- mindspore/profiler/parser/ascend_analysis/constant.py +0 -71
- mindspore/profiler/parser/ascend_analysis/file_manager.py +0 -180
- mindspore/profiler/parser/ascend_analysis/function_event.py +0 -185
- mindspore/profiler/parser/ascend_analysis/fwk_cann_parser.py +0 -136
- mindspore/profiler/parser/ascend_analysis/fwk_file_parser.py +0 -131
- mindspore/profiler/parser/ascend_analysis/msprof_timeline_parser.py +0 -104
- mindspore/profiler/parser/ascend_analysis/path_manager.py +0 -313
- mindspore/profiler/parser/ascend_analysis/profiler_info_parser.py +0 -123
- mindspore/profiler/parser/ascend_analysis/tlv_decoder.py +0 -86
- mindspore/profiler/parser/ascend_analysis/trace_event_manager.py +0 -75
- mindspore/profiler/parser/ascend_cluster_generator.py +0 -116
- mindspore/profiler/parser/ascend_communicate_generator.py +0 -314
- mindspore/profiler/parser/ascend_flops_generator.py +0 -116
- mindspore/profiler/parser/ascend_fpbp_generator.py +0 -82
- mindspore/profiler/parser/ascend_hccl_generator.py +0 -271
- mindspore/profiler/parser/ascend_integrate_generator.py +0 -42
- mindspore/profiler/parser/ascend_memory_generator.py +0 -185
- mindspore/profiler/parser/ascend_msprof_exporter.py +0 -282
- mindspore/profiler/parser/ascend_msprof_generator.py +0 -187
- mindspore/profiler/parser/ascend_op_generator.py +0 -334
- mindspore/profiler/parser/ascend_steptrace_generator.py +0 -94
- mindspore/profiler/parser/ascend_timeline_generator.py +0 -545
- mindspore/profiler/parser/base_timeline_generator.py +0 -483
- mindspore/profiler/parser/container.py +0 -229
- mindspore/profiler/parser/cpu_gpu_timeline_generator.py +0 -697
- mindspore/profiler/parser/flops_parser.py +0 -531
- mindspore/profiler/parser/framework_enum.py +0 -111
- mindspore/profiler/parser/framework_parser.py +0 -464
- mindspore/profiler/parser/framework_struct.py +0 -61
- mindspore/profiler/parser/gpu_analysis/__init__.py +0 -14
- mindspore/profiler/parser/gpu_analysis/function_event.py +0 -44
- mindspore/profiler/parser/gpu_analysis/fwk_file_parser.py +0 -89
- mindspore/profiler/parser/gpu_analysis/profiler_info_parser.py +0 -72
- mindspore/profiler/parser/hccl_parser.py +0 -573
- mindspore/profiler/parser/hwts_log_parser.py +0 -122
- mindspore/profiler/parser/integrator.py +0 -526
- mindspore/profiler/parser/memory_usage_parser.py +0 -277
- mindspore/profiler/parser/minddata_analyzer.py +0 -800
- mindspore/profiler/parser/minddata_parser.py +0 -186
- mindspore/profiler/parser/minddata_pipeline_parser.py +0 -299
- mindspore/profiler/parser/op_intermediate_parser.py +0 -149
- mindspore/profiler/parser/optime_parser.py +0 -250
- mindspore/profiler/parser/profiler_info.py +0 -213
- mindspore/profiler/parser/step_trace_parser.py +0 -666
- mindspore/utils/hooks.py +0 -81
- /mindspore/common/{_auto_dynamic.py → dynamic_shape/_auto_dynamic.py} +0 -0
- {mindspore-2.6.0.dist-info → mindspore-2.7.0.dist-info}/WHEEL +0 -0
- {mindspore-2.6.0.dist-info → mindspore-2.7.0.dist-info}/entry_points.txt +0 -0
- {mindspore-2.6.0.dist-info → mindspore-2.7.0.dist-info}/top_level.txt +0 -0
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2022 Huawei Technologies Co., Ltd
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
# ============================================================================
|
|
15
|
-
"""The parser for parsing framework files."""
|
|
16
|
-
import glob
|
|
17
|
-
import json
|
|
18
|
-
import os
|
|
19
|
-
import stat
|
|
20
|
-
from collections import defaultdict
|
|
21
|
-
from collections import namedtuple
|
|
22
|
-
|
|
23
|
-
import numpy as np
|
|
24
|
-
from mindspore.profiler.common.validator.validate_path import validate_and_normalize_path
|
|
25
|
-
from mindspore.profiler.parser.framework_enum import FileDataType
|
|
26
|
-
from mindspore.profiler.parser.framework_struct import TASK_DESC_STRUCT, TENSOR_DATA_STRUCT, STEP_INFO_STRUCT
|
|
27
|
-
|
|
28
|
-
FILE_DATA_STRUCT_DICT = {
|
|
29
|
-
FileDataType.STEP_INFO.value: STEP_INFO_STRUCT,
|
|
30
|
-
FileDataType.TENSOR_DATA_INFO.value: TENSOR_DATA_STRUCT,
|
|
31
|
-
FileDataType.TASK_DESC_INFO.value: TASK_DESC_STRUCT
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
TASK_TYPE_TO_KERNEL_TYPE = {
|
|
35
|
-
0: 'AI_CORE',
|
|
36
|
-
1: 'AI_CPU',
|
|
37
|
-
2: 'MSPROF_AIV',
|
|
38
|
-
10: 'MSPROF_HCCL',
|
|
39
|
-
11: 'MSPROF_RTS',
|
|
40
|
-
1000: 'MSPROF_UNKNOWN_TYPE'
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
COL_NAMES = [
|
|
44
|
-
'task_id', 'stream_id', 'block_dim', 'full_op_name', 'op_name', 'op_type', 'subgraph', 'op_info',
|
|
45
|
-
'graph_id', 'kernel_type'
|
|
46
|
-
]
|
|
47
|
-
OpData = namedtuple('OpData', field_names=COL_NAMES)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class GpuFrameWorkParser:
|
|
51
|
-
"""
|
|
52
|
-
The parser for parsing framework files.
|
|
53
|
-
|
|
54
|
-
Args:
|
|
55
|
-
output_path (str): The profiling path which should contain GPU profiling data.
|
|
56
|
-
dev_id (str): The device ID.
|
|
57
|
-
"""
|
|
58
|
-
|
|
59
|
-
_STEPS_TID = 100000
|
|
60
|
-
_GPU_OP_TID = 100002
|
|
61
|
-
|
|
62
|
-
def __init__(self, output_path, dev_id, op_names=None):
|
|
63
|
-
"""The parser for parsing framework files."""
|
|
64
|
-
self._dev_id = dev_id
|
|
65
|
-
self._output_path = output_path
|
|
66
|
-
self.op_names = op_names
|
|
67
|
-
self.op_name = ''
|
|
68
|
-
self.framework_list = []
|
|
69
|
-
self.op_detail = {}
|
|
70
|
-
self.operation_info = {}
|
|
71
|
-
self.activity_info_dir = []
|
|
72
|
-
self.framework_info_dir = []
|
|
73
|
-
self.cpu_detail_info_dir = []
|
|
74
|
-
self.gpu_op_type_info_dir = []
|
|
75
|
-
self.op_execute_times = {}
|
|
76
|
-
self.op_step_shape_info = defaultdict(list)
|
|
77
|
-
self.one_step_op_time = dict()
|
|
78
|
-
self.one_step_kernel_time = dict()
|
|
79
|
-
|
|
80
|
-
def parse(self):
|
|
81
|
-
"""Parse op performance data."""
|
|
82
|
-
self.get_device_target_filename()
|
|
83
|
-
self.get_framework_summary()
|
|
84
|
-
self.get_cpu_op_detail_info()
|
|
85
|
-
self.get_activity_op_info()
|
|
86
|
-
if isinstance(self.op_names, str):
|
|
87
|
-
self.combine_performance_data(self.op_names)
|
|
88
|
-
elif isinstance(self.op_names, list):
|
|
89
|
-
for op_name in self.op_names:
|
|
90
|
-
self.combine_performance_data(op_name)
|
|
91
|
-
self.operation_info["device_id"] = self._dev_id
|
|
92
|
-
return json.dumps(self.operation_info)
|
|
93
|
-
|
|
94
|
-
def get_framework_summary(self):
|
|
95
|
-
"""Get framework data."""
|
|
96
|
-
for filename in self.framework_info_dir:
|
|
97
|
-
op_side = filename.split('_')[0]
|
|
98
|
-
framework_file_path = os.path.join(self._output_path, filename)
|
|
99
|
-
framework_file_path = validate_and_normalize_path(framework_file_path)
|
|
100
|
-
with open(framework_file_path, 'r') as f_obj:
|
|
101
|
-
framework_info = f_obj.readlines()
|
|
102
|
-
for line_info in framework_info:
|
|
103
|
-
line_info = line_info.strip(' ').strip('\n').split(';')
|
|
104
|
-
# line_info[0]: op_type, line_info[1]: op_name, line_info[2]: graph_id, line_info[3]: input_shape;
|
|
105
|
-
input_shape = line_info[3:]
|
|
106
|
-
item = [line_info[0], line_info[1], input_shape, op_side]
|
|
107
|
-
if not self.op_step_shape_info.get(line_info[1]):
|
|
108
|
-
self.op_step_shape_info[line_info[1]].append(op_side)
|
|
109
|
-
self.op_step_shape_info[line_info[1]].append(input_shape)
|
|
110
|
-
if item not in self.framework_list:
|
|
111
|
-
self.framework_list.append(item)
|
|
112
|
-
|
|
113
|
-
def get_cpu_op_detail_info(self):
|
|
114
|
-
"""Get cpu operators detail data."""
|
|
115
|
-
for filename in self.cpu_detail_info_dir:
|
|
116
|
-
op_side = filename.split('_')[0]
|
|
117
|
-
op_detail_file_path = os.path.join(self._output_path, filename)
|
|
118
|
-
op_detail_file_path = validate_and_normalize_path(op_detail_file_path)
|
|
119
|
-
with open(op_detail_file_path, 'r') as f_obj:
|
|
120
|
-
op_detail_info = f_obj.readlines()
|
|
121
|
-
for line_info in op_detail_info[1:]:
|
|
122
|
-
line_info = line_info.strip(' ').strip('\n').split(',')
|
|
123
|
-
if not self.op_detail.get(line_info[2]):
|
|
124
|
-
# line_info[4]: op_occurrences, line_info[5]: op_detail_time(us), line_info[6]: op_avg_time(us);
|
|
125
|
-
self.op_detail[line_info[2]] = [float(line_info[4]), float(line_info[5]),
|
|
126
|
-
float(line_info[6]), op_side]
|
|
127
|
-
|
|
128
|
-
def get_execute_times(self):
|
|
129
|
-
"""Get gpu operators execute times."""
|
|
130
|
-
if self.gpu_op_type_info_dir:
|
|
131
|
-
gpu_op_type_file_path = os.path.join(self._output_path, self.gpu_op_type_info_dir[0])
|
|
132
|
-
gpu_op_type_file_path = validate_and_normalize_path(gpu_op_type_file_path)
|
|
133
|
-
with open(gpu_op_type_file_path, 'r') as fp:
|
|
134
|
-
op_type_info = fp.readlines()
|
|
135
|
-
for line_info in op_type_info[1:]:
|
|
136
|
-
line_info = line_info.strip(' ').strip('\n').split(',')
|
|
137
|
-
self.op_execute_times[line_info[0]] = line_info[1]
|
|
138
|
-
|
|
139
|
-
def get_activity_op_info(self):
|
|
140
|
-
"""Get op detail data."""
|
|
141
|
-
all_file = os.listdir(self._output_path)
|
|
142
|
-
for file_name in all_file:
|
|
143
|
-
if file_name.startswith('gpu_op_type') and file_name.endswith(f'{self._dev_id}.csv'):
|
|
144
|
-
self.gpu_op_type_info_dir.append(file_name)
|
|
145
|
-
if not self.gpu_op_type_info_dir and self.activity_info_dir:
|
|
146
|
-
raise RuntimeError(f'The output file <%s> is not found.' % self.gpu_op_type_info_dir)
|
|
147
|
-
self.get_execute_times()
|
|
148
|
-
for filename in self.activity_info_dir:
|
|
149
|
-
op_side = filename.split('_')[0]
|
|
150
|
-
activity_file_path = os.path.join(self._output_path, filename)
|
|
151
|
-
activity_file_path = validate_and_normalize_path(activity_file_path)
|
|
152
|
-
with open(activity_file_path, 'r') as file:
|
|
153
|
-
activity_info = file.readlines()
|
|
154
|
-
for line_info in activity_info[1:]:
|
|
155
|
-
line_info = line_info.strip(' ').strip('\n').replace(', ', ';').split(',')
|
|
156
|
-
op_name = line_info[2].split('/')[-1]
|
|
157
|
-
# op_name: xxx-opx
|
|
158
|
-
op_type = op_name.split('-')[0]
|
|
159
|
-
op_occurrences = int(self.op_execute_times.get(op_type))
|
|
160
|
-
op_total_time = float(line_info[-4])
|
|
161
|
-
if not self.op_detail.get(op_name):
|
|
162
|
-
# line_info[4]: op_occurrences, line_info[5]: op_detail_time(us), line_info[6]: op_avg_time(us);
|
|
163
|
-
self.op_detail[op_name] = [
|
|
164
|
-
op_occurrences, op_total_time,
|
|
165
|
-
round(op_total_time / op_occurrences, 4), op_side
|
|
166
|
-
]
|
|
167
|
-
else:
|
|
168
|
-
self.op_detail.get(op_name)[1] += op_total_time
|
|
169
|
-
self.op_detail.get(op_name)[2] = self.op_detail.get(op_name)[1] / self.op_detail.get(op_name)[0]
|
|
170
|
-
self.op_detail[op_name] = [
|
|
171
|
-
self.op_detail.get(op_name)[0],
|
|
172
|
-
round(self.op_detail.get(op_name)[1], 4),
|
|
173
|
-
round(self.op_detail.get(op_name)[2], 4), op_side
|
|
174
|
-
]
|
|
175
|
-
|
|
176
|
-
def combine_performance_data(self, op_name):
|
|
177
|
-
"""Combine operator detail info with framework info."""
|
|
178
|
-
unique_op_info = []
|
|
179
|
-
op_shape_dict = {}
|
|
180
|
-
operation_info = {}
|
|
181
|
-
factor = 1000 # convert time unit from ms to us.
|
|
182
|
-
for line_info in self.framework_list:
|
|
183
|
-
op_detail = self.op_detail.get(line_info[1])
|
|
184
|
-
if not op_detail:
|
|
185
|
-
continue
|
|
186
|
-
if op_name in line_info and line_info[3] == op_detail[3]:
|
|
187
|
-
op_side = line_info[3]
|
|
188
|
-
op_shape = '[{}]{}'.format(op_side, ','.join(line_info[2]))
|
|
189
|
-
op_occurrences = int(op_detail[0])
|
|
190
|
-
op_total_time = float(op_detail[1])
|
|
191
|
-
op_avg_time = float(op_detail[2])
|
|
192
|
-
if op_shape in op_shape_dict:
|
|
193
|
-
# Classify according to the operator information of the same shape.
|
|
194
|
-
op_shape_dict.get(op_shape)[0] += op_occurrences
|
|
195
|
-
op_shape_dict.get(op_shape)[1] += op_total_time
|
|
196
|
-
op_shape_dict.get(op_shape)[2] = op_shape_dict.get(op_shape)[1] / op_shape_dict.get(op_shape)[0]
|
|
197
|
-
op_shape_dict[op_shape] = [
|
|
198
|
-
op_shape_dict.get(op_shape)[0], round(op_shape_dict.get(op_shape)[1], 4),
|
|
199
|
-
round(op_shape_dict.get(op_shape)[2], 4), op_side
|
|
200
|
-
]
|
|
201
|
-
else:
|
|
202
|
-
op_shape_dict[op_shape] = [op_occurrences, op_total_time, op_avg_time, op_side]
|
|
203
|
-
|
|
204
|
-
for input_shape in op_shape_dict:
|
|
205
|
-
# 0: op_occurrences, 1: op_total_time, 2: op_avg_time, 3: op_side
|
|
206
|
-
operation_info['op_side'] = op_shape_dict.get(input_shape)[3]
|
|
207
|
-
operation_info['input_shape'] = input_shape.strip('[').split(']')[-1]
|
|
208
|
-
operation_info['op_occurrences'] = op_shape_dict.get(input_shape)[0]
|
|
209
|
-
if operation_info.get('op_side') == 'cpu':
|
|
210
|
-
operation_info['op_total_time(us)'] = round(op_shape_dict.get(input_shape)[1] * factor, 4)
|
|
211
|
-
operation_info['op_avg_time(us)'] = round(op_shape_dict.get(input_shape)[2] * factor, 4)
|
|
212
|
-
else:
|
|
213
|
-
operation_info['op_total_time(us)'] = op_shape_dict.get(input_shape)[1]
|
|
214
|
-
operation_info['op_avg_time(us)'] = op_shape_dict.get(input_shape)[2]
|
|
215
|
-
unique_op_info.append(operation_info)
|
|
216
|
-
operation_info = dict()
|
|
217
|
-
|
|
218
|
-
if unique_op_info:
|
|
219
|
-
self.operation_info[op_name] = unique_op_info
|
|
220
|
-
else:
|
|
221
|
-
raise RuntimeError(f'The information of <{op_name}> is not found. Please verify that the operator name is'
|
|
222
|
-
f' correct or the operator is used in the network.')
|
|
223
|
-
|
|
224
|
-
def get_device_target_filename(self):
|
|
225
|
-
"""Get device target filename."""
|
|
226
|
-
gpu_framework_file = f'gpu_framework_{self._dev_id}.txt'
|
|
227
|
-
cpu_framework_file = f'cpu_framework_{self._dev_id}.txt'
|
|
228
|
-
gpu_activity_file = f'gpu_activity_data_{self._dev_id}.csv'
|
|
229
|
-
cpu_op_detail_file = f'cpu_op_detail_info_{self._dev_id}.csv'
|
|
230
|
-
all_file = os.listdir(self._output_path)
|
|
231
|
-
if not all_file:
|
|
232
|
-
raise RuntimeError(f'No profiler file is found in the path <%s>. '
|
|
233
|
-
f'Check whether the profiler path is correct.' % self._output_path)
|
|
234
|
-
if gpu_activity_file in all_file and gpu_framework_file not in all_file:
|
|
235
|
-
raise RuntimeError(f'The output file <%s> is not found.' % gpu_framework_file)
|
|
236
|
-
if cpu_op_detail_file in all_file and cpu_framework_file not in all_file:
|
|
237
|
-
raise RuntimeError(f'The output file <%s> is not found.' % cpu_framework_file)
|
|
238
|
-
if gpu_framework_file in all_file and gpu_activity_file not in all_file:
|
|
239
|
-
raise RuntimeError(f'The output file <%s> is not found.' % gpu_activity_file)
|
|
240
|
-
if cpu_framework_file in all_file and cpu_op_detail_file not in all_file:
|
|
241
|
-
raise RuntimeError(f'The output file <%s> is not found.' % cpu_op_detail_file)
|
|
242
|
-
if gpu_activity_file not in all_file and cpu_op_detail_file not in all_file:
|
|
243
|
-
raise RuntimeError(f'The profiling data of this card which device_id is equal to {self._dev_id} does not'
|
|
244
|
-
f' exist. Check whether device_id is correct.')
|
|
245
|
-
for file_name in all_file:
|
|
246
|
-
if file_name.endswith(f'activity_data_{self._dev_id}.csv'):
|
|
247
|
-
self.activity_info_dir.append(file_name)
|
|
248
|
-
if file_name.endswith(f'framework_{self._dev_id}.txt'):
|
|
249
|
-
self.framework_info_dir.append(file_name)
|
|
250
|
-
if file_name.startswith('cpu_op_detail') and file_name.endswith(f'{self._dev_id}.csv'):
|
|
251
|
-
self.cpu_detail_info_dir.append(file_name)
|
|
252
|
-
|
|
253
|
-
def analyse_dynamic_shape_data(self, timeline_meta):
|
|
254
|
-
"""Analyse gpu operators's information and cudakernel's information."""
|
|
255
|
-
kernel_info = defaultdict(list)
|
|
256
|
-
operator_info = defaultdict(list)
|
|
257
|
-
kernel_type_step_time = dict()
|
|
258
|
-
op_type_step_time = dict()
|
|
259
|
-
step, first_update = 1, 0
|
|
260
|
-
self.get_device_target_filename()
|
|
261
|
-
self.get_framework_summary()
|
|
262
|
-
for op_info in timeline_meta:
|
|
263
|
-
args = op_info.get("args", {})
|
|
264
|
-
if op_info.get("tid") == self._STEPS_TID and op_info.get('dur'):
|
|
265
|
-
step = int(op_info.get("name"))
|
|
266
|
-
if first_update:
|
|
267
|
-
self.one_step_op_time = dict()
|
|
268
|
-
self.one_step_kernel_time = dict()
|
|
269
|
-
first_update = 1
|
|
270
|
-
elif args and args.get("type") == "cuLaunchKernel":
|
|
271
|
-
item = self._organize_result(step, op_info, args)
|
|
272
|
-
kernel_info[step].append(item)
|
|
273
|
-
self._get_one_step_info(item, "kernel")
|
|
274
|
-
elif (op_info.get("tid") == self._GPU_OP_TID and not op_info.get("cat")) or \
|
|
275
|
-
str(op_info.get("tid")).startswith('HostCpu'):
|
|
276
|
-
item = self._organize_result(step, op_info, args)
|
|
277
|
-
operator_info[step].append(item)
|
|
278
|
-
self._get_one_step_info(item, "operator")
|
|
279
|
-
op_type_step_time[step] = self.one_step_op_time
|
|
280
|
-
kernel_type_step_time[step] = self.one_step_kernel_time
|
|
281
|
-
self.write_dynamic_shape_data(operator_info, kernel_info, op_type_step_time, kernel_type_step_time)
|
|
282
|
-
|
|
283
|
-
def write_dynamic_shape_data(self, operator_info, kernel_info, op_type_step_time, kernel_type_step_time):
|
|
284
|
-
"""Organize the result."""
|
|
285
|
-
output_dynamic_shape_file_name = f"dynamic_shape_info_{self._dev_id}.json"
|
|
286
|
-
result = {
|
|
287
|
-
"operator": operator_info,
|
|
288
|
-
"kernel": kernel_info,
|
|
289
|
-
"operator_type": op_type_step_time,
|
|
290
|
-
"kernel_type": kernel_type_step_time,
|
|
291
|
-
}
|
|
292
|
-
dynamic_shape_file_path = os.path.join(self._output_path, output_dynamic_shape_file_name)
|
|
293
|
-
with os.fdopen(os.open(dynamic_shape_file_path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600), 'w') as fp:
|
|
294
|
-
json.dump(result, fp)
|
|
295
|
-
os.chmod(dynamic_shape_file_path, stat.S_IREAD | stat.S_IWRITE)
|
|
296
|
-
|
|
297
|
-
def get_graph_ids(self):
|
|
298
|
-
"""Get gpu graph ids."""
|
|
299
|
-
gpu_framework_file = list(glob.glob(os.path.join(self._output_path,
|
|
300
|
-
'gpu_framework_{}.txt'.format(self._dev_id))))
|
|
301
|
-
if not gpu_framework_file:
|
|
302
|
-
return []
|
|
303
|
-
graph_ids = set()
|
|
304
|
-
with open(gpu_framework_file[0], 'r') as f_obj:
|
|
305
|
-
framework_info = f_obj.readlines()
|
|
306
|
-
for line_info in framework_info:
|
|
307
|
-
if line_info.startswith("InitDataSetQueue") or line_info.startswith("GetNext"):
|
|
308
|
-
continue
|
|
309
|
-
line_info = line_info.strip(' ').strip('\n').split(';')
|
|
310
|
-
if len(line_info) > 2 and line_info[2].isdigit():
|
|
311
|
-
graph_ids.add(int(line_info[2]))
|
|
312
|
-
return list(graph_ids)
|
|
313
|
-
|
|
314
|
-
def _organize_result(self, step, op_info, args):
|
|
315
|
-
"""Organize the results."""
|
|
316
|
-
if args.get("type", "") == "cuLaunchKernel":
|
|
317
|
-
item = {
|
|
318
|
-
"step": step,
|
|
319
|
-
"op_type": args.get("type"),
|
|
320
|
-
"op_name": op_info.get('name'),
|
|
321
|
-
"op_full_name": args.get('op_full_name'),
|
|
322
|
-
"dur": op_info.get('dur'),
|
|
323
|
-
"block_dim": args.get('block_dim'),
|
|
324
|
-
"grid_dim": args.get('grid_dim')
|
|
325
|
-
}
|
|
326
|
-
else:
|
|
327
|
-
op_step_shape = self.op_step_shape_info.get(op_info.get('name'))
|
|
328
|
-
item = {
|
|
329
|
-
"step": step,
|
|
330
|
-
"op_side": self.op_step_shape_info.get(op_info.get('name'))[0],
|
|
331
|
-
"op_type": op_info.get('name').split('-')[0],
|
|
332
|
-
"op_name": op_info.get('name'),
|
|
333
|
-
"dur": op_info.get('dur'),
|
|
334
|
-
"shape_info": op_step_shape[step] if len(op_step_shape) > step else [],
|
|
335
|
-
}
|
|
336
|
-
return item
|
|
337
|
-
|
|
338
|
-
def _get_one_step_info(self, item, op_type):
|
|
339
|
-
"""Get operator type information in step."""
|
|
340
|
-
duration = item.get("dur")
|
|
341
|
-
if op_type == "operator":
|
|
342
|
-
sort_type = item.get("op_type")
|
|
343
|
-
if not self.one_step_op_time.get(sort_type):
|
|
344
|
-
# duration, times, avg_time
|
|
345
|
-
self.one_step_op_time[sort_type] = [duration, 1, duration]
|
|
346
|
-
else:
|
|
347
|
-
self.one_step_op_time[sort_type][0] += duration
|
|
348
|
-
self.one_step_op_time[sort_type][1] += 1
|
|
349
|
-
self.one_step_op_time[sort_type] = [
|
|
350
|
-
self.one_step_op_time[sort_type][0],
|
|
351
|
-
self.one_step_op_time[sort_type][1],
|
|
352
|
-
round(self.one_step_op_time[sort_type][0] /
|
|
353
|
-
self.one_step_op_time[sort_type][1], 4)
|
|
354
|
-
]
|
|
355
|
-
else:
|
|
356
|
-
sort_type = item.get("op_name")
|
|
357
|
-
op_full_name = item.get("op_full_name")
|
|
358
|
-
if not self.one_step_kernel_time.get(sort_type):
|
|
359
|
-
# duration, times, avg_time
|
|
360
|
-
self.one_step_kernel_time[sort_type] = [duration, 1, duration, op_full_name]
|
|
361
|
-
else:
|
|
362
|
-
self.one_step_kernel_time[sort_type][0] += duration
|
|
363
|
-
self.one_step_kernel_time[sort_type][1] += 1
|
|
364
|
-
self.one_step_kernel_time[sort_type] = [
|
|
365
|
-
self.one_step_kernel_time[sort_type][0],
|
|
366
|
-
self.one_step_kernel_time[sort_type][1],
|
|
367
|
-
round(self.one_step_kernel_time[sort_type][0] /
|
|
368
|
-
self.one_step_kernel_time[sort_type][1], 4),
|
|
369
|
-
op_full_name
|
|
370
|
-
]
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
class DynamicFrameWorkParser:
|
|
374
|
-
"""
|
|
375
|
-
Thr parser for parsing dynamic shape framework files.
|
|
376
|
-
|
|
377
|
-
Args:
|
|
378
|
-
output_path (str): The profiling path which should contain Ascend profiling data.
|
|
379
|
-
rank_id (int): The rank ID.
|
|
380
|
-
"""
|
|
381
|
-
|
|
382
|
-
def __init__(self, output_path, rank_id, pretty=False):
|
|
383
|
-
"""Initialization of parsing framework data."""
|
|
384
|
-
self._output_path = output_path
|
|
385
|
-
self._all_op_exe_time = defaultdict(list)
|
|
386
|
-
self._op_shape_info = defaultdict(list)
|
|
387
|
-
self._op_info = dict()
|
|
388
|
-
self._rank_id = rank_id
|
|
389
|
-
self._op_type_exe_time = defaultdict(list)
|
|
390
|
-
self._exe_time_and_shape_detail = defaultdict(dict)
|
|
391
|
-
self._dynamic_shape_info = defaultdict(list)
|
|
392
|
-
self._step = 0
|
|
393
|
-
self._pretty = pretty
|
|
394
|
-
|
|
395
|
-
@property
|
|
396
|
-
def indent(self):
|
|
397
|
-
indent = 1 if self._pretty else None
|
|
398
|
-
return indent
|
|
399
|
-
|
|
400
|
-
def write_dynamic_shape_data(self, df_op_summary):
|
|
401
|
-
"""Analyze dynamic shape data and write to dynamic shape file."""
|
|
402
|
-
self._get_total_step_num(df_op_summary)
|
|
403
|
-
output_dynamic_shape_file_name = f'dynamic_shape_info_{self._rank_id}.json'
|
|
404
|
-
for op_name in self._exe_time_and_shape_detail:
|
|
405
|
-
if self._exe_time_and_shape_detail[op_name]['op_exe_occurrences'] == self._step:
|
|
406
|
-
self._op_info[op_name] = self._exe_time_and_shape_detail.get(op_name)
|
|
407
|
-
for op_name, op_detail in self._op_info.items():
|
|
408
|
-
op_type = op_name.split('-', maxsplit=1)[0]
|
|
409
|
-
item = {op_name: op_detail}
|
|
410
|
-
self._dynamic_shape_info[op_type].append(item)
|
|
411
|
-
self._op_info["op_type"] = dict()
|
|
412
|
-
for op_name in self._op_info:
|
|
413
|
-
if op_name != 'op_type':
|
|
414
|
-
op_type = op_name.split('-')[0]
|
|
415
|
-
self._op_type_exe_time[op_type].append(self._all_op_exe_time[op_name])
|
|
416
|
-
for op_type in self._op_type_exe_time:
|
|
417
|
-
if self._op_type_exe_time[op_type]:
|
|
418
|
-
self._op_info.get("op_type", {})[op_type] = (
|
|
419
|
-
np.around(np.sum(self._op_type_exe_time[op_type], axis=0, dtype='float') /
|
|
420
|
-
len(self._op_type_exe_time[op_type]), 4)).tolist()
|
|
421
|
-
self._dynamic_shape_info['op_type'] = self._op_info.get("op_type")
|
|
422
|
-
dynamic_shape_file_path = os.path.join(self._output_path, output_dynamic_shape_file_name)
|
|
423
|
-
with os.fdopen(os.open(dynamic_shape_file_path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600), 'w') as fp:
|
|
424
|
-
json.dump(self._dynamic_shape_info, fp, indent=self.indent)
|
|
425
|
-
os.chmod(dynamic_shape_file_path, stat.S_IREAD | stat.S_IWRITE)
|
|
426
|
-
|
|
427
|
-
def _analyse_op_execute_time(self, op_summary):
|
|
428
|
-
"""Obtain the execution time of aicpu operator and aicore operator."""
|
|
429
|
-
timeline_info = defaultdict(list)
|
|
430
|
-
for row in op_summary:
|
|
431
|
-
key = row['Op Name'].split('/')[-1]
|
|
432
|
-
timeline_info[key].append(row['Task Duration'])
|
|
433
|
-
|
|
434
|
-
self._all_op_exe_time = timeline_info
|
|
435
|
-
|
|
436
|
-
def _get_dynamic_shape_info(self, op_summary):
|
|
437
|
-
"""Get the shape information of AICPU and aicore."""
|
|
438
|
-
framework_file_name = f'framework_raw_{self._rank_id}.csv'
|
|
439
|
-
self._analyse_op_execute_time(op_summary)
|
|
440
|
-
framework_file_path = os.path.join(self._output_path, framework_file_name)
|
|
441
|
-
framework_file_path = validate_and_normalize_path(framework_file_path)
|
|
442
|
-
with open(framework_file_path, 'r') as f_obj:
|
|
443
|
-
framework_info = f_obj.readlines()[1:]
|
|
444
|
-
for line_info in framework_info:
|
|
445
|
-
line_info = line_info.strip('\n').split(',')
|
|
446
|
-
op_name = line_info[3].split('/')[-1]
|
|
447
|
-
shape_info = ','.join(line_info[8:]).replace('"', '')
|
|
448
|
-
self._op_shape_info[op_name].append(shape_info)
|
|
449
|
-
|
|
450
|
-
def _get_total_step_num(self, op_summary):
|
|
451
|
-
"""Get the number of steps."""
|
|
452
|
-
self._get_dynamic_shape_info(op_summary)
|
|
453
|
-
all_exe_occurrences = list()
|
|
454
|
-
for op_name in self._all_op_exe_time:
|
|
455
|
-
op_shape = self._op_shape_info.get(op_name)
|
|
456
|
-
op_exe_time_list = self._all_op_exe_time.get(op_name)
|
|
457
|
-
if not op_shape:
|
|
458
|
-
continue
|
|
459
|
-
if len(op_shape) == len(op_exe_time_list):
|
|
460
|
-
self._exe_time_and_shape_detail[op_name]['op_exe_time'] = op_exe_time_list
|
|
461
|
-
self._exe_time_and_shape_detail[op_name]['op_shape'] = op_shape
|
|
462
|
-
self._exe_time_and_shape_detail[op_name]['op_exe_occurrences'] = len(op_exe_time_list)
|
|
463
|
-
all_exe_occurrences.append(len(op_exe_time_list))
|
|
464
|
-
self._step = max(set(all_exe_occurrences), key=all_exe_occurrences.count)
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Copyright 2021 Huawei Technologies Co., Ltd
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
# ============================================================================
|
|
15
|
-
"""Thr parser for parsing framework files."""
|
|
16
|
-
|
|
17
|
-
from mindspore.profiler.common.struct_type import StructType
|
|
18
|
-
|
|
19
|
-
# Note: All keys should be named with lower camel case, which are the same as those in C++.
|
|
20
|
-
|
|
21
|
-
TASK_DESC_STRUCT = dict(
|
|
22
|
-
magicNumber=StructType.UINT16,
|
|
23
|
-
dataTag=StructType.UINT16,
|
|
24
|
-
taskType=StructType.UINT32,
|
|
25
|
-
opName=[StructType.UINT64] * 16, # opName is a mix data
|
|
26
|
-
opType=[StructType.UINT64] * 8, # opType is a mix data
|
|
27
|
-
curIterNum=StructType.UINT64,
|
|
28
|
-
timeStamp=StructType.UINT64,
|
|
29
|
-
shapeType=StructType.UINT32,
|
|
30
|
-
blockDims=StructType.UINT32,
|
|
31
|
-
modelId=StructType.UINT32,
|
|
32
|
-
streamId=StructType.UINT32,
|
|
33
|
-
taskId=StructType.UINT32,
|
|
34
|
-
threadId=StructType.UINT32,
|
|
35
|
-
reserve=[StructType.UINT8] * 16
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
STEP_INFO_STRUCT = dict(
|
|
39
|
-
magicNumber=StructType.UINT16,
|
|
40
|
-
dataTag=StructType.UINT16,
|
|
41
|
-
modelId=StructType.UINT32,
|
|
42
|
-
streamId=StructType.UINT32,
|
|
43
|
-
taskId=StructType.UINT32,
|
|
44
|
-
timeStamp=StructType.UINT64,
|
|
45
|
-
curIterNum=StructType.UINT64,
|
|
46
|
-
threadId=StructType.UINT32,
|
|
47
|
-
tag=StructType.UINT8,
|
|
48
|
-
reserve=[StructType.UINT8] * 27
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
TENSOR_DATA_STRUCT = dict(
|
|
52
|
-
magicNumber=StructType.UINT16,
|
|
53
|
-
dataTag=StructType.UINT16,
|
|
54
|
-
modelId=StructType.UINT32,
|
|
55
|
-
curIterNum=StructType.UINT64,
|
|
56
|
-
streamId=StructType.UINT32,
|
|
57
|
-
taskId=StructType.UINT32,
|
|
58
|
-
tensorNum=[StructType.UINT8] * 4, # Note: Here the memory is aligned. The actual memory usage is 1, 3 is padding.
|
|
59
|
-
tensorData=[[StructType.UINT32] * 11] * 5,
|
|
60
|
-
reserve=[StructType.UINT8] * 8 # Note: Here the memory is aligned. The actual memory usage is 4, 4 is padding.
|
|
61
|
-
)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Copyright 2024 Huawei Technologies Co., Ltd
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
# ============================================================================
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Copyright 2024 Huawei Technologies Co., Ltd
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
# ============================================================================
|
|
15
|
-
"""Function event data struct."""
|
|
16
|
-
import struct
|
|
17
|
-
|
|
18
|
-
from mindspore.profiler.parser.ascend_analysis.constant import Constant
|
|
19
|
-
from mindspore.profiler.parser.ascend_analysis.function_event import MindSporeOpEnum, MindSporeOpEvent
|
|
20
|
-
from mindspore.profiler.parser.gpu_analysis.profiler_info_parser import GPUProfilerInfoParser
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class GPUMindSporeOpEvent(MindSporeOpEvent):
|
|
24
|
-
"""
|
|
25
|
-
Function event collected on the mindspore frame side.
|
|
26
|
-
|
|
27
|
-
Args:
|
|
28
|
-
data(Dict): The mindspore frame side data decoded by TLVDecoder.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
def _init_params(self):
|
|
32
|
-
"""Initialize the attribute value of MindSporeOpEvent."""
|
|
33
|
-
fix_size_data = struct.unpack(self._fix_data_format, self._orig_data.get(Constant.FIX_SIZE_BYTES))
|
|
34
|
-
self.pid = Constant.MINDSPORE
|
|
35
|
-
self.tid = int(fix_size_data[MindSporeOpEnum.START_THREAD_ID.value])
|
|
36
|
-
self.name = str(self._orig_data.get(self._tlv_type_dict.get(Constant.OP_NAME), ""))
|
|
37
|
-
self.ts = GPUProfilerInfoParser.get_local_time(fix_size_data[MindSporeOpEnum.START_NS.value]) # unit is us
|
|
38
|
-
self.es = GPUProfilerInfoParser.get_local_time(fix_size_data[MindSporeOpEnum.END_NS.value]) # unit is us
|
|
39
|
-
self.dur = self.es - self.ts
|
|
40
|
-
self.flow_id = int(fix_size_data[MindSporeOpEnum.FLOW_ID.value])
|
|
41
|
-
self.step = int(fix_size_data[MindSporeOpEnum.STEP_ID.value])
|
|
42
|
-
self.level = int(fix_size_data[MindSporeOpEnum.LEVEL.value])
|
|
43
|
-
self.custom_info = ""
|
|
44
|
-
self.args = super()._get_args(fix_size_data)
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Copyright 2024 Huawei Technologies Co., Ltd
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
# ============================================================================
|
|
15
|
-
"""MindSpore framework oprange file parser"""
|
|
16
|
-
|
|
17
|
-
import os
|
|
18
|
-
from collections import defaultdict
|
|
19
|
-
|
|
20
|
-
from mindspore import log as logger
|
|
21
|
-
|
|
22
|
-
from mindspore.profiler.parser.ascend_analysis.fwk_file_parser import FwkFileParser
|
|
23
|
-
from mindspore.profiler.parser.ascend_analysis.file_manager import FileManager
|
|
24
|
-
from mindspore.profiler.parser.ascend_analysis.tlv_decoder import TLVDecoder
|
|
25
|
-
from mindspore.profiler.parser.ascend_analysis.trace_event_manager import TraceEventManager
|
|
26
|
-
from mindspore.profiler.parser.ascend_analysis.constant import Constant
|
|
27
|
-
|
|
28
|
-
from mindspore.profiler.parser.gpu_analysis.function_event import GPUMindSporeOpEvent
|
|
29
|
-
from mindspore.profiler.parser.gpu_analysis.profiler_info_parser import GPUProfilerInfoParser
|
|
30
|
-
from mindspore.profiler.common.validator.validate_path import validate_and_normalize_path
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class GPUFwkFileParser(FwkFileParser):
|
|
34
|
-
"""Framework-side operator file parser."""
|
|
35
|
-
|
|
36
|
-
def __init__(self, source_path: str, rank_id: int):
|
|
37
|
-
"""
|
|
38
|
-
source_path: The path of PROF_* directory
|
|
39
|
-
"""
|
|
40
|
-
super(GPUFwkFileParser, self).__init__(source_path, rank_id)
|
|
41
|
-
GPUProfilerInfoParser.init_source_path(source_path)
|
|
42
|
-
GPUProfilerInfoParser.init_rank_id(rank_id)
|
|
43
|
-
|
|
44
|
-
def get_op_range_data(self, step_list=None):
|
|
45
|
-
"""Read and decode all the mindspore oprange data."""
|
|
46
|
-
op_range_list = []
|
|
47
|
-
if os.path.exists(self._op_range_path):
|
|
48
|
-
op_range_bytes = FileManager.read_file_content(self._op_range_path, "rb")
|
|
49
|
-
op_range_list = TLVDecoder.decode(op_range_bytes, GPUMindSporeOpEvent, self._op_range_struct_size)
|
|
50
|
-
else:
|
|
51
|
-
logger.warning("Failed to find op_range data. skip parse host profiler data.")
|
|
52
|
-
return op_range_list
|
|
53
|
-
|
|
54
|
-
def get_fwk_trace_data(self, mindspore_op_data=None):
|
|
55
|
-
"""Generate chrome trace format json data from decoded oprange data."""
|
|
56
|
-
if not mindspore_op_data:
|
|
57
|
-
mindspore_op_data = self.get_op_range_data()
|
|
58
|
-
tid_map = defaultdict(set)
|
|
59
|
-
fwk_x_event_list = []
|
|
60
|
-
dataset_op_data = []
|
|
61
|
-
|
|
62
|
-
for mindspore_op in mindspore_op_data:
|
|
63
|
-
if mindspore_op.name == Constant.FLOW_OP:
|
|
64
|
-
continue
|
|
65
|
-
|
|
66
|
-
if mindspore_op.name.split('::')[0] == 'Dataset':
|
|
67
|
-
dataset_op_data.append(mindspore_op)
|
|
68
|
-
|
|
69
|
-
tid_map[mindspore_op.pid].add(mindspore_op.tid)
|
|
70
|
-
if mindspore_op.dur > 0:
|
|
71
|
-
fwk_x_event_list.append(TraceEventManager.create_x_event(mindspore_op, "cpu_op"))
|
|
72
|
-
else:
|
|
73
|
-
fwk_x_event_list.append(TraceEventManager.create_i_event(mindspore_op))
|
|
74
|
-
|
|
75
|
-
fwk_m_event_list = []
|
|
76
|
-
for pid, tid_set in tid_map.items():
|
|
77
|
-
fwk_m_event_list.extend(TraceEventManager.create_m_event(pid, tid_set, pid))
|
|
78
|
-
|
|
79
|
-
self.calculate_dataset_item(dataset_op_data)
|
|
80
|
-
|
|
81
|
-
return fwk_x_event_list + fwk_m_event_list
|
|
82
|
-
|
|
83
|
-
def _init_framework_path(self, source_path: str):
|
|
84
|
-
"""Init the oprange data path."""
|
|
85
|
-
source_path = validate_and_normalize_path(source_path)
|
|
86
|
-
if not os.path.exists(source_path):
|
|
87
|
-
raise FileNotFoundError("Input source_path does not exist!")
|
|
88
|
-
self._prof_root = source_path
|
|
89
|
-
self._op_range_path = os.path.join(source_path, self._op_range.format(self.rank_id))
|