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
|
@@ -13,45 +13,41 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
# ============================================================================
|
|
15
15
|
"""Profiler Action Controller"""
|
|
16
|
+
__all__ = []
|
|
17
|
+
|
|
16
18
|
from functools import partial
|
|
17
|
-
from typing import
|
|
19
|
+
from typing import Optional, Callable, Any, Dict
|
|
18
20
|
|
|
19
21
|
from mindspore.profiler.profiler_interface import ProfilerInterface
|
|
20
22
|
from mindspore.profiler.schedule import ProfilerAction
|
|
21
|
-
|
|
22
23
|
from mindspore import log as logger
|
|
23
24
|
|
|
24
|
-
__all__ = []
|
|
25
|
-
|
|
26
25
|
|
|
27
26
|
class ProfilerActionController:
|
|
28
27
|
"""
|
|
29
28
|
A controller class for managing profiler actions and transitions.
|
|
30
29
|
|
|
31
30
|
This class handles the actions and transitions between different profiler states.
|
|
32
|
-
It uses
|
|
33
|
-
|
|
31
|
+
It uses an action_map to determine the actions to take based on the previous and
|
|
32
|
+
current profiler actions.
|
|
34
33
|
|
|
35
34
|
Attributes:
|
|
36
|
-
profiler: The profiler instance associated with this controller.
|
|
37
35
|
prof_interface (ProfilerInterface): The profiler interface instance.
|
|
38
36
|
on_trace_ready (Optional[Callable[..., Any]]): A callback function to be called when the trace is ready.
|
|
39
|
-
|
|
40
|
-
normal_action_map (Dict): A map of normal transitions and their corresponding actions.
|
|
37
|
+
action_map (Dict): A map of state transitions and their corresponding actions.
|
|
41
38
|
"""
|
|
42
39
|
|
|
43
40
|
def __init__(self, prof_interface: ProfilerInterface, on_trace_ready: Optional[Callable[..., Any]] = None) -> None:
|
|
44
41
|
"""
|
|
45
|
-
Initializes a new instance of
|
|
42
|
+
Initializes a new instance of ProfilerActionController.
|
|
46
43
|
|
|
47
44
|
Args:
|
|
48
45
|
prof_interface (ProfilerInterface): The profiler interface instance.
|
|
49
46
|
on_trace_ready (Optional[Callable[..., Any]]): A callback function to be called when the trace is ready.
|
|
50
47
|
"""
|
|
51
48
|
self.prof_interface = prof_interface
|
|
52
|
-
self.abnormal_action_map: Dict = self.init_abnormal_action_map()
|
|
53
|
-
self.normal_action_map: Dict = self.init_normal_action_map()
|
|
54
49
|
self.on_trace_ready = on_trace_ready
|
|
50
|
+
self.action_map = self._init_action_map()
|
|
55
51
|
|
|
56
52
|
def _trace_ready(self):
|
|
57
53
|
"""
|
|
@@ -60,84 +56,38 @@ class ProfilerActionController:
|
|
|
60
56
|
This method is called when the trace is ready to notify the callback function.
|
|
61
57
|
"""
|
|
62
58
|
if self.on_trace_ready:
|
|
63
|
-
self.on_trace_ready()
|
|
59
|
+
self.on_trace_ready(self.prof_interface)
|
|
64
60
|
|
|
65
61
|
def transit_action(self, prev_action: ProfilerAction, current_action: ProfilerAction) -> None:
|
|
66
62
|
"""
|
|
67
|
-
Handles actions between previous action and
|
|
63
|
+
Handles actions between previous action and current action
|
|
68
64
|
|
|
69
65
|
Args:
|
|
70
66
|
prev_action: The previous state
|
|
71
|
-
current_action: the
|
|
72
|
-
"""
|
|
73
|
-
# Check whether the action is in the abnormal map
|
|
74
|
-
action_list = self.abnormal_action_map.get((prev_action, current_action), [])
|
|
75
|
-
if not action_list:
|
|
76
|
-
if isinstance(prev_action, ProfilerAction) and isinstance(current_action, ProfilerAction):
|
|
77
|
-
# Check whether the action is in the normal map
|
|
78
|
-
action_list = self.handle_normal_action(prev_action, current_action)
|
|
79
|
-
if not action_list:
|
|
80
|
-
return
|
|
81
|
-
for action in action_list:
|
|
82
|
-
action()
|
|
83
|
-
|
|
84
|
-
def handle_normal_action(self, start_state: ProfilerAction, end_state: ProfilerAction) -> list:
|
|
67
|
+
current_action: the current state
|
|
85
68
|
"""
|
|
86
|
-
|
|
69
|
+
# Get the action list for this state transition
|
|
70
|
+
action_list = self.action_map.get((prev_action, current_action))
|
|
87
71
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
72
|
+
if action_list:
|
|
73
|
+
logger.info(f"ProfilerAction transition: {prev_action} -> {current_action}")
|
|
74
|
+
for action in action_list:
|
|
75
|
+
action()
|
|
91
76
|
|
|
92
|
-
|
|
93
|
-
process_action list
|
|
94
|
-
"""
|
|
95
|
-
process_action = []
|
|
96
|
-
initial_state = start_state
|
|
97
|
-
|
|
98
|
-
# Handle special case for ProfilerAction.RECORD_AND_SAVE to ProfilerAction.RECORD_AND_SAVE transition
|
|
99
|
-
if start_state == ProfilerAction.RECORD_AND_SAVE and end_state == ProfilerAction.RECORD_AND_SAVE:
|
|
100
|
-
process_action = [self.prof_interface.stop, self.prof_interface.finalize,
|
|
101
|
-
self._trace_ready, self.prof_interface.clear, self.prof_interface.init,
|
|
102
|
-
self.prof_interface.start]
|
|
103
|
-
else:
|
|
104
|
-
while start_state != end_state:
|
|
105
|
-
process_action.extend(self.normal_action_map[start_state])
|
|
106
|
-
start_state = ProfilerAction.get_by_value((start_state.value + 1) % len(ProfilerAction))
|
|
107
|
-
|
|
108
|
-
# Handle special cases for NONE to NONE, WARM_UP to WARM_UP, RECORD to RECORD transitions
|
|
109
|
-
if initial_state == start_state and initial_state != ProfilerAction.RECORD_AND_SAVE:
|
|
110
|
-
process_action = []
|
|
111
|
-
|
|
112
|
-
return process_action
|
|
113
|
-
|
|
114
|
-
def init_normal_action_map(self) -> dict:
|
|
77
|
+
def _init_action_map(self) -> Dict:
|
|
115
78
|
"""
|
|
116
|
-
|
|
79
|
+
Initialize the action map for state transitions.
|
|
117
80
|
|
|
118
81
|
Returns:
|
|
119
|
-
|
|
82
|
+
Dict: A map of state transitions and their corresponding actions.
|
|
120
83
|
"""
|
|
121
|
-
|
|
122
|
-
ProfilerAction.NONE: [
|
|
123
|
-
ProfilerAction.WARM_UP: [self.prof_interface.
|
|
124
|
-
ProfilerAction.RECORD: [],
|
|
125
|
-
ProfilerAction.RECORD_AND_SAVE: [
|
|
126
|
-
|
|
127
|
-
self.prof_interface.finalize,
|
|
128
|
-
self._trace_ready,
|
|
129
|
-
self.prof_interface.clear
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
def init_abnormal_action_map(self) -> dict:
|
|
134
|
-
"""
|
|
135
|
-
Generate a abnormal action map
|
|
84
|
+
action_map = {
|
|
85
|
+
(ProfilerAction.NONE, ProfilerAction.NONE): [],
|
|
86
|
+
(ProfilerAction.NONE, ProfilerAction.WARM_UP): [self.prof_interface.init],
|
|
87
|
+
(ProfilerAction.NONE, ProfilerAction.RECORD): [self.prof_interface.init, self.prof_interface.start],
|
|
88
|
+
(ProfilerAction.NONE, ProfilerAction.RECORD_AND_SAVE): [self.prof_interface.init,
|
|
89
|
+
self.prof_interface.start],
|
|
136
90
|
|
|
137
|
-
Returns:
|
|
138
|
-
abnormal_action_map map
|
|
139
|
-
"""
|
|
140
|
-
return {
|
|
141
91
|
(ProfilerAction.WARM_UP, ProfilerAction.NONE): [
|
|
142
92
|
partial(logger.warning, "Incorrect schedule: WARMUP followed by NONE"),
|
|
143
93
|
self.prof_interface.start,
|
|
@@ -145,6 +95,10 @@ class ProfilerActionController:
|
|
|
145
95
|
self.prof_interface.finalize,
|
|
146
96
|
self.prof_interface.clear
|
|
147
97
|
],
|
|
98
|
+
(ProfilerAction.WARM_UP, ProfilerAction.WARM_UP): [],
|
|
99
|
+
(ProfilerAction.WARM_UP, ProfilerAction.RECORD): [self.prof_interface.start],
|
|
100
|
+
(ProfilerAction.WARM_UP, ProfilerAction.RECORD_AND_SAVE): [self.prof_interface.start],
|
|
101
|
+
|
|
148
102
|
(ProfilerAction.RECORD, ProfilerAction.NONE): [
|
|
149
103
|
partial(logger.warning, "Incorrect schedule: RECORD followed by NONE"),
|
|
150
104
|
self.prof_interface.stop,
|
|
@@ -157,7 +111,40 @@ class ProfilerActionController:
|
|
|
157
111
|
self.prof_interface.finalize,
|
|
158
112
|
self.prof_interface.clear
|
|
159
113
|
],
|
|
160
|
-
|
|
114
|
+
(ProfilerAction.RECORD, ProfilerAction.RECORD): [],
|
|
115
|
+
(ProfilerAction.RECORD, ProfilerAction.RECORD_AND_SAVE): [],
|
|
116
|
+
|
|
117
|
+
(ProfilerAction.RECORD_AND_SAVE, ProfilerAction.NONE): [
|
|
118
|
+
self.prof_interface.stop,
|
|
119
|
+
self.prof_interface.finalize,
|
|
120
|
+
self._trace_ready,
|
|
121
|
+
self.prof_interface.clear
|
|
122
|
+
],
|
|
123
|
+
(ProfilerAction.RECORD_AND_SAVE, ProfilerAction.WARM_UP): [
|
|
124
|
+
self.prof_interface.stop,
|
|
125
|
+
self.prof_interface.finalize,
|
|
126
|
+
self._trace_ready,
|
|
127
|
+
self.prof_interface.clear,
|
|
128
|
+
self.prof_interface.init,
|
|
129
|
+
],
|
|
130
|
+
(ProfilerAction.RECORD_AND_SAVE, ProfilerAction.RECORD): [
|
|
131
|
+
self.prof_interface.stop,
|
|
132
|
+
self.prof_interface.finalize,
|
|
133
|
+
self._trace_ready,
|
|
134
|
+
self.prof_interface.clear,
|
|
135
|
+
self.prof_interface.init,
|
|
136
|
+
self.prof_interface.start
|
|
137
|
+
],
|
|
138
|
+
(ProfilerAction.RECORD_AND_SAVE, ProfilerAction.RECORD_AND_SAVE): [
|
|
139
|
+
self.prof_interface.stop,
|
|
140
|
+
self.prof_interface.finalize,
|
|
141
|
+
self._trace_ready,
|
|
142
|
+
self.prof_interface.clear,
|
|
143
|
+
self.prof_interface.init,
|
|
144
|
+
self.prof_interface.start
|
|
145
|
+
],
|
|
146
|
+
|
|
147
|
+
# Used for exit action
|
|
161
148
|
(ProfilerAction.WARM_UP, None): [
|
|
162
149
|
partial(logger.warning,
|
|
163
150
|
"Incorrect schedule: Stop profiler while current state is WARMUP "
|
|
@@ -185,3 +172,4 @@ class ProfilerActionController:
|
|
|
185
172
|
self.prof_interface.clear
|
|
186
173
|
]
|
|
187
174
|
}
|
|
175
|
+
return action_map
|
|
@@ -76,14 +76,14 @@ class ProfilerInterface:
|
|
|
76
76
|
logger.info("ProfilerInterface stop")
|
|
77
77
|
|
|
78
78
|
@classmethod
|
|
79
|
-
def analyse(cls):
|
|
79
|
+
def analyse(cls, **kwargs):
|
|
80
80
|
"""ProfilerInterface analyse"""
|
|
81
81
|
if not cls.is_initialized:
|
|
82
82
|
logger.warning("ProfilerInterface analyse failed, profiler has not been initialized.")
|
|
83
83
|
return
|
|
84
84
|
|
|
85
85
|
for profiler in cls.platform_profilers_set:
|
|
86
|
-
profiler.analyse()
|
|
86
|
+
profiler.analyse(**kwargs)
|
|
87
87
|
|
|
88
88
|
logger.info("ProfilerInterface analyse")
|
|
89
89
|
|
mindspore/profiler/schedule.py
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
# ============================================================================
|
|
15
15
|
"""Profiler Schedule"""
|
|
16
|
+
__all__ = ["ProfilerAction", "Schedule"]
|
|
17
|
+
|
|
16
18
|
from enum import Enum
|
|
17
19
|
|
|
18
20
|
from mindspore import log as logger
|
|
19
21
|
|
|
20
|
-
__all__ = ["ProfilerAction", "Schedule"]
|
|
21
|
-
|
|
22
22
|
|
|
23
23
|
class ProfilerAction(Enum):
|
|
24
24
|
"""
|
|
@@ -83,8 +83,14 @@ class Schedule:
|
|
|
83
83
|
must be greater than or equal to 0. Default value: ``0``.
|
|
84
84
|
repeat (int, optional): The number of times to repeat the cycle.
|
|
85
85
|
If repeat is set to 0, the Profiler will determine the repeat value based on the number of times the model
|
|
86
|
-
is trained,
|
|
87
|
-
|
|
86
|
+
is trained, for example, if the total training steps are 100, wait+active+warmup=10, skip_first=10,
|
|
87
|
+
Then repeat=(100-10)/10=9, indicating that the execution is repeated 9 timeswhich will
|
|
88
|
+
generate one more performance data with incomplete collection. The data in the last step is abnormal data
|
|
89
|
+
that users do not need to pay attention to. Suggest configuring integers greater than 0. When using
|
|
90
|
+
cluster analysis tools or MindStudio Insight to view, it is recommended to configure it as 1;
|
|
91
|
+
If the setting is greater than 1, the collected performance data folder needs to be divided into repeat and
|
|
92
|
+
other parts, placed in different folders for re-parsing, and classified according to the timestamp order in
|
|
93
|
+
the folder name. Default value: ``0``.
|
|
88
94
|
skip_first (int, optional): The number of steps to skip at the beginning. Must be greater than or equal to 0.
|
|
89
95
|
Default value: ``0``
|
|
90
96
|
|
mindspore/rewrite/node/node.py
CHANGED
|
@@ -124,9 +124,14 @@ class Node:
|
|
|
124
124
|
self._init_cls = None
|
|
125
125
|
|
|
126
126
|
@classmethod
|
|
127
|
-
def create_call_method(
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
def create_call_method(
|
|
128
|
+
cls,
|
|
129
|
+
ast_node: Optional[ast.AST],
|
|
130
|
+
targets: [Union[ScopedValue, str]],
|
|
131
|
+
func_name: Union[ScopedValue, str],
|
|
132
|
+
args: [ScopedValue] = None,
|
|
133
|
+
kwargs: {str: ScopedValue} = None, # pylint: disable=bad-whitespace
|
|
134
|
+
name: str = ""):
|
|
130
135
|
"""
|
|
131
136
|
Class method of Node. Instantiate an instance of node whose type is CallCell. A CallCell node represents an
|
|
132
137
|
invoking to cell-op.
|
|
@@ -227,8 +232,12 @@ class Node:
|
|
|
227
232
|
return cls(NodeType.MathOps, ast_node, targets, op_type, args, None, name, None)
|
|
228
233
|
|
|
229
234
|
@staticmethod
|
|
230
|
-
def _create_call_function(
|
|
231
|
-
|
|
235
|
+
def _create_call_function(
|
|
236
|
+
function: FunctionType,
|
|
237
|
+
targets: [Union[ScopedValue, str]],
|
|
238
|
+
args: [ScopedValue] = None,
|
|
239
|
+
kwargs: {str: ScopedValue} = None # pylint: disable=bad-whitespace
|
|
240
|
+
):
|
|
232
241
|
"""
|
|
233
242
|
Create a node that corresponds to a function call.
|
|
234
243
|
|
|
@@ -275,9 +284,14 @@ class Node:
|
|
|
275
284
|
return CallFunction(targets, func_name, args, kwargs, node_name, ast_node, None, None, func_obj, False)
|
|
276
285
|
|
|
277
286
|
@staticmethod
|
|
278
|
-
def create_call_op(
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
def create_call_op(
|
|
288
|
+
op: Union[Cell, Primitive],
|
|
289
|
+
ast_node: Optional[ast.AST],
|
|
290
|
+
targets: [Union[ScopedValue, str]],
|
|
291
|
+
args: [ScopedValue] = None,
|
|
292
|
+
kwargs: {str: ScopedValue} = None, # pylint: disable=bad-whitespace
|
|
293
|
+
node_name: str = "",
|
|
294
|
+
is_sub_net: bool = False):
|
|
281
295
|
"""
|
|
282
296
|
Static method of Node. Instantiate an instance of node whose type is `CallCell` or `CallPrimitive`.
|
|
283
297
|
If op is custom defined, it is treated by TreeNode.
|
|
@@ -325,9 +339,15 @@ class Node:
|
|
|
325
339
|
return Node.create_call_buildin_op(op, ast_node, new_targets, func_name, args, kwargs, node_name)
|
|
326
340
|
|
|
327
341
|
@classmethod
|
|
328
|
-
def create_call_buildin_op(
|
|
329
|
-
|
|
330
|
-
|
|
342
|
+
def create_call_buildin_op(
|
|
343
|
+
cls,
|
|
344
|
+
op: Union[Cell, Primitive],
|
|
345
|
+
ast_node: Optional[ast.AST],
|
|
346
|
+
targets: [ScopedValue],
|
|
347
|
+
func_name: ScopedValue,
|
|
348
|
+
args: [ScopedValue] = None,
|
|
349
|
+
kwargs: {str: ScopedValue} = None, # pylint: disable=bad-whitespace
|
|
350
|
+
node_name: str = ""):
|
|
331
351
|
"""
|
|
332
352
|
Class method of Node. Instantiate an instance of node whose type is `CallCell` or `CallPrimitive`.
|
|
333
353
|
A `CallCell` node represents an invoking to cell-op.
|
|
@@ -46,7 +46,7 @@ class AssignParser(Parser):
|
|
|
46
46
|
"""Parse ast.Assign in construct function to node of SymbolTree."""
|
|
47
47
|
|
|
48
48
|
# Types for creating Cell Container node
|
|
49
|
-
types_for_cell_container = [SequentialCell
|
|
49
|
+
types_for_cell_container = [SequentialCell]
|
|
50
50
|
# If mindspore built-in function to be parsered or skipped
|
|
51
51
|
_skip_ms_function = False
|
|
52
52
|
# Functions in black list will not be parsed
|
|
@@ -1503,7 +1503,7 @@ class SymbolTree(Observer, Observable, NodeManager):
|
|
|
1503
1503
|
"""
|
|
1504
1504
|
# ast.Constant can be check without eval
|
|
1505
1505
|
if isinstance(ast_node, ast.Constant):
|
|
1506
|
-
return True, bool(
|
|
1506
|
+
return True, bool(ast_node.value)
|
|
1507
1507
|
# Get the module where the code of ast_node is located
|
|
1508
1508
|
file_path = inspect.getfile(type(self.get_origin_network()))
|
|
1509
1509
|
module = None
|
|
@@ -1790,7 +1790,7 @@ class SymbolTree(Observer, Observable, NodeManager):
|
|
|
1790
1790
|
if idx > 0:
|
|
1791
1791
|
name_need_suffix[name] = suffix_alias(alias, idx)
|
|
1792
1792
|
break
|
|
1793
|
-
|
|
1793
|
+
if ast_node.module.startswith(path):
|
|
1794
1794
|
# e.g. origin code is 'from a.b import A' and new code is 'from a.b.c import A'
|
|
1795
1795
|
# then we just need to update name to A_{idx}
|
|
1796
1796
|
if idx > 0:
|
|
@@ -124,9 +124,9 @@ class GPUEnvChecker(EnvChecker):
|
|
|
124
124
|
for path in self.cuda_lib_path:
|
|
125
125
|
real_path = glob.glob(path + "/lib*/libcudart.so.*.*.*")
|
|
126
126
|
# /usr/lib/x86_64-linux-gnu is a default dir for cuda10.1 on ubuntu.
|
|
127
|
-
if real_path
|
|
127
|
+
if not real_path:
|
|
128
128
|
real_path = glob.glob(path + "/x86_64-linux-gnu/libcudart.so.*.*.*")
|
|
129
|
-
if real_path
|
|
129
|
+
if not real_path:
|
|
130
130
|
continue
|
|
131
131
|
ls_cudart = subprocess.run(["ls", real_path[0]], timeout=10, text=True,
|
|
132
132
|
capture_output=True, check=False)
|
|
@@ -258,7 +258,7 @@ class AscendEnvChecker(EnvChecker):
|
|
|
258
258
|
|
|
259
259
|
def __init__(self, library_path):
|
|
260
260
|
self.library_path = library_path
|
|
261
|
-
self.version = ["7.
|
|
261
|
+
self.version = ["7.7", "7.8", "8.2"]
|
|
262
262
|
|
|
263
263
|
# env
|
|
264
264
|
self.path = os.getenv("PATH")
|
|
@@ -293,7 +293,7 @@ class AscendEnvChecker(EnvChecker):
|
|
|
293
293
|
|
|
294
294
|
cur_version = self._read_version(self.compiler_version)
|
|
295
295
|
custom_version_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
|
296
|
-
"../lib/plugin/ascend/
|
|
296
|
+
"../lib/plugin/ascend/custom_ascendc_910b/version.info")
|
|
297
297
|
with open(custom_version_path, 'r') as f:
|
|
298
298
|
all_info = f.readlines()
|
|
299
299
|
for line in all_info:
|
|
@@ -375,18 +375,15 @@ class AscendEnvChecker(EnvChecker):
|
|
|
375
375
|
curr_path = os.path.realpath(os.path.dirname(__file__))
|
|
376
376
|
cust_aicpu_path = os.path.realpath(os.path.join(curr_path, "../lib/plugin/ascend/custom_aicpu_ops"))
|
|
377
377
|
cust_aicore_path = os.path.realpath(os.path.join(curr_path, "../lib/plugin/ascend/custom_aicore_ops"))
|
|
378
|
-
cust_ascendc_ascend910_path = os.path.realpath(
|
|
379
|
-
os.path.join(curr_path, "../lib/plugin/ascend/custom_ascendc_910"))
|
|
380
378
|
cust_ascendc_ascend910b_path = os.path.realpath(
|
|
381
379
|
os.path.join(curr_path, "../lib/plugin/ascend/custom_ascendc_910b"))
|
|
382
380
|
if os.getenv('ASCEND_CUSTOM_OPP_PATH'):
|
|
383
381
|
os.environ['ASCEND_CUSTOM_OPP_PATH'] = os.environ['ASCEND_CUSTOM_OPP_PATH'] + ":" + \
|
|
384
|
-
cust_ascendc_ascend910_path + ":" + cust_ascendc_ascend910b_path + \
|
|
385
|
-
":" + cust_aicore_path + ":" + cust_aicpu_path
|
|
386
|
-
else:
|
|
387
|
-
os.environ['ASCEND_CUSTOM_OPP_PATH'] = cust_ascendc_ascend910_path + ":" + \
|
|
388
382
|
cust_ascendc_ascend910b_path + ":" + cust_aicore_path + ":" + \
|
|
389
383
|
cust_aicpu_path
|
|
384
|
+
else:
|
|
385
|
+
os.environ['ASCEND_CUSTOM_OPP_PATH'] = cust_ascendc_ascend910b_path + ":" + cust_aicore_path + ":" + \
|
|
386
|
+
cust_aicpu_path
|
|
390
387
|
# Ignore ge infer missing error. To be removed after infers are completed.
|
|
391
388
|
os.environ['FAST_IGNORE_INFER_ERROR'] = "1"
|
|
392
389
|
os.environ['IGNORE_INFER_ERROR'] = "1"
|
mindspore/runtime/__init__.py
CHANGED
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
The runtime interface.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
from mindspore.runtime.executor import launch_blocking, dispatch_threads_num, set_cpu_affinity
|
|
20
|
+
from mindspore.runtime.executor import launch_blocking, dispatch_threads_num, set_cpu_affinity,\
|
|
21
|
+
set_kernel_launch_group, set_kernel_launch_capture
|
|
21
22
|
from mindspore.runtime.memory import set_memory, memory_stats, memory_reserved, max_memory_reserved, empty_cache,\
|
|
22
|
-
reset_peak_memory_stats, memory_summary, memory_allocated,\
|
|
23
|
+
memory_replay, reset_peak_memory_stats, memory_summary, memory_allocated,\
|
|
23
24
|
max_memory_allocated, reset_max_memory_reserved, reset_max_memory_allocated
|
|
24
25
|
from mindspore.runtime.stream import Stream, synchronize, set_cur_stream, current_stream, \
|
|
25
26
|
default_stream, communication_stream, StreamCtx
|
|
@@ -27,11 +28,12 @@ from mindspore.runtime.event import Event
|
|
|
27
28
|
from .executor import launch_blocking
|
|
28
29
|
|
|
29
30
|
__all__ = [
|
|
30
|
-
"launch_blocking", "dispatch_threads_num", "set_cpu_affinity",
|
|
31
|
+
"launch_blocking", "dispatch_threads_num", "set_cpu_affinity",
|
|
32
|
+
"set_kernel_launch_group", "set_kernel_launch_capture",
|
|
31
33
|
"Stream", "communication_stream", "synchronize", "set_cur_stream", "current_stream", "default_stream", "StreamCtx",
|
|
32
|
-
"set_memory", "memory_stats", "memory_reserved", "max_memory_reserved", "empty_cache", "
|
|
33
|
-
"
|
|
34
|
-
"reset_max_memory_allocated", "Event"
|
|
34
|
+
"set_memory", "memory_stats", "memory_reserved", "max_memory_reserved", "empty_cache", "memory_replay",
|
|
35
|
+
"reset_peak_memory_stats", "memory_summary", "memory_allocated", "max_memory_allocated",
|
|
36
|
+
"reset_max_memory_reserved", "reset_max_memory_allocated", "Event"
|
|
35
37
|
]
|
|
36
38
|
|
|
37
39
|
__all__.sort()
|
mindspore/runtime/event.py
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
from mindspore._c_expression import Event as Event_
|
|
17
17
|
from mindspore._c_expression import Stream as Stream_
|
|
18
18
|
from mindspore._c_expression import current_stream as current_stream_
|
|
19
|
-
from mindspore import _checkparam as Validator
|
|
20
19
|
from .device import _is_supported
|
|
21
20
|
|
|
22
21
|
function_event_status = {'Event': False, 'wait': False}
|
|
@@ -71,9 +70,16 @@ class Event(Event_):
|
|
|
71
70
|
function_event_status['Event'] = True
|
|
72
71
|
if not _is_supported():
|
|
73
72
|
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
if not isinstance(enable_timing, bool):
|
|
74
|
+
raise TypeError(
|
|
75
|
+
f"For 'Event', the 'enable_timing' must be a bool,"
|
|
76
|
+
f" but got {type(enable_timing).__name__}."
|
|
77
|
+
)
|
|
78
|
+
if not isinstance(blocking, bool):
|
|
79
|
+
raise TypeError(
|
|
80
|
+
f"For 'Event', the 'blocking' must be a bool,"
|
|
81
|
+
f" but got {type(blocking).__name__}."
|
|
82
|
+
)
|
|
77
83
|
super().__init__(enable_timing, blocking)
|
|
78
84
|
|
|
79
85
|
def record(self, stream=None):
|