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,245 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_H_
|
|
19
|
-
|
|
20
|
-
#include "grouped_matmul_utils.h"
|
|
21
|
-
#include "../tiling_data.h"
|
|
22
|
-
|
|
23
|
-
namespace GROUPED_MATMUL {
|
|
24
|
-
|
|
25
|
-
#define DTYPE_X half
|
|
26
|
-
#define DTYPE_WEIGHT half
|
|
27
|
-
#define DTYPE_BIAS half
|
|
28
|
-
#define DTYPE_Y half
|
|
29
|
-
|
|
30
|
-
/*@brief store variables for core split configuration
|
|
31
|
-
*/
|
|
32
|
-
struct MNConfig {
|
|
33
|
-
uint32_t m;
|
|
34
|
-
uint32_t k;
|
|
35
|
-
uint32_t n;
|
|
36
|
-
uint32_t baseM;
|
|
37
|
-
uint32_t baseN;
|
|
38
|
-
uint32_t mIdx;
|
|
39
|
-
uint32_t nIdx;
|
|
40
|
-
uint32_t blockDimM;
|
|
41
|
-
uint32_t blockDimN;
|
|
42
|
-
uint32_t singleM;
|
|
43
|
-
uint32_t singleN;
|
|
44
|
-
uint32_t ubBaseN;
|
|
45
|
-
uint32_t ubCalSize;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** @brief GroupMatmul operator Class
|
|
49
|
-
*/
|
|
50
|
-
template <typename ComputeType>
|
|
51
|
-
class GroupedMatmulProcess {
|
|
52
|
-
private:
|
|
53
|
-
__aicore__ inline void Process_();
|
|
54
|
-
|
|
55
|
-
ComputeType &computeOp; // inernal computation operator
|
|
56
|
-
const GroupedMatmulTilingData *__restrict tilingData;
|
|
57
|
-
|
|
58
|
-
uint32_t blockIdx;
|
|
59
|
-
uint32_t subBlockIdx;
|
|
60
|
-
uint32_t coreIdx;
|
|
61
|
-
uint32_t groupNum;
|
|
62
|
-
uint32_t coreNum;
|
|
63
|
-
uint32_t baseM;
|
|
64
|
-
uint32_t baseN;
|
|
65
|
-
uint32_t ubBaseM;
|
|
66
|
-
uint32_t ubBaseN;
|
|
67
|
-
uint32_t ubCalSize;
|
|
68
|
-
uint32_t ubRestBytes;
|
|
69
|
-
|
|
70
|
-
public:
|
|
71
|
-
/** @brief constructor */
|
|
72
|
-
__aicore__ inline GroupedMatmulProcess(ComputeType &computeOp_) : computeOp(computeOp_) {}
|
|
73
|
-
|
|
74
|
-
__aicore__ inline void Init(const GroupedMatmulTilingData *__restrict tiling);
|
|
75
|
-
|
|
76
|
-
__aicore__ inline void Process();
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
template <typename ComputeType>
|
|
80
|
-
__aicore__ inline void GroupedMatmulProcess<ComputeType>::Init(const GroupedMatmulTilingData *__restrict tiling) {
|
|
81
|
-
blockIdx = GetBlockIdx();
|
|
82
|
-
subBlockIdx = GetSubBlockIdx();
|
|
83
|
-
coreIdx = blockIdx / GetTaskRation();
|
|
84
|
-
tilingData = tiling;
|
|
85
|
-
groupNum = tilingData->groupedMatmulBaseParams.groupNum;
|
|
86
|
-
baseM = tilingData->mmTilingData.baseM;
|
|
87
|
-
baseN = tilingData->mmTilingData.baseN;
|
|
88
|
-
ubBaseM = tilingData->groupedMatmulBaseParams.ubBaseM;
|
|
89
|
-
ubBaseN = tilingData->groupedMatmulBaseParams.ubBaseN;
|
|
90
|
-
coreNum = tilingData->groupedMatmulBaseParams.coreNum;
|
|
91
|
-
ubCalSize = tilingData->groupedMatmulBaseParams.ubCalSize;
|
|
92
|
-
ubRestBytes = tilingData->groupedMatmulBaseParams.ubRestBytes;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
template <typename ComputeType>
|
|
96
|
-
__aicore__ inline void GroupedMatmulProcess<ComputeType>::Process() {
|
|
97
|
-
auto &ubM = tilingData->groupedMatmulBaseParams.mList;
|
|
98
|
-
auto &ubK = tilingData->groupedMatmulBaseParams.kList;
|
|
99
|
-
auto &ubN = tilingData->groupedMatmulBaseParams.nList;
|
|
100
|
-
|
|
101
|
-
MNConfig mnConfig;
|
|
102
|
-
mnConfig.ubBaseN = ubBaseN;
|
|
103
|
-
mnConfig.ubCalSize = ubCalSize;
|
|
104
|
-
uint32_t count = 0;
|
|
105
|
-
uint32_t wOutOffset = 0; // for antiquant
|
|
106
|
-
for (uint32_t groupIdx(0); groupIdx < groupNum; ++groupIdx) {
|
|
107
|
-
mnConfig.m = ubM[groupIdx];
|
|
108
|
-
mnConfig.k = ubK[groupIdx];
|
|
109
|
-
mnConfig.n = ubN[groupIdx];
|
|
110
|
-
uint32_t dimM = Ceil(mnConfig.m, baseM);
|
|
111
|
-
uint32_t dimN = Ceil(mnConfig.n, baseN);
|
|
112
|
-
mnConfig.singleM = baseM;
|
|
113
|
-
mnConfig.singleN = baseN;
|
|
114
|
-
mnConfig.blockDimM = dimM;
|
|
115
|
-
mnConfig.blockDimN = dimN;
|
|
116
|
-
|
|
117
|
-
uint32_t curCount = count + dimM * dimN;
|
|
118
|
-
uint32_t curBlock = coreIdx >= count ? coreIdx : coreIdx + coreNum;
|
|
119
|
-
while (curBlock < curCount) {
|
|
120
|
-
mnConfig.mIdx = (curBlock - count) / dimN;
|
|
121
|
-
mnConfig.nIdx = (curBlock - count) % dimN;
|
|
122
|
-
if ASCEND_IS_AIC {
|
|
123
|
-
computeOp.MMCompute(groupIdx, mnConfig, subBlockIdx, wOutOffset);
|
|
124
|
-
}
|
|
125
|
-
curBlock += coreNum;
|
|
126
|
-
}
|
|
127
|
-
wOutOffset += mnConfig.k * mnConfig.n;
|
|
128
|
-
count = curCount % coreNum;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** @brief intenal computation class
|
|
133
|
-
*/
|
|
134
|
-
template <class mmType, bool sync = false>
|
|
135
|
-
class GroupedMatmulCompute {
|
|
136
|
-
public:
|
|
137
|
-
using AT = typename mmType::AT::T;
|
|
138
|
-
using BT = typename mmType::BT::T;
|
|
139
|
-
using CT = typename mmType::CT::T;
|
|
140
|
-
using BiasT = typename mmType::BiasT::T;
|
|
141
|
-
using WT = DTYPE_WEIGHT;
|
|
142
|
-
|
|
143
|
-
/** @brief constructor */
|
|
144
|
-
__aicore__ inline GroupedMatmulCompute(typename mmType::MT &mm_) : mm(mm_) {}
|
|
145
|
-
|
|
146
|
-
__aicore__ inline void Init(GM_ADDR x, GM_ADDR weight, GM_ADDR bias, GM_ADDR scale, GM_ADDR offset,
|
|
147
|
-
GM_ADDR antiquantScale, GM_ADDR antiquantOffset, GM_ADDR y, GM_ADDR workspace,
|
|
148
|
-
const GroupedMatmulTilingData *__restrict tiling, TPipe *tPipe);
|
|
149
|
-
|
|
150
|
-
__aicore__ inline void MMCompute(uint32_t groupIdx, MNConfig &mnConfig, uint32_t subBlockIdx, uint64_t wOutOffset);
|
|
151
|
-
|
|
152
|
-
__aicore__ inline void MMSync(bool waitIterateAll, bool &mmWaitStatus, bool &firstMM);
|
|
153
|
-
|
|
154
|
-
__aicore__ inline void CastWeightProcess(uint32_t curSingleN, uint64_t wInOffset, uint64_t wOutOffset,
|
|
155
|
-
MNConfig &mnConfig);
|
|
156
|
-
__aicore__ inline void CastWeightCompute(uint32_t curCalcK, uint32_t curCalcAlignN);
|
|
157
|
-
__aicore__ inline void DataCopyScaleAndOffset(uint32_t curBaseN, uint32_t alignBaseN, uint64_t scaleOffset,
|
|
158
|
-
uint32_t offsetN);
|
|
159
|
-
|
|
160
|
-
private:
|
|
161
|
-
TPipe *pipe;
|
|
162
|
-
typename mmType::MT &mm; // matmul operator
|
|
163
|
-
bool hasBias = false;
|
|
164
|
-
uint32_t mmDataTypeSize;
|
|
165
|
-
GM_ADDR xTensorPtr;
|
|
166
|
-
GM_ADDR weightTensorPtr;
|
|
167
|
-
GM_ADDR biasTensorPtr;
|
|
168
|
-
GM_ADDR yTensorPtr;
|
|
169
|
-
GM_ADDR antiScaleTensorPtr;
|
|
170
|
-
GM_ADDR antiOffsetTensorPtr;
|
|
171
|
-
GlobalTensor<AT> xGm;
|
|
172
|
-
GlobalTensor<BT> weightGm;
|
|
173
|
-
GlobalTensor<BiasT> biasGm;
|
|
174
|
-
GlobalTensor<CT> yGm;
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
template <typename mmType, bool sync>
|
|
178
|
-
__aicore__ inline void GroupedMatmulCompute<mmType, sync>::Init(GM_ADDR x, GM_ADDR weight, GM_ADDR bias, GM_ADDR scale,
|
|
179
|
-
GM_ADDR offset, GM_ADDR antiquantScale,
|
|
180
|
-
GM_ADDR antiquantOffset, GM_ADDR y, GM_ADDR workspace,
|
|
181
|
-
const GroupedMatmulTilingData *__restrict tiling,
|
|
182
|
-
TPipe *tPipe) {
|
|
183
|
-
xTensorPtr = x;
|
|
184
|
-
weightTensorPtr = weight;
|
|
185
|
-
biasTensorPtr = bias;
|
|
186
|
-
yTensorPtr = y;
|
|
187
|
-
pipe = tPipe;
|
|
188
|
-
if (bias != nullptr && GetTensorAddr<BiasT>(0, biasTensorPtr) != nullptr) {
|
|
189
|
-
hasBias = true;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
template <typename mmType, bool sync>
|
|
194
|
-
__aicore__ inline void GroupedMatmulCompute<mmType, sync>::MMCompute(uint32_t groupIdx, MNConfig &mnConfig,
|
|
195
|
-
uint32_t subBlockIdx, uint64_t wOutOffset) {
|
|
196
|
-
if (subBlockIdx != 0) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
uint32_t curSingleN = mnConfig.singleN;
|
|
201
|
-
uint32_t tailN = mnConfig.nIdx * mnConfig.singleN;
|
|
202
|
-
if (mnConfig.nIdx == mnConfig.blockDimN - 1) {
|
|
203
|
-
curSingleN = mnConfig.n - tailN;
|
|
204
|
-
}
|
|
205
|
-
uint32_t curSingleM = mnConfig.singleM;
|
|
206
|
-
if (mnConfig.mIdx == mnConfig.blockDimM - 1) {
|
|
207
|
-
curSingleM = mnConfig.m - mnConfig.mIdx * curSingleM;
|
|
208
|
-
}
|
|
209
|
-
uint64_t xOffset = mnConfig.mIdx * mnConfig.singleM * mnConfig.k;
|
|
210
|
-
uint64_t wOffset = tailN;
|
|
211
|
-
uint64_t outOffset = mnConfig.mIdx * mnConfig.singleM * mnConfig.n + tailN;
|
|
212
|
-
// init global buffer
|
|
213
|
-
xGm.SetGlobalBuffer(GetTensorAddr<AT>(groupIdx, xTensorPtr));
|
|
214
|
-
weightGm.SetGlobalBuffer(GetTensorAddr<BT>(groupIdx, weightTensorPtr));
|
|
215
|
-
yGm.SetGlobalBuffer(GetTensorAddr<CT>(groupIdx, yTensorPtr));
|
|
216
|
-
mm.SetOrgShape(mnConfig.m, mnConfig.n, mnConfig.k);
|
|
217
|
-
mm.SetSingleShape(curSingleM, curSingleN, mnConfig.k);
|
|
218
|
-
mm.SetTensorA(xGm[xOffset]);
|
|
219
|
-
mm.SetTensorB(weightGm[wOffset]);
|
|
220
|
-
if (hasBias) {
|
|
221
|
-
biasGm.SetGlobalBuffer(GetTensorAddr<BiasT>(groupIdx, biasTensorPtr));
|
|
222
|
-
mm.SetBias(biasGm[tailN]);
|
|
223
|
-
}
|
|
224
|
-
mm.template IterateAll<sync>(yGm[outOffset], 0);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
template <typename mmType, bool sync>
|
|
228
|
-
__aicore__ inline void GroupedMatmulCompute<mmType, sync>::MMSync(bool waitIterateAll, bool &mmWaitStatus,
|
|
229
|
-
bool &firstMM) {
|
|
230
|
-
if (mmWaitStatus) {
|
|
231
|
-
mm.WaitIterateAll();
|
|
232
|
-
mm.End();
|
|
233
|
-
mmWaitStatus = false;
|
|
234
|
-
}
|
|
235
|
-
if (unlikely(firstMM)) {
|
|
236
|
-
firstMM = false;
|
|
237
|
-
} else {
|
|
238
|
-
if (waitIterateAll) {
|
|
239
|
-
SyncAll<true>();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
} // namespace GROUPED_MATMUL
|
|
244
|
-
|
|
245
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_H_
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef GROUPED_MATMUL_INTERFACE_H
|
|
18
|
-
#define GROUPED_MATMUL_INTERFACE_H
|
|
19
|
-
|
|
20
|
-
void grouped_matmul_do(uint32_t blockDim, void *l2ctrl, void *stream, uint8_t *x, uint8_t *weight, uint8_t *bias,
|
|
21
|
-
uint8_t *scale, uint8_t *offset, uint8_t *antiquantScale, uint8_t *antiquantOffset,
|
|
22
|
-
uint8_t *group_list, uint8_t *y, uint8_t *workspace, uint8_t *tiling);
|
|
23
|
-
|
|
24
|
-
#endif // GROUPED_MATMUL_INTERFACE_H
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
#ifndef MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_UTILS_H_
|
|
18
|
-
#define MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_UTILS_H_
|
|
19
|
-
|
|
20
|
-
#include "kernel_tiling/kernel_tiling.h"
|
|
21
|
-
#include "kernel_operator.h"
|
|
22
|
-
#include "lib/matmul_intf.h"
|
|
23
|
-
|
|
24
|
-
namespace GROUPED_MATMUL {
|
|
25
|
-
using namespace AscendC;
|
|
26
|
-
|
|
27
|
-
constexpr uint32_t UB_BLOCK_UNIT_SIZE = 32; // 32: a block has 32 bytes data
|
|
28
|
-
constexpr uint32_t HALF_UB_BLOCK_UNIT_SIZE = UB_BLOCK_UNIT_SIZE / 2; // 2: a float16 data has two bytes
|
|
29
|
-
|
|
30
|
-
constexpr MatmulConfig NZ_CFG_MDL = GetMDLConfig(false, false, 0, true, false, false, false);
|
|
31
|
-
|
|
32
|
-
template <class AT_, class BT_, class CT_, class BiasT_, const MatmulConfig &MM_CFG = CFG_MDL>
|
|
33
|
-
struct MMType {
|
|
34
|
-
using AT = AT_;
|
|
35
|
-
using BT = BT_;
|
|
36
|
-
using CT = CT_;
|
|
37
|
-
using BiasT = BiasT_;
|
|
38
|
-
using MT = matmul::Matmul<AT, BT, CT, BiasT, MM_CFG>;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
template <class AT_, class BT_, class CT_, class BiasT_, const MatmulConfig &MM_CFG = CFG_MDL>
|
|
42
|
-
struct MMImplType {
|
|
43
|
-
using AT = AT_;
|
|
44
|
-
using BT = BT_;
|
|
45
|
-
using CT = CT_;
|
|
46
|
-
using BiasT = BiasT_;
|
|
47
|
-
using MT = matmul::MatmulImpl<AT, BT, CT, BiasT, MM_CFG>;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
template <typename T>
|
|
51
|
-
__aicore__ inline T Max(T a, T b) {
|
|
52
|
-
return a > b ? a : b;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
template <typename T>
|
|
56
|
-
__aicore__ inline T Min(T a, T b) {
|
|
57
|
-
return a > b ? b : a;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
template <uint32_t base, typename T = uint32_t>
|
|
61
|
-
__aicore__ inline T AlignUp(T a) {
|
|
62
|
-
return (a + base - 1) / base * base;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
template <typename T>
|
|
66
|
-
__aicore__ inline T AlignUp(T a, T base) {
|
|
67
|
-
return (a + base - 1) / base * base;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
template <typename T>
|
|
71
|
-
__aicore__ inline T AlignDown(T a, T base) {
|
|
72
|
-
if (unlikely(base == 0)) {
|
|
73
|
-
return a;
|
|
74
|
-
}
|
|
75
|
-
return a / base * base;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
template <>
|
|
79
|
-
__aicore__ inline uint32_t AlignUp<4, uint32_t>(uint32_t a) {
|
|
80
|
-
// to be Multiple of 4, result should be in a format of b(xxxx,x100).
|
|
81
|
-
// This means last two bits should be zero, requiring that
|
|
82
|
-
// result = num & b(1111,1100) = num & (~3).
|
|
83
|
-
// &(~3) operator may reduces num into the range [num, num - 3].
|
|
84
|
-
// As the result should be no less than a (result >= a), it means num - 3 >= a in the worst case.
|
|
85
|
-
// In this case, num >= a+3. On the other hand, num should also be less then a+4, otherwise,
|
|
86
|
-
// the result will not be least multiple of 4 for 3. In other cases like [num, num - 2],
|
|
87
|
-
// num = a + 3 also satisfies the goal condition.
|
|
88
|
-
return (a + 3) & ~3; // & ~3: set last two bits of (a+3) to be zero
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
template <>
|
|
92
|
-
__aicore__ inline uint32_t AlignUp<16, uint32_t>(uint32_t a) {
|
|
93
|
-
// In general, if we want to get the least multiple of b (b is the power of 2) for a,
|
|
94
|
-
// it comes to a conclusion from the above comment: result = (a + (b - 1)) & (~b)
|
|
95
|
-
return (a + 15) & ~15; // & ~15: set last four bits of (a+15) to be zero
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
template <>
|
|
99
|
-
__aicore__ inline uint32_t AlignUp<32, uint32_t>(uint32_t a) {
|
|
100
|
-
// refer to the above comments.
|
|
101
|
-
return (a + 31) & ~31; // & ~31: set last five bits of (a+31) to be zero}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
template <typename T>
|
|
105
|
-
__aicore__ inline __gm__ T *GetTensorAddr(uint16_t index, GM_ADDR tensorPtr) {
|
|
106
|
-
__gm__ uint64_t *dataAddr = reinterpret_cast<__gm__ uint64_t *>(tensorPtr);
|
|
107
|
-
return reinterpret_cast<__gm__ T *>(*(dataAddr + index));
|
|
108
|
-
}
|
|
109
|
-
} // namespace GROUPED_MATMUL
|
|
110
|
-
|
|
111
|
-
#endif // MS_KERNELS_INTERNAL_KERNEL_ASCENDC_GROUPED_MATMUL_UTILS_H_
|
mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/grouped_matmul/tiling_data.h
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#ifndef __GROUPED_MATMUL_TILING_DATA_H__
|
|
2
|
-
#define __GROUPED_MATMUL_TILING_DATA_H__
|
|
3
|
-
|
|
4
|
-
#include <cstdint>
|
|
5
|
-
#include <cstring>
|
|
6
|
-
|
|
7
|
-
#include "kernel_tiling/kernel_tiling.h"
|
|
8
|
-
|
|
9
|
-
constexpr uint16_t MAX_TENSOR_CONT = 128;
|
|
10
|
-
|
|
11
|
-
#pragma pack(1)
|
|
12
|
-
struct GroupedMatmulBaseParams {
|
|
13
|
-
uint32_t groupNum = 0;
|
|
14
|
-
uint32_t coreNum = 0;
|
|
15
|
-
uint32_t activeType = 0;
|
|
16
|
-
uint32_t ubBaseM = 0;
|
|
17
|
-
uint32_t ubBaseN = 0;
|
|
18
|
-
uint32_t ubCalSize = 0;
|
|
19
|
-
uint32_t ubRestBytes = 0;
|
|
20
|
-
uint32_t workspaceSize = 0;
|
|
21
|
-
int32_t mList[MAX_TENSOR_CONT] = {};
|
|
22
|
-
int32_t kList[MAX_TENSOR_CONT] = {};
|
|
23
|
-
int32_t nList[MAX_TENSOR_CONT] = {};
|
|
24
|
-
};
|
|
25
|
-
#pragma pack()
|
|
26
|
-
|
|
27
|
-
#pragma pack(1)
|
|
28
|
-
struct GroupedMatmulCtxParams {
|
|
29
|
-
uint32_t tilingKey = 0;
|
|
30
|
-
uint32_t blockDim = 0;
|
|
31
|
-
uint32_t blockDim2 = 0;
|
|
32
|
-
uint32_t blockDim3 = 0;
|
|
33
|
-
uint32_t blockDim4 = 0;
|
|
34
|
-
uint32_t blockDim5 = 0;
|
|
35
|
-
uint32_t blockDim6 = 0;
|
|
36
|
-
uint32_t blockDim7 = 0;
|
|
37
|
-
uint32_t blockDim8 = 0;
|
|
38
|
-
};
|
|
39
|
-
#pragma pack()
|
|
40
|
-
|
|
41
|
-
#pragma pack(1)
|
|
42
|
-
struct GroupedMatmulTilingData {
|
|
43
|
-
GroupedMatmulBaseParams groupedMatmulBaseParams;
|
|
44
|
-
TCubeTiling mmTilingData;
|
|
45
|
-
GroupedMatmulCtxParams gmmCtxParams;
|
|
46
|
-
};
|
|
47
|
-
#pragma pack()
|
|
48
|
-
|
|
49
|
-
#undef GET_TILING_DATA
|
|
50
|
-
#define GET_TILING_DATA(tiling_data, tiling_arg) \
|
|
51
|
-
GroupedMatmulTilingData tiling_data; \
|
|
52
|
-
InitGroupedMatmulTilingData(tiling_arg, &tiling_data)
|
|
53
|
-
|
|
54
|
-
#endif
|
mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/compare_param.h
DELETED
|
@@ -1,31 +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
|
-
#ifndef COMPARE_PARAMS_H_
|
|
17
|
-
#define COMPARE_PARAMS_H_
|
|
18
|
-
|
|
19
|
-
#include "types.h"
|
|
20
|
-
#include "op_param.h"
|
|
21
|
-
#include <set>
|
|
22
|
-
|
|
23
|
-
namespace mindspore {
|
|
24
|
-
namespace internal {
|
|
25
|
-
struct CompareParam : public OpParam {
|
|
26
|
-
DIMS input1_dims_;
|
|
27
|
-
DIMS input2_dims_;
|
|
28
|
-
};
|
|
29
|
-
} // namespace internal
|
|
30
|
-
} // namespace mindspore
|
|
31
|
-
#endif
|
mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/elewise_param.h
DELETED
|
@@ -1,41 +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
|
-
#ifndef ELEWISE_PARAMS_H_
|
|
17
|
-
#define ELEWISE_PARAMS_H_
|
|
18
|
-
|
|
19
|
-
#include "types.h"
|
|
20
|
-
#include "op_param.h"
|
|
21
|
-
#include <set>
|
|
22
|
-
namespace mindspore {
|
|
23
|
-
namespace internal {
|
|
24
|
-
#define MAX_ELEWISE_SHAPE_LEN 16
|
|
25
|
-
struct ElewiseBaseParam : public OpParam {
|
|
26
|
-
size_t dims_;
|
|
27
|
-
int32_t dtype_;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
struct ElewiseUnaryParam : public ElewiseBaseParam {};
|
|
31
|
-
|
|
32
|
-
struct ElewiseBinaryParam : public ElewiseBaseParam {
|
|
33
|
-
DIMS input0_dims_;
|
|
34
|
-
DIMS input1_dims_;
|
|
35
|
-
uint32_t broadcast_mode_;
|
|
36
|
-
int64_t in0_shape_[MAX_ELEWISE_SHAPE_LEN];
|
|
37
|
-
int64_t in1_shape_[MAX_ELEWISE_SHAPE_LEN];
|
|
38
|
-
};
|
|
39
|
-
} // namespace internal
|
|
40
|
-
} // namespace mindspore
|
|
41
|
-
#endif // ELEWISE_PARAMS_H_
|
mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/grouped_matmul_param.h
DELETED
|
@@ -1,40 +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
|
-
#ifndef GROUPED_MATMUL_PARAMS_H
|
|
17
|
-
#define GROUPED_MATMUL_PARAMS_H
|
|
18
|
-
|
|
19
|
-
#include "types.h"
|
|
20
|
-
#include "op_param.h"
|
|
21
|
-
|
|
22
|
-
namespace mindspore {
|
|
23
|
-
namespace internal {
|
|
24
|
-
struct GroupedMatmulParam : public OpParam {
|
|
25
|
-
/*
|
|
26
|
-
split_item inputs weight bias outputs
|
|
27
|
-
0: separated separated separated separated
|
|
28
|
-
1: integrated e, k, n e, n separated
|
|
29
|
-
2: separated separated separated integrated
|
|
30
|
-
3: integrated e, k, n e, n integrated
|
|
31
|
-
*/
|
|
32
|
-
int split_item = 0;
|
|
33
|
-
int dtype = 0; // TODO dtype 什么用处
|
|
34
|
-
bool transpose_weight = false;
|
|
35
|
-
int group_num = 1;
|
|
36
|
-
bool has_bias = false;
|
|
37
|
-
};
|
|
38
|
-
} // namespace internal
|
|
39
|
-
} // namespace mindspore
|
|
40
|
-
#endif
|