mindspore 2.3.0__cp39-none-any.whl → 2.3.0rc2__cp39-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mindspore might be problematic. Click here for more details.
- mindspore/.commit_id +1 -1
- mindspore/Third_Party_Open_Source_Software_Notice +0 -1512
- mindspore/__init__.py +1 -2
- mindspore/_c_dataengine.cpython-39-aarch64-linux-gnu.so +0 -0
- mindspore/_c_expression.cpython-39-aarch64-linux-gnu.so +0 -0
- mindspore/_c_mindrecord.cpython-39-aarch64-linux-gnu.so +0 -0
- mindspore/_checkparam.py +25 -5
- mindspore/_extends/graph_kernel/model/graph_parallel.py +1 -1
- mindspore/_extends/parse/__init__.py +2 -2
- mindspore/_extends/parse/compile_config.py +0 -29
- mindspore/_extends/parse/namespace.py +2 -2
- mindspore/_extends/parse/parser.py +5 -21
- mindspore/_extends/parse/resources.py +7 -5
- mindspore/_extends/parse/standard_method.py +59 -40
- mindspore/_mindspore_offline_debug.cpython-39-aarch64-linux-gnu.so +0 -0
- mindspore/amp.py +5 -26
- mindspore/bin/cache_admin +0 -0
- mindspore/bin/cache_server +0 -0
- mindspore/boost/adasum.py +1 -1
- mindspore/boost/base.py +1 -1
- mindspore/boost/boost_cell_wrapper.py +1 -1
- mindspore/boost/grad_freeze.py +2 -2
- mindspore/boost/less_batch_normalization.py +6 -9
- mindspore/common/__init__.py +1 -8
- mindspore/common/_register_for_tensor.py +9 -8
- mindspore/common/api.py +65 -275
- mindspore/common/dtype.py +4 -8
- mindspore/common/dump.py +5 -2
- mindspore/common/jit_config.py +1 -1
- mindspore/common/lazy_inline.py +2 -14
- mindspore/common/parameter.py +15 -14
- mindspore/common/recompute.py +5 -20
- mindspore/common/sparse_tensor.py +6 -21
- mindspore/common/tensor.py +52 -100
- mindspore/communication/__init__.py +11 -6
- mindspore/communication/management.py +94 -92
- mindspore/context.py +18 -180
- mindspore/dataset/engine/datasets.py +46 -69
- mindspore/dataset/engine/datasets_user_defined.py +53 -72
- mindspore/dataset/engine/datasets_vision.py +2 -2
- mindspore/dataset/engine/queue.py +38 -56
- mindspore/dataset/engine/validators.py +5 -11
- mindspore/dataset/vision/__init__.py +5 -5
- mindspore/dataset/vision/c_transforms.py +5 -5
- mindspore/dataset/vision/py_transforms_util.py +1 -1
- mindspore/dataset/vision/transforms.py +46 -591
- mindspore/dataset/vision/utils.py +1 -121
- mindspore/dataset/vision/validators.py +3 -9
- mindspore/hal/__init__.py +1 -7
- mindspore/hal/device.py +1 -1
- mindspore/include/api/model.h +0 -3
- mindspore/include/dataset/vision.h +2 -54
- mindspore/include/mindapi/base/types.h +0 -1
- mindspore/lib/libdnnl.so.2 +0 -0
- mindspore/lib/libmindspore.so +0 -0
- mindspore/lib/libmindspore_backend.so +0 -0
- mindspore/lib/libmindspore_common.so +0 -0
- mindspore/lib/libmindspore_core.so +0 -0
- mindspore/lib/libmindspore_glog.so.0 +0 -0
- mindspore/lib/libmindspore_gpr.so.15 +0 -0
- mindspore/lib/libmindspore_grpc++.so.1 +0 -0
- mindspore/lib/libmindspore_grpc.so.15 +0 -0
- mindspore/lib/libmindspore_shared_lib.so +0 -0
- mindspore/lib/libmpi_adapter.so +0 -0
- mindspore/lib/libmpi_collective.so +0 -0
- mindspore/lib/libnnacl.so +0 -0
- mindspore/lib/libopencv_core.so.4.5 +0 -0
- mindspore/lib/libps_cache.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend310p/aic-ascend310p-ops-info.json +0 -35
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/custom_aicore_ops_impl/kv_cache_mgr.py +0 -2
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/vector_core/tbe/custom_aicore_ops_impl/kv_cache_mgr.py +0 -2
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/config/cust_aicpu_kernel.json +0 -72
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_proto/libcust_op_proto.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_api/include/{aclnn_all_finite.h → aclnn_add_custom.h} +11 -9
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_api/include/aclnn_decoder_kv_cache.h +1 -1
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_api/include/aclnn_prompt_kv_cache.h +1 -1
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_api/lib/libcust_opapi.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/config/ascend310p/aic-ascend310p-ops-info.json +12 -184
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/config/ascend910/aic-ascend910-ops-info.json +15 -7
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/config/ascend910b/aic-ascend910b-ops-info.json +15 -7
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/add_custom.cpp +81 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/add_custom.py +134 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/decoder_kv_cache.py +31 -77
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/prompt_kv_cache.py +31 -77
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/op_tiling/lib/linux/aarch64/libcust_opmaster_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_proto/inc/op_proto.h +5 -4
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_proto/lib/linux/aarch64/libcust_opsproto_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/libascend_collective.so +0 -0
- mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
- mindspore/lib/plugin/ascend/libhccl_plugin.so +0 -0
- mindspore/lib/plugin/ascend/liblowlatency_collective.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/bin/DeviceBin +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/bin/PkgInspect +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/bin/op_man +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/device/ascend910b/bin/ascend910b.bin +286 -275
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/host/libasdops_cann_host.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/host/libasdops_host.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/libasdops.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/libasdops_static.a +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/add/add_impl.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/apply_rotary_pos_emb_impl.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/asdop/asd_op_impl.h +0 -3
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/backend_param.h +0 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/cast/cast_tiling.h +45 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/compare/compare_impl.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/flash_attention_score/flash_attention_score_impl.h +4 -8
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/flash_attention_score/flash_attention_score_tiling.h +4 -11
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/flash_attention_score/kernel/flash_attention_score_mix_hwsync.h +0 -18
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/internal_kernel.h +0 -6
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/internal_rtbackend.h +75 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul/kernel/matmul.h +5 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul/matmul_impl.h +3 -18
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul_common/pp_matmul_common_tiling.h +5 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul_common/pp_matmul_info.h +2 -2
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul_common/tiling_data.h +3 -36
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul_stridedslice/kernel/matmul_stridedslice_fusion.h +2 -2
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/matmul_stridedslice/matmul_stridedslice_fusion_impl.h +4 -22
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/op_param.h +2 -16
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/paged_attention/kernel/paged_attention_mix_hwsync.h +3 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/paged_attention/paged_attention_impl.h +4 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/paged_attention/paged_attention_tiling.h +4 -9
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/attention_param.h +2 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/matmul_ext_param.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/matmul_qkv_param.h +4 -10
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/sub_param.h +12 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/rms_norm/rms_norm_impl.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/sub/sub_impl.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/tune_repo/matmul_table.h +1 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/backend.h +2 -10
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/elewise_utils.h +1 -5
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log.h +0 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_tiling.h +0 -17
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/math.h +7 -2
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libAdd_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libSub_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_layernorm_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libcast_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libgelu_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libmatmul_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libmatmul_stridedslice_fusion_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libms_kernels_internal.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libnot_equal_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/librms_norm_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_bf16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_bf16_bnsd_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_bf16_bsh_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_bf16_bsh_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_fp16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_fp16_bnsd_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_fp16_bsh_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/flash_attention_score_fp16_bsh_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/paged_attention_bf16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/paged_attention_bf16_bsh_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/paged_attention_fp16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/BSAttention/paged_attention_fp16_bsh_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/lccl/lib/liblcal.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/lccl/lib/liblccl_wrapper.so +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
- mindspore/mindrecord/filewriter.py +2 -2
- mindspore/mint/__init__.py +40 -720
- mindspore/mint/nn/__init__.py +7 -89
- mindspore/mint/nn/functional.py +16 -165
- mindspore/mint/optim/adamw.py +16 -15
- mindspore/nn/__init__.py +2 -0
- mindspore/nn/cell.py +98 -97
- mindspore/nn/extend/basic.py +2 -2
- mindspore/nn/extend/embedding.py +1 -1
- mindspore/nn/extend/layer/normalization.py +5 -7
- mindspore/nn/generator.py +297 -0
- mindspore/nn/layer/activation.py +3 -4
- mindspore/nn/layer/basic.py +16 -79
- mindspore/nn/layer/conv.py +8 -17
- mindspore/nn/layer/embedding.py +4 -1
- mindspore/nn/layer/math.py +1 -1
- mindspore/nn/layer/normalization.py +1 -1
- mindspore/nn/layer/pooling.py +0 -5
- mindspore/nn/layer/rnn_cells.py +2 -2
- mindspore/nn/loss/loss.py +19 -19
- mindspore/nn/optim/adasum.py +1 -1
- mindspore/nn/optim/sgd.py +2 -3
- mindspore/nn/probability/distribution/exponential.py +1 -1
- mindspore/nn/probability/distribution/geometric.py +1 -1
- mindspore/nn/probability/distribution/logistic.py +1 -1
- mindspore/nn/wrap/cell_wrapper.py +1 -25
- mindspore/nn/wrap/loss_scale.py +1 -24
- mindspore/numpy/array_ops.py +1 -5
- mindspore/numpy/dtypes.py +3 -3
- mindspore/numpy/math_ops.py +8 -8
- mindspore/ops/__init__.py +1 -1
- mindspore/ops/_grad_experimental/grad_comm_ops.py +16 -75
- mindspore/ops/_vmap/vmap_array_ops.py +0 -27
- mindspore/ops/_vmap/vmap_math_ops.py +1 -29
- mindspore/ops/_vmap/vmap_nn_ops.py +18 -19
- mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +8 -34
- mindspore/ops/auto_generate/gen_arg_dtype_cast.py +9 -2
- mindspore/ops/auto_generate/gen_arg_handler.py +0 -26
- mindspore/ops/auto_generate/gen_extend_func.py +27 -603
- mindspore/ops/auto_generate/gen_ops_def.py +203 -993
- mindspore/ops/auto_generate/gen_ops_prim.py +402 -1946
- mindspore/ops/auto_generate/pyboost_inner_prim.py +20 -90
- mindspore/ops/composite/base.py +6 -3
- mindspore/ops/composite/math_ops.py +1 -1
- mindspore/ops/composite/multitype_ops/_compile_utils.py +17 -24
- mindspore/ops/composite/multitype_ops/_constexpr_utils.py +1 -1
- mindspore/ops/extend/__init__.py +3 -2
- mindspore/ops/extend/array_func.py +51 -10
- mindspore/ops/extend/nn_func.py +78 -2
- mindspore/ops/function/__init__.py +13 -8
- mindspore/ops/function/array_func.py +179 -455
- mindspore/ops/function/clip_func.py +1 -1
- mindspore/ops/function/grad/grad_func.py +3 -3
- mindspore/ops/function/math_func.py +103 -117
- mindspore/ops/function/nn_func.py +163 -275
- mindspore/ops/function/other_func.py +2 -2
- mindspore/ops/function/random_func.py +69 -202
- mindspore/ops/function/sparse_func.py +4 -4
- mindspore/ops/functional.py +327 -332
- mindspore/ops/operations/__init__.py +3 -13
- mindspore/ops/operations/_grad_ops.py +27 -3
- mindspore/ops/operations/_inner_ops.py +356 -53
- mindspore/ops/operations/_rl_inner_ops.py +2 -2
- mindspore/ops/operations/_tensor_array.py +8 -8
- mindspore/ops/operations/array_ops.py +65 -82
- mindspore/ops/operations/comm_ops.py +93 -784
- mindspore/ops/operations/custom_ops.py +28 -51
- mindspore/ops/operations/debug_ops.py +4 -4
- mindspore/ops/operations/inner_ops.py +2 -2
- mindspore/ops/operations/manually_defined/ops_def.py +4 -304
- mindspore/ops/operations/math_ops.py +50 -3
- mindspore/ops/operations/nn_ops.py +247 -14
- mindspore/ops/operations/other_ops.py +3 -3
- mindspore/ops/operations/random_ops.py +1 -1
- mindspore/ops/operations/sparse_ops.py +1 -1
- mindspore/ops/primitive.py +8 -9
- mindspore/ops/silent_check.py +5 -5
- mindspore/ops_generate/arg_dtype_cast.py +9 -2
- mindspore/ops_generate/arg_handler.py +0 -26
- mindspore/ops_generate/gen_aclnn_implement.py +4 -1
- mindspore/ops_generate/gen_ops.py +4 -26
- mindspore/ops_generate/gen_pyboost_func.py +12 -41
- mindspore/ops_generate/gen_utils.py +0 -21
- mindspore/ops_generate/pyboost_utils.py +2 -7
- mindspore/ops_generate/template.py +0 -1
- mindspore/parallel/_auto_parallel_context.py +1 -21
- mindspore/parallel/_tensor.py +5 -0
- mindspore/parallel/_transformer/transformer.py +1 -1
- mindspore/parallel/_utils.py +1 -15
- mindspore/parallel/algo_parameter_config.py +3 -1
- mindspore/parallel/checkpoint_transform.py +9 -12
- mindspore/parallel/cluster/process_entity/_api.py +29 -28
- mindspore/parallel/cluster/process_entity/_utils.py +3 -13
- mindspore/parallel/cluster/run.py +16 -13
- mindspore/parallel/parameter_broadcast.py +2 -2
- mindspore/parallel/shard.py +17 -31
- mindspore/profiler/__init__.py +2 -3
- mindspore/profiler/common/util.py +2 -107
- mindspore/profiler/envprofiling.py +1 -1
- mindspore/profiler/parser/ascend_analysis/constant.py +21 -8
- mindspore/profiler/parser/ascend_analysis/file_manager.py +0 -82
- mindspore/profiler/parser/ascend_analysis/function_event.py +28 -43
- mindspore/profiler/parser/ascend_analysis/fwk_cann_parser.py +27 -49
- mindspore/profiler/parser/ascend_analysis/fwk_file_parser.py +10 -15
- mindspore/profiler/parser/ascend_analysis/msprof_timeline_parser.py +20 -25
- mindspore/profiler/parser/ascend_analysis/profiler_info_parser.py +5 -5
- mindspore/profiler/parser/ascend_analysis/trace_event_manager.py +1 -10
- mindspore/profiler/parser/ascend_hccl_generator.py +1 -4
- mindspore/profiler/parser/ascend_msprof_exporter.py +22 -43
- mindspore/profiler/parser/ascend_timeline_generator.py +5 -7
- mindspore/profiler/parser/minddata_parser.py +3 -72
- mindspore/profiler/profiling.py +59 -176
- mindspore/rewrite/api/node.py +1 -1
- mindspore/rewrite/common/namespace.py +5 -5
- mindspore/rewrite/parsers/assign_parser.py +0 -2
- mindspore/rewrite/parsers/class_def_parser.py +4 -8
- mindspore/run_check/_check_version.py +1 -1
- mindspore/scipy/fft.py +3 -1
- mindspore/scipy/linalg.py +3 -2
- mindspore/scipy/ops.py +3 -5
- mindspore/scipy/optimize/__init__.py +2 -2
- mindspore/train/__init__.py +4 -4
- mindspore/train/anf_ir_pb2.py +2 -8
- mindspore/train/callback/__init__.py +2 -5
- mindspore/train/callback/_backup_and_restore.py +2 -2
- mindspore/train/callback/_checkpoint.py +16 -104
- mindspore/train/callback/_landscape.py +1 -1
- mindspore/train/callback/_time_monitor.py +1 -1
- mindspore/train/data_sink.py +4 -5
- mindspore/train/dataset_helper.py +20 -45
- mindspore/train/model.py +38 -266
- mindspore/train/serialization.py +105 -256
- mindspore/train/summary/_summary_adapter.py +1 -1
- mindspore/version.py +1 -1
- {mindspore-2.3.0.dist-info → mindspore-2.3.0rc2.dist-info}/METADATA +2 -2
- {mindspore-2.3.0.dist-info → mindspore-2.3.0rc2.dist-info}/RECORD +303 -420
- mindspore/_extends/pijit/__init__.py +0 -23
- mindspore/_extends/pijit/pijit_func_white_list.py +0 -343
- mindspore/common/file_system.py +0 -48
- mindspore/common/generator.py +0 -260
- mindspore/common/no_inline.py +0 -54
- mindspore/common/np_dtype.py +0 -25
- mindspore/communication/comm_func.py +0 -1140
- mindspore/hal/memory.py +0 -326
- mindspore/lib/libavcodec.so.59 +0 -0
- mindspore/lib/libavdevice.so.59 +0 -0
- mindspore/lib/libavfilter.so.8 +0 -0
- mindspore/lib/libavformat.so.59 +0 -0
- mindspore/lib/libavutil.so.57 +0 -0
- mindspore/lib/libmindspore_np_dtype.so +0 -0
- mindspore/lib/libswresample.so.4 +0 -0
- mindspore/lib/libswscale.so.6 +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/all_finite.cpp +0 -326
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl/dynamic/all_finite.py +0 -180
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.json +0 -58
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.json +0 -58
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.json +0 -58
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/config/ascend910b/all_finite.json +0 -109
- mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/config/ascend910b/binary_info_config.json +0 -38
- mindspore/lib/plugin/ascend/custom_compiler/OWNERS +0 -12
- mindspore/lib/plugin/ascend/custom_compiler/setup.py +0 -255
- mindspore/lib/plugin/ascend/custom_compiler/start.sh +0 -26
- mindspore/lib/plugin/ascend/custom_compiler/template.json +0 -40
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme.h +0 -24
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme_op.h +0 -69
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/base_type.h +0 -133
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/op_creator.h +0 -32
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/op_param.h +0 -35
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/tiling_info.h +0 -60
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/kernel_register.h +0 -37
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/platform/platform_configs.h +0 -89
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/platform/rt_funcs.h +0 -135
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/add_op.h +0 -34
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_backoff_base.h +0 -62
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_elewise_op.h +0 -33
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_ops.h +0 -88
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_pa_op.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/cast_op.h +0 -52
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/matmul_op.h +0 -95
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/utils/asd_utils.h +0 -84
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/utils/comm_utils.h +0 -61
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_fp32.h +0 -224
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/and_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/div_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/elewise_binary_impl.h +0 -48
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/elewise_binary_tiling.h +0 -25
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/and_kernel.h +0 -46
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/div_kernel.h +0 -46
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/elewise_binary_base.h +0 -260
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/elewise_binary_kernel.h +0 -35
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/max_kernel.h +0 -66
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/min_kernel.h +0 -66
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/mul_kernel.h +0 -66
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/or_kernel.h +0 -46
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/max_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/min_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/mul_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/or_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/abs_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/elewise_unary_impl.h +0 -47
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/elewise_unary_tiling.h +0 -24
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/exp_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/abs_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/elewise_unary_base.h +0 -148
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/elewise_unary_kernel.h +0 -31
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/exp_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/ln_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/not_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/reciprocal_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/relu_kernel.h +0 -55
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/rsqrt_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/sqrt_kernel.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/ln_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/not_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/reciprocal_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/relu_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/rsqrt_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/sqrt_impl.h +0 -29
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/grouped_matmul_impl.h +0 -45
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/grouped_matmul_tiling.h +0 -187
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/kernel/grouped_matmul.h +0 -245
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/kernel/grouped_matmul_interface.h +0 -24
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/kernel/grouped_matmul_utils.h +0 -111
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/tiling_data.h +0 -54
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/compare_param.h +0 -31
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/elewise_param.h +0 -41
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/grouped_matmul_param.h +0 -40
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/profiling_util.h +0 -364
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_utils.h +0 -69
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/register/kernel_creator.h +0 -39
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/register/kernel_registry.h +0 -114
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/utils.h +0 -98
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MatMulPostFusionMixTactic/matmul_postfusion_mix.json +0 -19
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MatMulPostFusionMixTactic/matmul_postfusion_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MatMulPostFusionMixTactic/matmul_postfusion_mix_mix_aic_0.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MatMulPostFusionMixTactic/matmul_postfusion_mix_mix_aiv_0.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MultiMatMulPostFusionMixTactic/multi_matmul_postfusion_mix.json +0 -19
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MultiMatMulPostFusionMixTactic/multi_matmul_postfusion_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MultiMatMulPostFusionMixTactic/multi_matmul_postfusion_mix_mix_aic_0.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/MultiMatMulPostFusionMixTactic/multi_matmul_postfusion_mix_mix_aiv_0.o +0 -0
- mindspore/mint/linalg/__init__.py +0 -22
- mindspore/nn/layer/embedding_service.py +0 -531
- mindspore/nn/layer/embedding_service_layer.py +0 -393
- mindspore/ops/function/reshard_func.py +0 -102
- mindspore/ops/operations/_infer_ops.py +0 -19
- mindspore/ops/operations/reshard_ops.py +0 -53
- mindspore/profiler/common/process_pool.py +0 -41
- mindspore/profiler/common/singleton.py +0 -28
- mindspore/profiler/parser/ascend_integrate_generator.py +0 -42
- mindspore/profiler/parser/ascend_memory_generator.py +0 -185
- mindspore/train/callback/_cluster_monitor.py +0 -201
- mindspore/train/callback/_flops_collector.py +0 -238
- mindspore/train/callback/_mindio_ttp.py +0 -443
- {mindspore-2.3.0.dist-info → mindspore-2.3.0rc2.dist-info}/WHEEL +0 -0
- {mindspore-2.3.0.dist-info → mindspore-2.3.0rc2.dist-info}/entry_points.txt +0 -0
- {mindspore-2.3.0.dist-info → mindspore-2.3.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_KERNEL_REGISTER_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_KERNEL_REGISTER_H_
|
|
19
|
-
|
|
20
|
-
namespace mindspore {
|
|
21
|
-
namespace acme {
|
|
22
|
-
class KernelRegister {
|
|
23
|
-
public:
|
|
24
|
-
KernelRegister();
|
|
25
|
-
~KernelRegister() = default;
|
|
26
|
-
|
|
27
|
-
static const KernelRegister &GetInstance() {
|
|
28
|
-
static const KernelRegister kKernelRegister;
|
|
29
|
-
return kKernelRegister;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
void Register();
|
|
33
|
-
};
|
|
34
|
-
} // namespace acme
|
|
35
|
-
} // namespace mindspore
|
|
36
|
-
|
|
37
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_KERNEL_REGISTER_H_
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_CONFIGS_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_CONFIGS_H_
|
|
19
|
-
|
|
20
|
-
#include <string>
|
|
21
|
-
#include <cstdint>
|
|
22
|
-
|
|
23
|
-
namespace mindspore {
|
|
24
|
-
namespace acme {
|
|
25
|
-
class HardwareConfig {
|
|
26
|
-
public:
|
|
27
|
-
HardwareConfig() = default;
|
|
28
|
-
~HardwareConfig() = default;
|
|
29
|
-
HardwareConfig(uint32_t core_num, uint32_t l2_size, uint32_t l1_size, uint32_t l0a_size, uint32_t l0b_size,
|
|
30
|
-
uint32_t l0c_size, uint32_t ub_size)
|
|
31
|
-
: core_num_(core_num),
|
|
32
|
-
l2_size_(l2_size),
|
|
33
|
-
l1_size_(l1_size),
|
|
34
|
-
l0a_size_(l0a_size),
|
|
35
|
-
l0b_size_(l0b_size),
|
|
36
|
-
l0c_size_(l0c_size),
|
|
37
|
-
ub_size_(ub_size) {}
|
|
38
|
-
|
|
39
|
-
uint32_t core_num_{0};
|
|
40
|
-
uint32_t l2_size_{0};
|
|
41
|
-
uint32_t l1_size_{0};
|
|
42
|
-
uint32_t l0a_size_{0};
|
|
43
|
-
uint32_t l0b_size_{0};
|
|
44
|
-
uint32_t l0c_size_{0};
|
|
45
|
-
uint32_t hbm_bandwidth_{1};
|
|
46
|
-
uint32_t l2_bandwidth_{5};
|
|
47
|
-
uint32_t ub_size_{0};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
class PlatformConfigs {
|
|
51
|
-
public:
|
|
52
|
-
PlatformConfigs();
|
|
53
|
-
~PlatformConfigs() = default;
|
|
54
|
-
|
|
55
|
-
static const PlatformConfigs &GetInstance() {
|
|
56
|
-
static PlatformConfigs kPlatformConfigs;
|
|
57
|
-
return kPlatformConfigs;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
inline uint32_t GetCoreNum() const { return hw_config_.core_num_; }
|
|
61
|
-
|
|
62
|
-
inline uint32_t GetL2Size() const { return hw_config_.l2_size_; }
|
|
63
|
-
|
|
64
|
-
inline uint32_t GetL1Size() const { return hw_config_.l1_size_; }
|
|
65
|
-
|
|
66
|
-
inline uint32_t GetL0aSize() const { return hw_config_.l0a_size_; }
|
|
67
|
-
|
|
68
|
-
inline uint32_t GetL0bSize() const { return hw_config_.l0b_size_; }
|
|
69
|
-
|
|
70
|
-
inline uint32_t GetL0cSize() const { return hw_config_.l0c_size_; }
|
|
71
|
-
|
|
72
|
-
inline uint32_t GetHbmBandwidth() const { return hw_config_.hbm_bandwidth_; }
|
|
73
|
-
|
|
74
|
-
inline uint32_t GetL2BandwidthSize() const { return hw_config_.l2_bandwidth_; }
|
|
75
|
-
|
|
76
|
-
inline uint32_t GetUbSize() const { return hw_config_.ub_size_; }
|
|
77
|
-
|
|
78
|
-
const HardwareConfig &GetConfigByVersion(const std::string &soc_version) const;
|
|
79
|
-
|
|
80
|
-
private:
|
|
81
|
-
void Init();
|
|
82
|
-
|
|
83
|
-
HardwareConfig hw_config_;
|
|
84
|
-
std::string soc_version_;
|
|
85
|
-
};
|
|
86
|
-
} // namespace acme
|
|
87
|
-
} // namespace mindspore
|
|
88
|
-
|
|
89
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_CONFIGS_H_
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_RT_FUNCS_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_RT_FUNCS_H_
|
|
19
|
-
|
|
20
|
-
#include "acme/include/base_type.h"
|
|
21
|
-
|
|
22
|
-
#ifdef __cplusplus
|
|
23
|
-
extern "C" {
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
#define RT_DEV_BINARY_MAGIC_ELF 0x43554245U
|
|
27
|
-
#define RT_DEV_BINARY_MAGIC_ELF_AIVEC 0x41415246U
|
|
28
|
-
#define RT_DEV_BINARY_MAGIC_ELF_AICUBE 0x41494343U
|
|
29
|
-
|
|
30
|
-
typedef void *rtStream_t;
|
|
31
|
-
|
|
32
|
-
typedef enum {
|
|
33
|
-
INTERNAL_RTSUCCESS = 0,
|
|
34
|
-
INTERNAL_RTERROR_NOT_INITIALIZED = -1,
|
|
35
|
-
INTERNAL_RTERROR_NOT_IMPLMENT = -2,
|
|
36
|
-
INTERNAL_RTERROR_ASCEND_ENV_NOT_EXIST = -3,
|
|
37
|
-
INTERNAL_RTERROR_LOAD_RUNTIME_FAIL = -4,
|
|
38
|
-
INTERNAL_RTERROR_FUNC_NOT_EXIST = -5,
|
|
39
|
-
INTERNAL_RTERROR_OPEN_BIN_FILE_FAIL = -6,
|
|
40
|
-
INTERNAL_RTERROR_PARA_CHECK_FAIL = -7,
|
|
41
|
-
} RtError;
|
|
42
|
-
|
|
43
|
-
typedef enum tagRtError {
|
|
44
|
-
RT_ERROR_NONE = 0x0, // success
|
|
45
|
-
RT_ERROR_INVALID_VALUE = 0x1, // invalid value
|
|
46
|
-
RT_ERROR_MEMORY_ALLOCATION = 0x2, // memory allocation fail
|
|
47
|
-
RT_ERROR_INVALID_RESOURCE_HANDLE = 0x3, // invalid handle
|
|
48
|
-
RT_ERROR_INVALID_DEVICE_POINTER = 0x4, // invalid device point
|
|
49
|
-
RT_ERROR_INVALID_MEMCPY_DIRECTION = 0x5, // invalid memory copy dirction
|
|
50
|
-
RT_ERROR_INVALID_DEVICE = 0x6, // invalid device
|
|
51
|
-
RT_ERROR_NO_DEVICE = 0x7, // no valid device
|
|
52
|
-
RT_ERROR_CMD_OCCUPY_FAILURE = 0x8, // command occpuy failure
|
|
53
|
-
RT_ERROR_SET_SIGNAL_FAILURE = 0x9, // set signal failure
|
|
54
|
-
RT_ERROR_UNSET_SIGNAL_FAILURE = 0xA, // unset signal failure
|
|
55
|
-
RT_ERROR_OPEN_FILE_FAILURE = 0xB, // unset signal failure
|
|
56
|
-
RT_ERROR_WRITE_FILE_FAILURE = 0xC,
|
|
57
|
-
RT_ERROR_MEMORY_ADDRESS_UNALIGNED = 0xD,
|
|
58
|
-
RT_ERROR_DRV_ERR = 0xE,
|
|
59
|
-
RT_ERROR_LOST_HEARTBEAT = 0xF,
|
|
60
|
-
RT_ERROR_REPORT_TIMEOUT = 0x10,
|
|
61
|
-
RT_ERROR_NOT_READY = 0x11,
|
|
62
|
-
RT_ERROR_DATA_OPERATION_FAIL = 0x12,
|
|
63
|
-
RT_ERROR_INVALID_L2_INSTR_SIZE = 0x13,
|
|
64
|
-
RT_ERROR_DEVICE_PROC_HANG_OUT = 0x14,
|
|
65
|
-
RT_ERROR_DEVICE_POWER_UP_FAIL = 0x15,
|
|
66
|
-
RT_ERROR_DEVICE_POWER_DOWN_FAIL = 0x16,
|
|
67
|
-
RT_ERROR_FEATURE_NOT_SUPPROT = 0x17,
|
|
68
|
-
RT_ERROR_KERNEL_DUPLICATE = 0x18, // register same kernel repeatly
|
|
69
|
-
RT_ERROR_MODEL_STREAM_EXE_FAILED = 0x91, // the model stream failed
|
|
70
|
-
RT_ERROR_MODEL_LOAD_FAILED = 0x94, // the model stream failed
|
|
71
|
-
RT_ERROR_END_OF_SEQUENCE = 0x95, // end of sequence
|
|
72
|
-
RT_ERROR_NO_STREAM_CB_REG = 0x96, // no callback register info for stream
|
|
73
|
-
RT_ERROR_DATA_DUMP_LOAD_FAILED = 0x97, // data dump load info fail
|
|
74
|
-
RT_ERROR_CALLBACK_THREAD_UNSUBSTRIBE = 0x98, // callback thread unsubstribe
|
|
75
|
-
RT_ERROR_RESERVED
|
|
76
|
-
} rtError_t;
|
|
77
|
-
|
|
78
|
-
// rt kernel
|
|
79
|
-
typedef struct {
|
|
80
|
-
uint32_t magic{0};
|
|
81
|
-
uint32_t version{0};
|
|
82
|
-
const void *data{nullptr};
|
|
83
|
-
uint64_t length{0};
|
|
84
|
-
} RtDevBinary_T;
|
|
85
|
-
|
|
86
|
-
typedef void *rtStream_t;
|
|
87
|
-
|
|
88
|
-
using RtDevBinaryRegisterFunc = rtError_t (*)(const RtDevBinary_T *bin, void **hdl);
|
|
89
|
-
using RtFunctionRegisterFunc = rtError_t (*)(void *binHandle, const void *subFunc, const char *stubName,
|
|
90
|
-
const void *kernelInfoExt, uint32_t funcMode);
|
|
91
|
-
using RtKernelLaunchFunc = rtError_t (*)(const void *stubFunc, uint32_t blockDim, void *args, uint32_t argsSize,
|
|
92
|
-
void *smDesc, rtStream_t sm);
|
|
93
|
-
using RtGetC2cCtrlAddrFunc = rtError_t (*)(uint64_t *addr, uint32_t *len);
|
|
94
|
-
|
|
95
|
-
using RtGetSocVersionFunc = int (*)(char *version, uint32_t maxLen);
|
|
96
|
-
|
|
97
|
-
#ifdef __cplusplus
|
|
98
|
-
}
|
|
99
|
-
#endif
|
|
100
|
-
|
|
101
|
-
namespace mindspore {
|
|
102
|
-
namespace acme {
|
|
103
|
-
class RtFuncs {
|
|
104
|
-
public:
|
|
105
|
-
RtFuncs();
|
|
106
|
-
~RtFuncs() = default;
|
|
107
|
-
|
|
108
|
-
static const RtFuncs &GetInstance() {
|
|
109
|
-
static RtFuncs kRtFuncs;
|
|
110
|
-
return kRtFuncs;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
inline RtDevBinaryRegisterFunc GetRtDevBinaryRegisterFunc() const { return rt_dev_bin_reg_func_; }
|
|
114
|
-
|
|
115
|
-
inline RtFunctionRegisterFunc GetRtFunctionRegisterFunc() const { return rt_func_reg_func_; }
|
|
116
|
-
|
|
117
|
-
inline RtKernelLaunchFunc GetRtKernelLaunchFunc() const { return rt_kernel_launch_func_; }
|
|
118
|
-
|
|
119
|
-
inline RtGetC2cCtrlAddrFunc GetRtGetC2cCtrlAddrFunc() const { return rt_get_c2c_ctrl_addr_func_; }
|
|
120
|
-
|
|
121
|
-
std::string GetSocVersion() const;
|
|
122
|
-
|
|
123
|
-
private:
|
|
124
|
-
void Init();
|
|
125
|
-
|
|
126
|
-
RtDevBinaryRegisterFunc rt_dev_bin_reg_func_{nullptr};
|
|
127
|
-
RtFunctionRegisterFunc rt_func_reg_func_{nullptr};
|
|
128
|
-
RtKernelLaunchFunc rt_kernel_launch_func_{nullptr};
|
|
129
|
-
RtGetC2cCtrlAddrFunc rt_get_c2c_ctrl_addr_func_{nullptr};
|
|
130
|
-
RtGetSocVersionFunc rt_get_soc_version_func_{nullptr};
|
|
131
|
-
};
|
|
132
|
-
} // namespace acme
|
|
133
|
-
} // namespace mindspore
|
|
134
|
-
|
|
135
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_CORE_PLATFORM_RT_FUNCS_H_
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ADD_OP_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ADD_OP_H_
|
|
19
|
-
|
|
20
|
-
#include "acme/src/ops/host_src/asd_elewise_op.h"
|
|
21
|
-
|
|
22
|
-
namespace mindspore {
|
|
23
|
-
namespace acme {
|
|
24
|
-
class AddOp : public AsdElewiseOp {
|
|
25
|
-
public:
|
|
26
|
-
AddOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii);
|
|
27
|
-
~AddOp() = default;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
using AddOpPtr = std::shared_ptr<AddOp>;
|
|
31
|
-
} // namespace acme
|
|
32
|
-
} // namespace mindspore
|
|
33
|
-
|
|
34
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ADD_OP_H_
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_BACKOFF_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_BACKOFF_H_
|
|
19
|
-
|
|
20
|
-
#include <any>
|
|
21
|
-
#include "acme/src/ops/host_src/asd_ops.h"
|
|
22
|
-
|
|
23
|
-
namespace mindspore {
|
|
24
|
-
namespace acme {
|
|
25
|
-
class AsdBackOffKernel : public AcmeOp {
|
|
26
|
-
public:
|
|
27
|
-
AsdBackOffKernel(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii);
|
|
28
|
-
~AsdBackOffKernel() = default;
|
|
29
|
-
|
|
30
|
-
AcmeStatus UpdateShape(const ShapeInfoList &inputs_shape, const ShapeInfoList &outputs_shape) override;
|
|
31
|
-
void SetTilingInfo(const TilingInfoPtr &tiling_info) override;
|
|
32
|
-
|
|
33
|
-
virtual AsdOps::Any BuildAsdParam() = 0;
|
|
34
|
-
virtual bool CanAsdSupport();
|
|
35
|
-
virtual bool NeedBackOff();
|
|
36
|
-
virtual const std::string &TargetKernelName() const;
|
|
37
|
-
virtual AsdOpPtr CreateBackOffKernel(const InputsImmutableInfoList &inputs_ii,
|
|
38
|
-
const OutputsImmutableInfoList &outputs_ii, const AsdOps::Any ¶m,
|
|
39
|
-
const std::string &kernel_name);
|
|
40
|
-
|
|
41
|
-
std::string DumpTiling(const RawHostAddr host_ptr) const override;
|
|
42
|
-
|
|
43
|
-
protected:
|
|
44
|
-
AcmeStatus TilingImpl(RawHostAddr host_ptr, HostRunInfoPtr *run_info_ptr) override;
|
|
45
|
-
AcmeStatus LaunchImpl(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, const WsAddrList &ws_ptrs,
|
|
46
|
-
void *stream) override;
|
|
47
|
-
|
|
48
|
-
virtual bool NeedBackOffImpl();
|
|
49
|
-
virtual AcmeStatus TilingNoBackOff(RawHostAddr host_ptr, HostRunInfoPtr *run_info_ptr) = 0;
|
|
50
|
-
virtual AcmeStatus LaunchNoBackOff(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs,
|
|
51
|
-
const WsAddrList &ws_ptrs, void *stream) = 0;
|
|
52
|
-
virtual std::string DumpTilingNoBackOff(const RawHostAddr host_ptr) const = 0;
|
|
53
|
-
|
|
54
|
-
private:
|
|
55
|
-
bool backoff_{false};
|
|
56
|
-
AsdOpPtr asd_op_{nullptr};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
} // namespace acme
|
|
60
|
-
} // namespace mindspore
|
|
61
|
-
|
|
62
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_BACKOFF_H_
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ELEWISE_OP_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ELEWISE_OP_H_
|
|
19
|
-
|
|
20
|
-
#include "acme/src/ops/host_src/asd_ops.h"
|
|
21
|
-
#include "asdops/params/elewise.h"
|
|
22
|
-
|
|
23
|
-
namespace mindspore {
|
|
24
|
-
namespace acme {
|
|
25
|
-
class AsdElewiseOp : public AsdOp {
|
|
26
|
-
public:
|
|
27
|
-
AsdElewiseOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii, AsdOps::OpParam::Elewise::ElewiseType type);
|
|
28
|
-
~AsdElewiseOp() = default;
|
|
29
|
-
};
|
|
30
|
-
} // namespace acme
|
|
31
|
-
} // namespace mindspore
|
|
32
|
-
|
|
33
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ELEWISE_OP_H_
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_OPS_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_OPS_H_
|
|
19
|
-
|
|
20
|
-
#include <any>
|
|
21
|
-
#include "acme/include/acme_op.h"
|
|
22
|
-
|
|
23
|
-
#include "asdops/op_desc.h"
|
|
24
|
-
#include "asdops/operation.h"
|
|
25
|
-
#include "asdops/run_info.h"
|
|
26
|
-
#include "asdops/tactic.h"
|
|
27
|
-
#include "asdops/tensor.h"
|
|
28
|
-
|
|
29
|
-
namespace mindspore {
|
|
30
|
-
namespace acme {
|
|
31
|
-
class HostRunInfoAsd : public HostRunInfo {
|
|
32
|
-
public:
|
|
33
|
-
HostRunInfoAsd() = default;
|
|
34
|
-
~HostRunInfoAsd() = default;
|
|
35
|
-
|
|
36
|
-
HostRunInfoAsd(const HostRunInfoAsd &other);
|
|
37
|
-
HostRunInfoAsd(HostRunInfoAsd &other);
|
|
38
|
-
|
|
39
|
-
const HostRunInfoAsd &operator=(const HostRunInfoAsd &other);
|
|
40
|
-
const HostRunInfoAsd &operator=(HostRunInfoAsd &other);
|
|
41
|
-
AsdOps::RunInfo run_info_;
|
|
42
|
-
};
|
|
43
|
-
using HostRunInfoAsdPtr = std::shared_ptr<HostRunInfoAsd>;
|
|
44
|
-
|
|
45
|
-
class AsdOp : public AcmeOp {
|
|
46
|
-
public:
|
|
47
|
-
AsdOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii,
|
|
48
|
-
const AsdOps::Any ¶m, const std::string &asd_op_name);
|
|
49
|
-
AsdOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii,
|
|
50
|
-
const std::string &asd_op_name);
|
|
51
|
-
virtual ~AsdOp() = default;
|
|
52
|
-
AcmeStatus UpdateShape(const ShapeInfoList &inputs_shape, const ShapeInfoList &outputs_shape) override;
|
|
53
|
-
void SetTilingInfo(const TilingInfoPtr &tiling_info) override;
|
|
54
|
-
|
|
55
|
-
AcmeStatus TilingImpl(RawHostAddr host_ptr, HostRunInfoPtr *run_info_ptr) override;
|
|
56
|
-
AcmeStatus LaunchImpl(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, const WsAddrList &ws_ptrs,
|
|
57
|
-
void *stream) override;
|
|
58
|
-
|
|
59
|
-
std::string DumpTiling(const RawHostAddr host_ptr) const override;
|
|
60
|
-
ShapeInfoList InferShape(const ShapeInfoList &inputs_shape) const override;
|
|
61
|
-
|
|
62
|
-
protected:
|
|
63
|
-
virtual void UpdateLaunchParam();
|
|
64
|
-
AcmeStatus InitImpl() override;
|
|
65
|
-
void SetParam(const AsdOps::Any ¶m);
|
|
66
|
-
AsdOps::LaunchParam launch_param_;
|
|
67
|
-
|
|
68
|
-
private:
|
|
69
|
-
void UpdateRunInfo(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, const WsAddrList &ws_ptrs,
|
|
70
|
-
void *stream);
|
|
71
|
-
|
|
72
|
-
uint32_t dim_axis_{0};
|
|
73
|
-
bool is_same_shape_{true};
|
|
74
|
-
ShapeInfo input_shape1_;
|
|
75
|
-
ShapeInfo input_shape2_;
|
|
76
|
-
AsdOps::Any asd_param_;
|
|
77
|
-
std::string asd_op_name_;
|
|
78
|
-
AsdOps::OpDesc op_desc_;
|
|
79
|
-
AsdOps::Tactic *tactic_{nullptr};
|
|
80
|
-
AsdOps::Operation *op_{nullptr};
|
|
81
|
-
HostRunInfoAsdPtr host_run_info_asd_ptr_{nullptr};
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
using AsdOpPtr = std::shared_ptr<AsdOp>;
|
|
85
|
-
} // namespace acme
|
|
86
|
-
} // namespace mindspore
|
|
87
|
-
|
|
88
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_OPS_H_
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_PA_OP_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_PA_OP_H_
|
|
19
|
-
|
|
20
|
-
#include <any>
|
|
21
|
-
#include "acme/src/ops/host_src/asd_ops.h"
|
|
22
|
-
|
|
23
|
-
#include "asdops/op_desc.h"
|
|
24
|
-
#include "asdops/operation.h"
|
|
25
|
-
#include "asdops/run_info.h"
|
|
26
|
-
#include "asdops/tactic.h"
|
|
27
|
-
#include "asdops/tensor.h"
|
|
28
|
-
|
|
29
|
-
namespace mindspore {
|
|
30
|
-
namespace acme {
|
|
31
|
-
class AsdPAOp : public AsdOp {
|
|
32
|
-
public:
|
|
33
|
-
AsdPAOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii,
|
|
34
|
-
const AsdOps::Any ¶m, const std::string &kenrel_name);
|
|
35
|
-
~AsdPAOp() = default;
|
|
36
|
-
|
|
37
|
-
protected:
|
|
38
|
-
void UpdateLaunchParam() override;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
using AsdPAOpPtr = std::shared_ptr<AsdPAOp>;
|
|
42
|
-
} // namespace acme
|
|
43
|
-
} // namespace mindspore
|
|
44
|
-
|
|
45
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_ASD_PA_OP_H_
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_CAST_OP_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_CAST_OP_H_
|
|
19
|
-
|
|
20
|
-
#include "acme/include/acme_op.h"
|
|
21
|
-
#include "acme/src/ops/device_src/ascendc/cast/cast_tiling.h"
|
|
22
|
-
|
|
23
|
-
namespace mindspore {
|
|
24
|
-
namespace acme {
|
|
25
|
-
class CastOp : public AcmeOp {
|
|
26
|
-
public:
|
|
27
|
-
CastOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii)
|
|
28
|
-
: AcmeOp(inputs_ii, outputs_ii) {}
|
|
29
|
-
~CastOp() = default;
|
|
30
|
-
|
|
31
|
-
std::string DumpTiling(const RawHostAddr host_ptr) const override;
|
|
32
|
-
ShapeInfoList InferShape(const ShapeInfoList &inputs_shape) const override;
|
|
33
|
-
|
|
34
|
-
protected:
|
|
35
|
-
AcmeStatus InitImpl() override;
|
|
36
|
-
AcmeStatus TilingImpl(RawHostAddr host_ptr, HostRunInfoPtr *run_info_ptr) override;
|
|
37
|
-
AcmeStatus LaunchImpl(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, const WsAddrList &ws_ptrs,
|
|
38
|
-
void *stream) override;
|
|
39
|
-
|
|
40
|
-
private:
|
|
41
|
-
void DoUbTiling(uint32_t factor, uint32_t total_num, uint32_t &ub_num, uint32_t &ub_loop, uint32_t &ub_tail);
|
|
42
|
-
int32_t GetCastDType();
|
|
43
|
-
uint32_t GetMaxUbCount(uint32_t cast_type);
|
|
44
|
-
|
|
45
|
-
int32_t cast_type_{UNSUPPORTED_DTYPE};
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
using CastOpPtr = std::shared_ptr<CastOp>;
|
|
49
|
-
} // namespace acme
|
|
50
|
-
} // namespace mindspore
|
|
51
|
-
|
|
52
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_CAST_OP_H_
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Huawei Technologies Co., Ltd
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_MATMUL_OP_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_MATMUL_OP_H_
|
|
19
|
-
|
|
20
|
-
#include <algorithm>
|
|
21
|
-
#include "acme/include/acme_op.h"
|
|
22
|
-
#include "acme/include/op_param.h"
|
|
23
|
-
#include "matmul/kernel/matmul.h"
|
|
24
|
-
#include "tune_repo/matmul_table.h"
|
|
25
|
-
#include "matmul_common/pp_matmul_info.h"
|
|
26
|
-
#include "matmul_common/tiling_data.h"
|
|
27
|
-
#include "matmul_common/pp_matmul_common_tiling.h"
|
|
28
|
-
|
|
29
|
-
#include "asdops/op_desc.h"
|
|
30
|
-
#include "asdops/operation.h"
|
|
31
|
-
#include "asdops/run_info.h"
|
|
32
|
-
#include "asdops/tactic.h"
|
|
33
|
-
#include "asdops/tensor.h"
|
|
34
|
-
|
|
35
|
-
#include "backend_param.h"
|
|
36
|
-
|
|
37
|
-
using namespace mindspore::internal;
|
|
38
|
-
using namespace mindspore::internal::tiling;
|
|
39
|
-
|
|
40
|
-
namespace mindspore {
|
|
41
|
-
namespace acme {
|
|
42
|
-
enum class MatMulAlgo { PP = 0, LLM_CUSTOM = 1 };
|
|
43
|
-
enum class MatMulFusionLevel { NONE = 0, CUBE = 1, MIX= 2 };
|
|
44
|
-
|
|
45
|
-
class MatmulOp : public AcmeOp {
|
|
46
|
-
public:
|
|
47
|
-
MatmulOp(const InputsImmutableInfoList &inputs_ii, const OutputsImmutableInfoList &outputs_ii,
|
|
48
|
-
const MatmulParam ¶m);
|
|
49
|
-
~MatmulOp() = default;
|
|
50
|
-
|
|
51
|
-
std::string DumpTiling(const RawHostAddr host_ptr) const override;
|
|
52
|
-
|
|
53
|
-
bool IsSupported(const InputDataTypes &dtypes) override { return true; }
|
|
54
|
-
|
|
55
|
-
ShapeInfoList InferShape(const ShapeInfoList &inputs_shape) const override;
|
|
56
|
-
|
|
57
|
-
protected:
|
|
58
|
-
AcmeStatus InitImpl() override;
|
|
59
|
-
AcmeStatus TilingImpl(RawHostAddr host_ptr, HostRunInfoPtr *run_info_ptr) override;
|
|
60
|
-
AcmeStatus LaunchImpl(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, const WsAddrList &ws_ptrs,
|
|
61
|
-
void *stream) override;
|
|
62
|
-
|
|
63
|
-
private:
|
|
64
|
-
void SetFusionLevel();
|
|
65
|
-
bool UseCustomMatMul();
|
|
66
|
-
bool GenTilingId(uint32_t &tiling_id);
|
|
67
|
-
void GetTunedKey();
|
|
68
|
-
void SetTunedValueCustom(const std::vector<int> &tuned_config);
|
|
69
|
-
bool GetPpMatmulTiling(const MatMulInfo &, uint32_t &,
|
|
70
|
-
PpTilingData &, const REPO &, const std::vector<int> &);
|
|
71
|
-
void TilingBasicFromPp(uint32_t &, PpTilingData &);
|
|
72
|
-
AcmeStatus TilingLLMCustom(RawHostAddr, uint64_t, uint32_t &,
|
|
73
|
-
const PpTilingData &);
|
|
74
|
-
AcmeStatus TilingPp(RawHostAddr &tiling_addr, uint32_t tiling_id, const uint32_t &block_dim,
|
|
75
|
-
const PpTilingData &tilingdata);
|
|
76
|
-
AcmeStatus LaunchMix(const InputsAddrList &input_ptrs, const OutputsAddrList &output_ptrs, void *stream);
|
|
77
|
-
|
|
78
|
-
MatmulParam param_;
|
|
79
|
-
REPO tuning_table_;
|
|
80
|
-
REPO tuning_table_custom_;
|
|
81
|
-
MatMulFusionLevel fusion_level_ = MatMulFusionLevel::NONE;
|
|
82
|
-
std::vector<int> tune_key_;
|
|
83
|
-
CustomMatmulTilingData t_;
|
|
84
|
-
uint32_t m_;
|
|
85
|
-
uint32_t n_;
|
|
86
|
-
uint32_t k_;
|
|
87
|
-
MatMulAlgo algo_ = MatMulAlgo::PP;
|
|
88
|
-
HardwareInfo hw_info_;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
using MatmulOpPtr = std::shared_ptr<MatmulOp>;
|
|
92
|
-
} // namespace acme
|
|
93
|
-
} // namespace mindspore
|
|
94
|
-
|
|
95
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ACME_SRC_OPS_HOST_SRC_MATMUL_OP_H_
|