mindspore 2.6.0__cp310-cp310-win_amd64.whl → 2.7.0__cp310-cp310-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.cp310-win_amd64.pyd +0 -0
- mindspore/_c_expression.cp310-win_amd64.pyd +0 -0
- mindspore/_c_mindrecord.cp310-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
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
|
|
29
29
|
namespace mindspore {
|
|
30
30
|
using VecChar = std::vector<char>;
|
|
31
|
+
/// \brief Transform string to char.
|
|
32
|
+
///
|
|
33
|
+
/// \param[in] s Define the string to transform.
|
|
34
|
+
///
|
|
35
|
+
/// \return Vector of chars.
|
|
31
36
|
inline std::vector<char> StringToChar(const std::string &s) {
|
|
32
37
|
if (s.empty()) {
|
|
33
38
|
const auto empty = std::vector<char>();
|
|
@@ -35,7 +40,11 @@ inline std::vector<char> StringToChar(const std::string &s) {
|
|
|
35
40
|
}
|
|
36
41
|
return std::vector<char>(s.begin(), s.end());
|
|
37
42
|
}
|
|
38
|
-
|
|
43
|
+
/// \brief Transform char to string.
|
|
44
|
+
///
|
|
45
|
+
/// \param[in] c Define the chars to transform.
|
|
46
|
+
///
|
|
47
|
+
/// \return String.
|
|
39
48
|
inline std::string CharToString(const std::vector<char> &c) {
|
|
40
49
|
if (c.empty()) {
|
|
41
50
|
const auto empty = "";
|
|
@@ -43,43 +52,71 @@ inline std::string CharToString(const std::vector<char> &c) {
|
|
|
43
52
|
}
|
|
44
53
|
return std::string(c.begin(), c.end());
|
|
45
54
|
}
|
|
46
|
-
|
|
55
|
+
/// \brief Transform pair of string to char.
|
|
56
|
+
///
|
|
57
|
+
/// \param[in] s Pair of strings to transform.
|
|
58
|
+
///
|
|
59
|
+
/// \return Pair of chars.
|
|
47
60
|
inline std::pair<std::vector<char>, int32_t> PairStringToChar(const std::pair<std::string, int32_t> &s) {
|
|
48
61
|
return std::pair<std::vector<char>, int32_t>(std::vector<char>(s.first.begin(), s.first.end()), s.second);
|
|
49
62
|
}
|
|
50
|
-
|
|
63
|
+
/// \brief Transform pair of char to string.
|
|
64
|
+
///
|
|
65
|
+
/// \param[in] c Pair of chars to transform.
|
|
66
|
+
///
|
|
67
|
+
/// \return Pair of strings.
|
|
51
68
|
inline std::pair<std::string, int32_t> PairCharToString(const std::pair<std::vector<char>, int32_t> &c) {
|
|
52
69
|
return std::pair<std::string, int32_t>(std::string(c.first.begin(), c.first.end()), c.second);
|
|
53
70
|
}
|
|
54
|
-
|
|
71
|
+
/// \brief Transform vector of string to chars.
|
|
72
|
+
///
|
|
73
|
+
/// \param[in] s Vector of strings.
|
|
74
|
+
///
|
|
75
|
+
/// \return Vector of vector of chars.
|
|
55
76
|
inline std::vector<std::vector<char>> VectorStringToChar(const std::vector<std::string> &s) {
|
|
56
77
|
std::vector<std::vector<char>> ret;
|
|
57
78
|
std::transform(s.begin(), s.end(), std::back_inserter(ret),
|
|
58
79
|
[](auto str) { return std::vector<char>(str.begin(), str.end()); });
|
|
59
80
|
return ret;
|
|
60
81
|
}
|
|
61
|
-
|
|
82
|
+
/// \brief Transform vector of chars to strings.
|
|
83
|
+
///
|
|
84
|
+
/// \param[in] c Vector of vector ofof schars.
|
|
85
|
+
///
|
|
86
|
+
/// \return Vector of strings.
|
|
62
87
|
inline std::vector<std::string> VectorCharToString(const std::vector<std::vector<char>> &c) {
|
|
63
88
|
std::vector<std::string> ret;
|
|
64
89
|
std::transform(c.begin(), c.end(), std::back_inserter(ret),
|
|
65
90
|
[](auto ch) { return std::string(ch.begin(), ch.end()); });
|
|
66
91
|
return ret;
|
|
67
92
|
}
|
|
68
|
-
|
|
93
|
+
/// \brief Transform set of strings to chars.
|
|
94
|
+
///
|
|
95
|
+
/// \param[in] s Set of strings.
|
|
96
|
+
///
|
|
97
|
+
/// \return Set of vector of chars.
|
|
69
98
|
inline std::set<std::vector<char>> SetStringToChar(const std::set<std::string> &s) {
|
|
70
99
|
std::set<std::vector<char>> ret;
|
|
71
100
|
std::transform(s.begin(), s.end(), std::inserter(ret, ret.begin()),
|
|
72
101
|
[](auto str) { return std::vector<char>(str.begin(), str.end()); });
|
|
73
102
|
return ret;
|
|
74
103
|
}
|
|
75
|
-
|
|
104
|
+
/// \brief Transform set of chars to strings.
|
|
105
|
+
///
|
|
106
|
+
/// \param[in] c Set of chars.
|
|
107
|
+
///
|
|
108
|
+
/// \return Set of strings.
|
|
76
109
|
inline std::set<std::string> SetCharToString(const std::set<std::vector<char>> &c) {
|
|
77
110
|
std::set<std::string> ret;
|
|
78
111
|
std::transform(c.begin(), c.end(), std::inserter(ret, ret.begin()),
|
|
79
112
|
[](auto ch) { return std::string(ch.begin(), ch.end()); });
|
|
80
113
|
return ret;
|
|
81
114
|
}
|
|
82
|
-
|
|
115
|
+
/// \brief Transform map of strings to chars.
|
|
116
|
+
///
|
|
117
|
+
/// \param[in] s Map of strings.
|
|
118
|
+
///
|
|
119
|
+
/// \return Map of vector of chars.
|
|
83
120
|
template <class T>
|
|
84
121
|
inline std::map<std::vector<char>, T> MapStringToChar(const std::map<std::string, T> &s) {
|
|
85
122
|
std::map<std::vector<char>, T> ret;
|
|
@@ -88,7 +125,11 @@ inline std::map<std::vector<char>, T> MapStringToChar(const std::map<std::string
|
|
|
88
125
|
});
|
|
89
126
|
return ret;
|
|
90
127
|
}
|
|
91
|
-
|
|
128
|
+
/// \brief Transform map of chars to strings.
|
|
129
|
+
///
|
|
130
|
+
/// \param[in] c Map of vector of chars.
|
|
131
|
+
///
|
|
132
|
+
/// \return Map of strings.
|
|
92
133
|
template <class T>
|
|
93
134
|
inline std::map<std::string, T> MapCharToString(const std::map<std::vector<char>, T> &c) {
|
|
94
135
|
std::map<std::string, T> ret;
|
|
@@ -97,7 +138,11 @@ inline std::map<std::string, T> MapCharToString(const std::map<std::vector<char>
|
|
|
97
138
|
});
|
|
98
139
|
return ret;
|
|
99
140
|
}
|
|
100
|
-
|
|
141
|
+
/// \brief Transform unordered map of strings to chars.
|
|
142
|
+
///
|
|
143
|
+
/// \param[in] s Unordered_map of strings.
|
|
144
|
+
///
|
|
145
|
+
/// \return Map of vector of chars.
|
|
101
146
|
inline std::map<std::vector<char>, std::vector<char>> UnorderedMapStringToChar(
|
|
102
147
|
const std::unordered_map<std::string, std::string> &s) {
|
|
103
148
|
std::map<std::vector<char>, std::vector<char>> ret;
|
|
@@ -107,7 +152,11 @@ inline std::map<std::vector<char>, std::vector<char>> UnorderedMapStringToChar(
|
|
|
107
152
|
});
|
|
108
153
|
return ret;
|
|
109
154
|
}
|
|
110
|
-
|
|
155
|
+
/// \brief Transform unordered map of chars to strings.
|
|
156
|
+
///
|
|
157
|
+
/// \param[in] c Map of vector of chars.
|
|
158
|
+
///
|
|
159
|
+
/// \return Unordered map of strings.
|
|
111
160
|
inline std::unordered_map<std::string, std::string> UnorderedMapCharToString(
|
|
112
161
|
const std::map<std::vector<char>, std::vector<char>> &c) {
|
|
113
162
|
std::unordered_map<std::string, std::string> ret;
|
|
@@ -117,7 +166,11 @@ inline std::unordered_map<std::string, std::string> UnorderedMapCharToString(
|
|
|
117
166
|
});
|
|
118
167
|
return ret;
|
|
119
168
|
}
|
|
120
|
-
|
|
169
|
+
/// \brief Transform map of strings to vector of chars.
|
|
170
|
+
///
|
|
171
|
+
/// \param[in] s Map of vector of strings.
|
|
172
|
+
///
|
|
173
|
+
/// \return Map of vector of chars.
|
|
121
174
|
inline std::map<std::vector<char>, std::vector<char>> MapStringToVectorChar(
|
|
122
175
|
const std::map<std::string, std::string> &s) {
|
|
123
176
|
std::map<std::vector<char>, std::vector<char>> ret;
|
|
@@ -127,7 +180,11 @@ inline std::map<std::vector<char>, std::vector<char>> MapStringToVectorChar(
|
|
|
127
180
|
});
|
|
128
181
|
return ret;
|
|
129
182
|
}
|
|
130
|
-
|
|
183
|
+
/// \brief Transform map of chars to strings.
|
|
184
|
+
///
|
|
185
|
+
/// \param[in] c Map of vector of chars.
|
|
186
|
+
///
|
|
187
|
+
/// \return Map of strings.
|
|
131
188
|
inline std::map<std::string, std::string> MapVectorCharToString(
|
|
132
189
|
const std::map<std::vector<char>, std::vector<char>> &c) {
|
|
133
190
|
std::map<std::string, std::string> ret;
|
|
@@ -137,7 +194,11 @@ inline std::map<std::string, std::string> MapVectorCharToString(
|
|
|
137
194
|
});
|
|
138
195
|
return ret;
|
|
139
196
|
}
|
|
140
|
-
|
|
197
|
+
/// \brief Transform class index string to char.
|
|
198
|
+
///
|
|
199
|
+
/// \param[in] s Vector of pair of strings.
|
|
200
|
+
///
|
|
201
|
+
/// \return Vector of pair of vector of chars.
|
|
141
202
|
inline std::vector<std::pair<std::vector<char>, std::vector<int32_t>>> ClassIndexStringToChar(
|
|
142
203
|
const std::vector<std::pair<std::string, std::vector<int32_t>>> &s) {
|
|
143
204
|
std::vector<std::pair<std::vector<char>, std::vector<int32_t>>> ret;
|
|
@@ -147,7 +208,11 @@ inline std::vector<std::pair<std::vector<char>, std::vector<int32_t>>> ClassInde
|
|
|
147
208
|
});
|
|
148
209
|
return ret;
|
|
149
210
|
}
|
|
150
|
-
|
|
211
|
+
/// \brief Transform class index char to string.
|
|
212
|
+
///
|
|
213
|
+
/// \param[in] c Vector of pair of schar.
|
|
214
|
+
///
|
|
215
|
+
/// \return Vector of pair of vector of strings.
|
|
151
216
|
inline std::vector<std::pair<std::string, std::vector<int32_t>>> ClassIndexCharToString(
|
|
152
217
|
const std::vector<std::pair<std::vector<char>, std::vector<int32_t>>> &c) {
|
|
153
218
|
std::vector<std::pair<std::string, std::vector<int32_t>>> ret;
|
|
@@ -156,7 +221,11 @@ inline std::vector<std::pair<std::string, std::vector<int32_t>>> ClassIndexCharT
|
|
|
156
221
|
});
|
|
157
222
|
return ret;
|
|
158
223
|
}
|
|
159
|
-
|
|
224
|
+
/// \brief Transform pair string of int64 to pair char of int64.
|
|
225
|
+
///
|
|
226
|
+
/// \param[in] s Vector of pair of strings.
|
|
227
|
+
///
|
|
228
|
+
/// \return Vector of pair of vector of chars.
|
|
160
229
|
inline std::vector<std::pair<std::vector<char>, int64_t>> PairStringInt64ToPairCharInt64(
|
|
161
230
|
const std::vector<std::pair<std::string, int64_t>> &s) {
|
|
162
231
|
std::vector<std::pair<std::vector<char>, int64_t>> ret;
|
|
@@ -165,7 +234,11 @@ inline std::vector<std::pair<std::vector<char>, int64_t>> PairStringInt64ToPairC
|
|
|
165
234
|
});
|
|
166
235
|
return ret;
|
|
167
236
|
}
|
|
168
|
-
|
|
237
|
+
/// \brief Transform tensor map of char to string.
|
|
238
|
+
///
|
|
239
|
+
/// \param[in] c Map of Vector of chars.
|
|
240
|
+
///
|
|
241
|
+
/// \param[in] s Unordered map of strings, which will be changed after the function.
|
|
169
242
|
template <class T>
|
|
170
243
|
inline void TensorMapCharToString(const std::map<std::vector<char>, T> *c, std::unordered_map<std::string, T> *s) {
|
|
171
244
|
if (c == nullptr || s == nullptr) {
|
|
@@ -177,7 +250,11 @@ inline void TensorMapCharToString(const std::map<std::vector<char>, T> *c, std::
|
|
|
177
250
|
s->insert(std::pair<std::string, T>(key, val));
|
|
178
251
|
}
|
|
179
252
|
}
|
|
180
|
-
|
|
253
|
+
/// \brief Transform map of map of chars to map of strings.
|
|
254
|
+
///
|
|
255
|
+
/// \param[in] c Map of map of chars.
|
|
256
|
+
///
|
|
257
|
+
/// \return Map of strings.
|
|
181
258
|
inline std::map<std::string, std::map<std::string, std::string>> MapMapCharToString(
|
|
182
259
|
const std::map<std::vector<char>, std::map<std::vector<char>, std::vector<char>>> &c) {
|
|
183
260
|
std::map<std::string, std::map<std::string, std::string>> ret;
|
|
@@ -191,7 +268,11 @@ inline std::map<std::string, std::map<std::string, std::string>> MapMapCharToStr
|
|
|
191
268
|
}
|
|
192
269
|
return ret;
|
|
193
270
|
}
|
|
194
|
-
|
|
271
|
+
/// \brief Transform map of map of strings to map of chars.
|
|
272
|
+
///
|
|
273
|
+
/// \param[in] s Map of map of strings.
|
|
274
|
+
///
|
|
275
|
+
/// \return Map of chars.
|
|
195
276
|
inline std::map<std::vector<char>, std::map<std::vector<char>, std::vector<char>>> MapMapStringToChar(
|
|
196
277
|
const std::map<std::string, std::map<std::string, std::string>> &s) {
|
|
197
278
|
std::map<std::vector<char>, std::map<std::vector<char>, std::vector<char>>> ret;
|
mindspore/include/api/graph.h
CHANGED
|
@@ -27,14 +27,27 @@ namespace mindspore {
|
|
|
27
27
|
class MS_API Graph {
|
|
28
28
|
public:
|
|
29
29
|
class GraphData;
|
|
30
|
+
/// \brief Constructor of graph.
|
|
30
31
|
Graph();
|
|
32
|
+
/// \brief Constructor of graph.
|
|
33
|
+
///
|
|
34
|
+
/// \param[in] graph_data define the graph_data of graph.
|
|
31
35
|
explicit Graph(const std::shared_ptr<GraphData> &graph_data);
|
|
36
|
+
/// \brief Constructor of graph.
|
|
37
|
+
///
|
|
38
|
+
/// \param[in] graph_data define the graph_data of graph.
|
|
32
39
|
explicit Graph(std::shared_ptr<GraphData> &&graph_data);
|
|
40
|
+
/// \brief Constructor of Kernel.
|
|
33
41
|
explicit Graph(std::nullptr_t);
|
|
42
|
+
/// \brief Destructor of graph.
|
|
34
43
|
~Graph();
|
|
35
|
-
|
|
44
|
+
/// \brief Get graph's modeltype.
|
|
45
|
+
///
|
|
46
|
+
/// \return Model type.
|
|
36
47
|
enum ModelType ModelType() const;
|
|
48
|
+
/// \brief Operator equal.
|
|
37
49
|
bool operator==(std::nullptr_t) const;
|
|
50
|
+
/// \brief Operator not equal.
|
|
38
51
|
bool operator!=(std::nullptr_t) const;
|
|
39
52
|
|
|
40
53
|
private:
|
mindspore/include/api/kernel.h
CHANGED
|
@@ -28,22 +28,35 @@
|
|
|
28
28
|
namespace mindspore::kernel {
|
|
29
29
|
class MS_API Kernel : public IKernel<schema::Primitive> {
|
|
30
30
|
public:
|
|
31
|
+
/// \brief Constructor of Kernel.
|
|
31
32
|
Kernel() = default;
|
|
33
|
+
/// \brief Constructor of Kernel.
|
|
34
|
+
///
|
|
35
|
+
/// \param[in] inputs Input tensors.
|
|
36
|
+
///
|
|
37
|
+
/// \param[in] outputs Output tensors.
|
|
38
|
+
///
|
|
39
|
+
/// \param[in] primitive The primitive of kernel.
|
|
40
|
+
///
|
|
41
|
+
/// \param[in] context The context created.
|
|
32
42
|
Kernel(const std::vector<mindspore::MSTensor> &inputs, const std::vector<mindspore::MSTensor> &outputs,
|
|
33
43
|
const schema::Primitive *primitive, const mindspore::Context *ctx)
|
|
34
44
|
: IKernel<schema::Primitive>(inputs, outputs, primitive, ctx) {
|
|
35
45
|
Initialize();
|
|
36
46
|
}
|
|
47
|
+
/// \brief Destructor of Kernel.
|
|
37
48
|
virtual ~Kernel() = default;
|
|
38
|
-
|
|
49
|
+
/// \brief infer kernel's shape.
|
|
50
|
+
///
|
|
51
|
+
/// \return status.
|
|
39
52
|
int InferShape() override;
|
|
40
53
|
/// \brief obtain kernel's type.
|
|
41
54
|
///
|
|
42
55
|
/// \return kernel's type.
|
|
43
56
|
virtual schema::PrimitiveType type() const { return type_; }
|
|
44
|
-
/// \brief
|
|
57
|
+
/// \brief Obtain kernel's quant type.
|
|
45
58
|
///
|
|
46
|
-
/// \return
|
|
59
|
+
/// \return Kernel's quant type.
|
|
47
60
|
virtual schema::QuantType quant_type() const { return quant_type_; }
|
|
48
61
|
/// \brief obtain the primitive of kernel generated by flatbuffers.
|
|
49
62
|
protected:
|
|
@@ -28,6 +28,7 @@ namespace kernel {
|
|
|
28
28
|
/// \brief The Kernel class is used to define a MindSpore Kernel.
|
|
29
29
|
class MS_API MSKernel {
|
|
30
30
|
public:
|
|
31
|
+
/// \brief Constructor of MSKernel.
|
|
31
32
|
MSKernel() = default;
|
|
32
33
|
/// \brief Constructor.
|
|
33
34
|
///
|
|
@@ -130,12 +131,17 @@ class MS_API MSKernel {
|
|
|
130
131
|
/// \param[in] key define the kernel's attribute key.
|
|
131
132
|
/// \param[in] value define the kernel's attribute value.
|
|
132
133
|
void SetAttr(const std::string &key, const std::string &value) { attrs_[key] = value; }
|
|
133
|
-
|
|
134
|
+
/// \brief kernel's name.
|
|
134
135
|
std::string name_;
|
|
136
|
+
/// \brief kernel's context.
|
|
135
137
|
const mindspore::Context *context_ = nullptr;
|
|
138
|
+
/// \brief kernel's inputs.
|
|
136
139
|
std::vector<mindspore::MSTensor> inputs_;
|
|
140
|
+
/// \brief kernel's outputs.
|
|
137
141
|
std::vector<mindspore::MSTensor> outputs_;
|
|
142
|
+
/// \brief kernel's attrs.
|
|
138
143
|
std::map<std::string, std::string> attrs_;
|
|
144
|
+
/// \brief kernel's config.
|
|
139
145
|
const std::map<std::string, std::map<std::string, std::string>> *config_ = nullptr;
|
|
140
146
|
};
|
|
141
147
|
|
|
@@ -143,6 +149,7 @@ class MS_API MSKernel {
|
|
|
143
149
|
template <typename Primitive>
|
|
144
150
|
class MS_API IKernel : public MSKernel {
|
|
145
151
|
public:
|
|
152
|
+
/// \brief Constructor of IKernel.
|
|
146
153
|
IKernel() = default;
|
|
147
154
|
/// \brief Constructor.
|
|
148
155
|
///
|
|
@@ -161,6 +168,7 @@ class MS_API IKernel : public MSKernel {
|
|
|
161
168
|
const Primitive *primitive() const { return this->primitive_; }
|
|
162
169
|
|
|
163
170
|
protected:
|
|
171
|
+
/// \brief kernel's primitive, which is deserialized from flatbuffers.
|
|
164
172
|
const Primitive *primitive_ = nullptr;
|
|
165
173
|
};
|
|
166
174
|
} // namespace kernel
|
|
@@ -25,10 +25,19 @@ constexpr int METRICS_MULTILABEL = 1;
|
|
|
25
25
|
|
|
26
26
|
class MS_API AccuracyMetrics : public Metrics {
|
|
27
27
|
public:
|
|
28
|
+
/// \brief Constructor of AccuracyMetrics.
|
|
29
|
+
///
|
|
30
|
+
/// \param[in] accuracy_metrics The metrics of accuracy.
|
|
31
|
+
/// \param[in] input_indexes The indexes of inputs.
|
|
32
|
+
/// \param[in] output_indexes The indexes of outputs.
|
|
33
|
+
|
|
28
34
|
explicit AccuracyMetrics(int accuracy_metrics = METRICS_CLASSIFICATION, const std::vector<int> &input_indexes = {1},
|
|
29
35
|
const std::vector<int> &output_indexes = {0});
|
|
36
|
+
/// \brief Destructor of AccuracyMetrics.
|
|
30
37
|
virtual ~AccuracyMetrics();
|
|
38
|
+
/// \brief Clear the accuracy metrics.
|
|
31
39
|
void Clear() override;
|
|
40
|
+
/// \brief Eval function.
|
|
32
41
|
float Eval() override;
|
|
33
42
|
};
|
|
34
43
|
|
mindspore/include/api/model.h
CHANGED
|
@@ -40,7 +40,9 @@ class Dataset;
|
|
|
40
40
|
/// \brief The Model class is used to define a MindSpore model, facilitating computational graph management.
|
|
41
41
|
class MS_API Model {
|
|
42
42
|
public:
|
|
43
|
+
/// \brief Constructor of Model.
|
|
43
44
|
Model();
|
|
45
|
+
/// \brief Destructor of Model.
|
|
44
46
|
~Model();
|
|
45
47
|
|
|
46
48
|
/// \brief Build a model from model buffer so that it can run on a device.
|
|
@@ -361,6 +363,9 @@ class MS_API Model {
|
|
|
361
363
|
/// \return Status of operation.
|
|
362
364
|
Status Evaluate(std::shared_ptr<dataset::Dataset> ds, std::vector<TrainCallBack *> cbs);
|
|
363
365
|
|
|
366
|
+
/// \brief Performs the implication.
|
|
367
|
+
///
|
|
368
|
+
/// \return the implication of the model.
|
|
364
369
|
const std::shared_ptr<ModelImpl> impl() const { return impl_; }
|
|
365
370
|
|
|
366
371
|
/// \brief Get model info by key
|
|
@@ -369,7 +374,9 @@ class MS_API Model {
|
|
|
369
374
|
///
|
|
370
375
|
/// \return The value of the model info associated with the given key.
|
|
371
376
|
inline std::string GetModelInfo(const std::string &key);
|
|
372
|
-
|
|
377
|
+
/// \brief Finish the model. (Only used for mindspore_lite's ascend backend.)
|
|
378
|
+
///
|
|
379
|
+
/// \return Status of the operation.
|
|
373
380
|
// release inference resourcec, only used for mindspore_lite's ascend backend now.
|
|
374
381
|
Status Finalize();
|
|
375
382
|
|
|
@@ -41,7 +41,11 @@ enum class ModelGroupFlag : int {
|
|
|
41
41
|
|
|
42
42
|
class MS_API ModelGroup {
|
|
43
43
|
public:
|
|
44
|
+
/// \brief Constructor of ModelGroup.
|
|
45
|
+
///
|
|
46
|
+
/// \param[in] flags The flags of model group.
|
|
44
47
|
explicit ModelGroup(ModelGroupFlag flags = ModelGroupFlag::kShareWorkspace);
|
|
48
|
+
/// \brief Destructor of ModelGroup.
|
|
45
49
|
~ModelGroup() = default;
|
|
46
50
|
|
|
47
51
|
/// \brief Add models that require shared workspace memory.
|
|
@@ -28,7 +28,9 @@ namespace mindspore {
|
|
|
28
28
|
class MS_API RunnerConfig {
|
|
29
29
|
public:
|
|
30
30
|
struct Data;
|
|
31
|
+
/// \brief Constructor of RunnerConfig.
|
|
31
32
|
RunnerConfig();
|
|
33
|
+
/// \brief Destructor of RunnerConfig.
|
|
32
34
|
~RunnerConfig();
|
|
33
35
|
|
|
34
36
|
/// \brief Set the number of workers at runtime. Only valid for ModelParallelRunner.
|
mindspore/include/api/status.h
CHANGED
|
@@ -128,37 +128,75 @@ enum StatusCode : uint32_t {
|
|
|
128
128
|
|
|
129
129
|
class MS_API Status {
|
|
130
130
|
public:
|
|
131
|
+
/// \brief Constructor of Status.
|
|
131
132
|
Status();
|
|
133
|
+
/// \brief Constructor of Status.
|
|
134
|
+
///
|
|
135
|
+
/// \param[in] status_code Status code.
|
|
136
|
+
///
|
|
137
|
+
/// \param[in] status_msg Status message.
|
|
132
138
|
inline Status(enum StatusCode status_code, const std::string &status_msg = ""); // NOLINT(runtime/explicit)
|
|
139
|
+
/// \brief Constructor of Status.
|
|
133
140
|
inline Status(const StatusCode code, int line_of_code, const char *file_name, const std::string &extra = "");
|
|
134
|
-
|
|
141
|
+
/// \brief Destructor of Status.
|
|
135
142
|
~Status() = default;
|
|
136
|
-
|
|
143
|
+
/// \brief Status code of status.
|
|
144
|
+
///
|
|
145
|
+
/// \return Enum of status code.
|
|
137
146
|
enum StatusCode StatusCode() const;
|
|
147
|
+
/// \brief Exchange status to string.
|
|
148
|
+
///
|
|
149
|
+
/// \return Status code exchanged to string.
|
|
138
150
|
inline std::string ToString() const;
|
|
139
|
-
|
|
151
|
+
/// \brief Get line of status code.
|
|
152
|
+
///
|
|
153
|
+
/// \return Line of code to get.
|
|
140
154
|
int GetLineOfCode() const;
|
|
155
|
+
/// \brief Get file name of status.
|
|
156
|
+
///
|
|
157
|
+
/// \return File name to get.
|
|
141
158
|
inline std::string GetFileName() const;
|
|
159
|
+
/// \brief Get error description of status.
|
|
160
|
+
///
|
|
161
|
+
/// \return Error description to get.
|
|
142
162
|
inline std::string GetErrDescription() const;
|
|
163
|
+
/// \brief Get error description of status.
|
|
164
|
+
///
|
|
165
|
+
/// \param[in] err_description Error description to be set.
|
|
143
166
|
inline std::string SetErrDescription(const std::string &err_description);
|
|
167
|
+
/// \brief Status message to be set.
|
|
168
|
+
///
|
|
169
|
+
/// \param[in] status_msg Status message to be set.
|
|
144
170
|
inline void SetStatusMsg(const std::string &status_msg);
|
|
145
|
-
|
|
171
|
+
/// \brief Operator <<.
|
|
146
172
|
MS_API friend std::ostream &operator<<(std::ostream &os, const Status &s);
|
|
147
|
-
|
|
173
|
+
/// \brief Operator ==.
|
|
148
174
|
bool operator==(const Status &other) const;
|
|
175
|
+
/// \brief Operator ==.
|
|
149
176
|
bool operator==(enum StatusCode other_code) const;
|
|
177
|
+
/// \brief Operator !=.
|
|
150
178
|
bool operator!=(const Status &other) const;
|
|
179
|
+
/// \brief Operator !=.
|
|
151
180
|
bool operator!=(enum StatusCode other_code) const;
|
|
152
|
-
|
|
181
|
+
/// \brief Operator bool().
|
|
153
182
|
explicit operator bool() const;
|
|
183
|
+
/// \brief Operator int().
|
|
154
184
|
explicit operator int() const;
|
|
155
|
-
|
|
185
|
+
/// \brief Getting back the status of OK.
|
|
186
|
+
///
|
|
187
|
+
/// \return Status Code of ok.
|
|
156
188
|
static Status OK();
|
|
157
|
-
|
|
189
|
+
/// \brief Getting back if it is ok.
|
|
190
|
+
///
|
|
191
|
+
/// \return True if it is ok.
|
|
158
192
|
bool IsOk() const;
|
|
159
|
-
|
|
193
|
+
/// \brief Getting back if it is error.
|
|
194
|
+
///
|
|
195
|
+
/// \return True if it is error.
|
|
160
196
|
bool IsError() const;
|
|
161
|
-
|
|
197
|
+
/// \brief Getting back the code as string.
|
|
198
|
+
///
|
|
199
|
+
/// \return The code name as string type.
|
|
162
200
|
static inline std::string CodeAsString(enum StatusCode c);
|
|
163
201
|
|
|
164
202
|
private:
|
mindspore/include/api/types.h
CHANGED
|
@@ -74,6 +74,7 @@ class Allocator;
|
|
|
74
74
|
/// \brief The MSTensor class defines a tensor in MindSpore.
|
|
75
75
|
class MS_API MSTensor {
|
|
76
76
|
public:
|
|
77
|
+
/// \brief Impl class of MSTensor.
|
|
77
78
|
class Impl;
|
|
78
79
|
/// \brief Creates a MSTensor object, whose data need to be copied before accessed by Model, must be used in pairs
|
|
79
80
|
/// with DestroyTensorPtr.
|
|
@@ -161,13 +162,17 @@ class MS_API MSTensor {
|
|
|
161
162
|
///
|
|
162
163
|
/// \param[in] tensor A MSTensor object.
|
|
163
164
|
static void DestroyTensorPtr(MSTensor *tensor) noexcept;
|
|
164
|
-
|
|
165
|
+
/// \brief Constructor of MSTensor.
|
|
165
166
|
MSTensor();
|
|
167
|
+
/// \brief Constructor of MSTensor.
|
|
166
168
|
explicit MSTensor(const std::shared_ptr<Impl> &impl);
|
|
169
|
+
/// \brief Constructor of MSTensor.
|
|
167
170
|
// if malloc data, user need to free after constructing MSTensor, else memory leak.
|
|
168
171
|
inline MSTensor(const std::string &name, DataType type, const std::vector<int64_t> &shape, const void *data,
|
|
169
172
|
size_t data_len);
|
|
173
|
+
/// \brief Constructor of MSTensor.
|
|
170
174
|
explicit MSTensor(std::nullptr_t);
|
|
175
|
+
/// \brief Destructor of MSTensor.
|
|
171
176
|
~MSTensor();
|
|
172
177
|
|
|
173
178
|
/// \brief Obtains the name of the MSTensor.
|
|
@@ -243,14 +248,14 @@ class MS_API MSTensor {
|
|
|
243
248
|
|
|
244
249
|
/// \brief Get the boolean value that indicates whether the MSTensor equals tensor.
|
|
245
250
|
///
|
|
246
|
-
/// \param[in]
|
|
251
|
+
/// \param[in] tensor MSTensor.
|
|
247
252
|
///
|
|
248
253
|
/// \return The boolean value that indicates whether the MSTensor equals tensor.
|
|
249
254
|
bool operator==(const MSTensor &tensor) const;
|
|
250
255
|
|
|
251
256
|
/// \brief Get the boolean value that indicates whether the MSTensor not equals tensor.
|
|
252
257
|
///
|
|
253
|
-
/// \param[in]
|
|
258
|
+
/// \param[in] tensor MSTensor.
|
|
254
259
|
///
|
|
255
260
|
/// \return The boolean value that indicates whether the MSTensor not equals tensor.
|
|
256
261
|
bool operator!=(const MSTensor &tensor) const;
|