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,180 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import os, sys
|
|
3
|
-
import ctypes
|
|
4
|
-
import json
|
|
5
|
-
import shutil
|
|
6
|
-
from tbe.common.platform import get_soc_spec
|
|
7
|
-
from tbe.common.utils import para_check
|
|
8
|
-
from tbe.tikcpp import compile_op, replay_op, check_op_cap, generalize_op_params, get_code_channel, OpInfo
|
|
9
|
-
from tbe.common.buildcfg import get_default_build_config
|
|
10
|
-
from impl.util.platform_adapter import tbe_register
|
|
11
|
-
from tbe.common.buildcfg import get_current_build_config
|
|
12
|
-
PYF_PATH = os.path.dirname(os.path.realpath(__file__))
|
|
13
|
-
|
|
14
|
-
DTYPE_MAP = {"float32": ["DT_FLOAT", "float"],
|
|
15
|
-
"float16": ["DT_FLOAT16", "half"],
|
|
16
|
-
"int8": ["DT_INT8", "int8_t"],
|
|
17
|
-
"int16": ["DT_INT16", "int16_t"],
|
|
18
|
-
"int32": ["DT_INT32", "int32_t"],
|
|
19
|
-
"int64": ["DT_INT64", "int64_t"],
|
|
20
|
-
"uint1": ["DT_UINT1", "uint8_t"],
|
|
21
|
-
"uint8": ["DT_UINT8", "uint8_t"],
|
|
22
|
-
"uint16": ["DT_UINT16", "uint16_t"],
|
|
23
|
-
"uint32": ["DT_UINT32", "uint32_t"],
|
|
24
|
-
"uint64": ["DT_UINT64", "uint64_t"],
|
|
25
|
-
"bool": ["DT_BOOL", "bool"],
|
|
26
|
-
"double": ["DT_DOUBLE", "double"],
|
|
27
|
-
"dual": ["DT_DUAL", "unknown"],
|
|
28
|
-
"dual_sub_int8": ["DT_DUAL_SUB_INT8", "unknown"],
|
|
29
|
-
"dual_sub_uint8": ["DT_DUAL_SUB_UINT8", "unknown"],
|
|
30
|
-
"string": ["DT_STRING", "unknown"],
|
|
31
|
-
"complex64": ["DT_COMPLEX64", "unknown"],
|
|
32
|
-
"complex128": ["DT_COMPLEX128", "unknown"],
|
|
33
|
-
"qint8": ["DT_QINT8", "unknown"],
|
|
34
|
-
"qint16": ["DT_QINT16", "unknown"],
|
|
35
|
-
"qint32": ["DT_QINT32", "unknown"],
|
|
36
|
-
"quint8": ["DT_QUINT8", "unknown"],
|
|
37
|
-
"quint16": ["DT_QUINT16", "unknown"],
|
|
38
|
-
"resource": ["DT_RESOURCE", "unknown"],
|
|
39
|
-
"string_ref": ["DT_STRING_REF", "unknown"],
|
|
40
|
-
"int4": ["DT_INT4", "int4b_t"],
|
|
41
|
-
"bfloat16": ["DT_BF16", "bfloat16_t"]}
|
|
42
|
-
|
|
43
|
-
def add_dtype_fmt_option_single(x, x_n, is_ref: bool = False):
|
|
44
|
-
options = []
|
|
45
|
-
x_fmt = x.get("format")
|
|
46
|
-
x_dtype = x.get("dtype")
|
|
47
|
-
x_n_in_kernel = x_n + '_REF' if is_ref else x_n
|
|
48
|
-
options.append("-DDTYPE_{n}={t}".format(n=x_n_in_kernel, t=DTYPE_MAP.get(x_dtype)[1]))
|
|
49
|
-
options.append("-DORIG_DTYPE_{n}={ot}".format(n=x_n_in_kernel, ot=DTYPE_MAP.get(x_dtype)[0]))
|
|
50
|
-
options.append("-DFORMAT_{n}=FORMAT_{f}".format(n=x_n_in_kernel, f=x_fmt))
|
|
51
|
-
return options
|
|
52
|
-
|
|
53
|
-
def get_dtype_fmt_options(__inputs__, __outputs__):
|
|
54
|
-
options = []
|
|
55
|
-
unique_param_name_set = set()
|
|
56
|
-
for x in __inputs__:
|
|
57
|
-
if x is None:
|
|
58
|
-
continue
|
|
59
|
-
x_n = x.get("param_name")[:-5].upper()
|
|
60
|
-
unique_param_name_set.add(x_n)
|
|
61
|
-
options += add_dtype_fmt_option_single(x, x_n)
|
|
62
|
-
|
|
63
|
-
for x in __outputs__:
|
|
64
|
-
if x is None:
|
|
65
|
-
continue
|
|
66
|
-
x_n = x.get("param_name")[:-5].upper()
|
|
67
|
-
if x_n in unique_param_name_set:
|
|
68
|
-
options += add_dtype_fmt_option_single(x, x_n, True)
|
|
69
|
-
else:
|
|
70
|
-
options += add_dtype_fmt_option_single(x, x_n)
|
|
71
|
-
return options
|
|
72
|
-
|
|
73
|
-
def load_dso(so_path):
|
|
74
|
-
try:
|
|
75
|
-
ctypes.CDLL(so_path)
|
|
76
|
-
except OSError as error :
|
|
77
|
-
print(error)
|
|
78
|
-
raise RuntimeError("cannot open %s" %(so_path))
|
|
79
|
-
else:
|
|
80
|
-
print("load so succ ", so_path)
|
|
81
|
-
|
|
82
|
-
def get_shortsoc_compile_option(compile_option_list: list, shortsoc:str):
|
|
83
|
-
compile_options = []
|
|
84
|
-
if shortsoc in compile_option_list:
|
|
85
|
-
compile_options = compile_option_list[shortsoc]
|
|
86
|
-
elif '__ALLSOC__' in compile_option_list:
|
|
87
|
-
compile_options = compile_option_list['__ALLSOC__']
|
|
88
|
-
return compile_options
|
|
89
|
-
|
|
90
|
-
def get_kernel_source(src_file, dir_snake, dir_ex):
|
|
91
|
-
src_ex = os.path.join(PYF_PATH, "..", "ascendc", dir_ex, src_file)
|
|
92
|
-
if os.path.exists(src_ex):
|
|
93
|
-
return src_ex
|
|
94
|
-
src = os.path.join(PYF_PATH, "..", "ascendc", dir_snake, src_file)
|
|
95
|
-
if os.path.exists(src):
|
|
96
|
-
return src
|
|
97
|
-
src = os.path.join(PYF_PATH, src_file)
|
|
98
|
-
if os.path.exists(src):
|
|
99
|
-
return src
|
|
100
|
-
return src_ex
|
|
101
|
-
|
|
102
|
-
def _build_args(gradient_in__, is_finite_out_):
|
|
103
|
-
__inputs__ = []
|
|
104
|
-
for arg in [gradient_in__]:
|
|
105
|
-
if arg != None:
|
|
106
|
-
if isinstance(arg, (list, tuple)):
|
|
107
|
-
if len(arg) == 0:
|
|
108
|
-
continue
|
|
109
|
-
__inputs__.append(arg[0])
|
|
110
|
-
else:
|
|
111
|
-
__inputs__.append(arg)
|
|
112
|
-
__outputs__ = []
|
|
113
|
-
for arg in [is_finite_out_]:
|
|
114
|
-
if arg != None:
|
|
115
|
-
if isinstance(arg, (list, tuple)):
|
|
116
|
-
if len(arg) == 0:
|
|
117
|
-
continue
|
|
118
|
-
__outputs__.append(arg[0])
|
|
119
|
-
else:
|
|
120
|
-
__outputs__.append(arg)
|
|
121
|
-
__attrs__ = []
|
|
122
|
-
return __inputs__, __outputs__, __attrs__
|
|
123
|
-
|
|
124
|
-
@tbe_register.register_operator("AllFinite", trans_bool_to_s8=False)
|
|
125
|
-
@para_check.check_op_params(para_check.REQUIRED_INPUT, para_check.REQUIRED_OUTPUT, para_check.KERNEL_NAME)
|
|
126
|
-
def all_finite(gradient_in__, is_finite_out_, kernel_name="all_finite", impl_mode=""):
|
|
127
|
-
if get_current_build_config("enable_op_prebuild"):
|
|
128
|
-
return
|
|
129
|
-
__inputs__, __outputs__, __attrs__ = _build_args(gradient_in__, is_finite_out_)
|
|
130
|
-
options = get_dtype_fmt_options(__inputs__, __outputs__)
|
|
131
|
-
options += ["-x", "cce"]
|
|
132
|
-
bisheng = shutil.which("bisheng")
|
|
133
|
-
if bisheng != None:
|
|
134
|
-
bisheng_path = os.path.dirname(bisheng)
|
|
135
|
-
tikcpp_path = os.path.realpath(os.path.join(bisheng_path, "..", "..", "tikcpp"))
|
|
136
|
-
else:
|
|
137
|
-
tikcpp_path = os.path.realpath("/usr/local/Ascend/latest/compiler/tikcpp")
|
|
138
|
-
options.append("-I" + tikcpp_path)
|
|
139
|
-
options.append("-I" + os.path.join(tikcpp_path, "tikcfw"))
|
|
140
|
-
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "impl"))
|
|
141
|
-
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "interface"))
|
|
142
|
-
options.append("-I" + os.path.join(PYF_PATH, "..", "ascendc", "common"))
|
|
143
|
-
if impl_mode == "high_performance":
|
|
144
|
-
options.append("-DHIGH_PERFORMANCE=1")
|
|
145
|
-
elif impl_mode == "high_precision":
|
|
146
|
-
options.append("-DHIGH_PRECISION=1")
|
|
147
|
-
if get_default_build_config("enable_deterministic_mode") == 1:
|
|
148
|
-
options.append("-DDETEMINISTIC_MODE=1")
|
|
149
|
-
|
|
150
|
-
custom_compile_options = {},
|
|
151
|
-
custom_all_compile_options = {},
|
|
152
|
-
soc_version = get_soc_spec("SOC_VERSION")
|
|
153
|
-
soc_short = get_soc_spec("SHORT_SOC_VERSION").lower()
|
|
154
|
-
custom_compile_options_soc = get_shortsoc_compile_option(custom_compile_options[0], soc_short)
|
|
155
|
-
custom_all_compile_options_soc = get_shortsoc_compile_option(custom_all_compile_options[0], soc_short)
|
|
156
|
-
options += custom_all_compile_options_soc
|
|
157
|
-
options += custom_compile_options_soc
|
|
158
|
-
|
|
159
|
-
origin_func_name = "all_finite"
|
|
160
|
-
ascendc_src_dir_ex = "all_finite"
|
|
161
|
-
ascendc_src_dir = "all_finite"
|
|
162
|
-
ascendc_src_file = "all_finite.cpp"
|
|
163
|
-
src = get_kernel_source(ascendc_src_file, ascendc_src_dir, ascendc_src_dir_ex)
|
|
164
|
-
|
|
165
|
-
print("start compile Ascend C operator AllFinite. kernel name is " + kernel_name)
|
|
166
|
-
op_type = "AllFinite"
|
|
167
|
-
code_channel = get_code_channel(src, kernel_name, op_type, options)
|
|
168
|
-
op_info = OpInfo(kernel_name = kernel_name, op_type = op_type, inputs = __inputs__, outputs = __outputs__,\
|
|
169
|
-
attrs = __attrs__, impl_mode = impl_mode, origin_inputs=[gradient_in__], origin_outputs = [is_finite_out_])
|
|
170
|
-
compile_op(src, origin_func_name, op_info, options, code_channel, '{}')
|
|
171
|
-
|
|
172
|
-
def op_select_format(gradient_in__, is_finite_out_, impl_mode=""):
|
|
173
|
-
__inputs__, __outputs__, __attrs__ = _build_args(gradient_in__, is_finite_out_)
|
|
174
|
-
result = check_op_cap("op_select_format", "AllFinite", __inputs__, __outputs__, __attrs__)
|
|
175
|
-
return result.decode("utf-8")
|
|
176
|
-
|
|
177
|
-
def get_op_specific_info(gradient_in__, is_finite_out_, impl_mode=""):
|
|
178
|
-
__inputs__, __outputs__, __attrs__ = _build_args(gradient_in__, is_finite_out_)
|
|
179
|
-
result = check_op_cap("get_op_specific_info", "AllFinite", __inputs__, __outputs__, __attrs__)
|
|
180
|
-
return result.decode("utf-8")
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"binFileName": "AllFinite_576ceaeef5870c451cab59af55ea46ad",
|
|
3
|
-
"binFileSuffix": ".o",
|
|
4
|
-
"blockDim": -1,
|
|
5
|
-
"coreType": "VectorCore",
|
|
6
|
-
"core_type": "AIV",
|
|
7
|
-
"intercoreSync": 0,
|
|
8
|
-
"kernelName": "AllFinite_576ceaeef5870c451cab59af55ea46ad",
|
|
9
|
-
"magic": "RT_DEV_BINARY_MAGIC_ELF_AIVEC",
|
|
10
|
-
"memoryStamping": [],
|
|
11
|
-
"opParaSize": 0,
|
|
12
|
-
"parameters": [],
|
|
13
|
-
"sha256": "389c6a28068324d5c74fbd82db62ca54de2e3f3ca20c0d435f896ca05cca6943",
|
|
14
|
-
"kernelList": [
|
|
15
|
-
{
|
|
16
|
-
"kernelName": "AllFinite_576ceaeef5870c451cab59af55ea46ad_0"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"optionalInputMode": "gen_placeholder",
|
|
20
|
-
"compileInfo": {},
|
|
21
|
-
"supportInfo": {
|
|
22
|
-
"implMode": "",
|
|
23
|
-
"int64Mode": false,
|
|
24
|
-
"simplifiedKeyMode": 0,
|
|
25
|
-
"simplifiedKey": [
|
|
26
|
-
"AllFinite/d=0,p=0/0,2/12,2",
|
|
27
|
-
"AllFinite/d=1,p=0/0,2/12,2"
|
|
28
|
-
],
|
|
29
|
-
"staticKey": "d0f82552295948866b5bab1c0ef5a9cd9662ee964af71eeea40b0c8d27c08835",
|
|
30
|
-
"inputs": [
|
|
31
|
-
{
|
|
32
|
-
"name": "gradient",
|
|
33
|
-
"index": 0,
|
|
34
|
-
"dtype": "float32",
|
|
35
|
-
"format": "ND",
|
|
36
|
-
"paramType": "required",
|
|
37
|
-
"shape": [
|
|
38
|
-
-2
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"outputs": [
|
|
43
|
-
{
|
|
44
|
-
"name": "is_finite",
|
|
45
|
-
"index": 0,
|
|
46
|
-
"dtype": "bool",
|
|
47
|
-
"format": "ND",
|
|
48
|
-
"paramType": "required",
|
|
49
|
-
"shape": [
|
|
50
|
-
-2
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"opMode": "dynamic",
|
|
55
|
-
"optionalInputMode": "gen_placeholder",
|
|
56
|
-
"deterministic": "ignore"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
Binary file
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"binFileName": "AllFinite_86a73ff6e28d734c96bb8d3054f7dd18",
|
|
3
|
-
"binFileSuffix": ".o",
|
|
4
|
-
"blockDim": -1,
|
|
5
|
-
"coreType": "VectorCore",
|
|
6
|
-
"core_type": "AIV",
|
|
7
|
-
"intercoreSync": 0,
|
|
8
|
-
"kernelName": "AllFinite_86a73ff6e28d734c96bb8d3054f7dd18",
|
|
9
|
-
"magic": "RT_DEV_BINARY_MAGIC_ELF_AIVEC",
|
|
10
|
-
"memoryStamping": [],
|
|
11
|
-
"opParaSize": 0,
|
|
12
|
-
"parameters": [],
|
|
13
|
-
"sha256": "8d58ffc398912f8d7601b55b24527b576140c40bbac1c194fb300b0e314d8617",
|
|
14
|
-
"kernelList": [
|
|
15
|
-
{
|
|
16
|
-
"kernelName": "AllFinite_86a73ff6e28d734c96bb8d3054f7dd18_0"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"optionalInputMode": "gen_placeholder",
|
|
20
|
-
"compileInfo": {},
|
|
21
|
-
"supportInfo": {
|
|
22
|
-
"implMode": "",
|
|
23
|
-
"int64Mode": false,
|
|
24
|
-
"simplifiedKeyMode": 0,
|
|
25
|
-
"simplifiedKey": [
|
|
26
|
-
"AllFinite/d=0,p=0/27,2/12,2",
|
|
27
|
-
"AllFinite/d=1,p=0/27,2/12,2"
|
|
28
|
-
],
|
|
29
|
-
"staticKey": "7f66e3c6666676ff1823556ab378ab14ced057187dd81817f072c958578fcd6a",
|
|
30
|
-
"inputs": [
|
|
31
|
-
{
|
|
32
|
-
"name": "gradient",
|
|
33
|
-
"index": 0,
|
|
34
|
-
"dtype": "bfloat16",
|
|
35
|
-
"format": "ND",
|
|
36
|
-
"paramType": "required",
|
|
37
|
-
"shape": [
|
|
38
|
-
-2
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"outputs": [
|
|
43
|
-
{
|
|
44
|
-
"name": "is_finite",
|
|
45
|
-
"index": 0,
|
|
46
|
-
"dtype": "bool",
|
|
47
|
-
"format": "ND",
|
|
48
|
-
"paramType": "required",
|
|
49
|
-
"shape": [
|
|
50
|
-
-2
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"opMode": "dynamic",
|
|
55
|
-
"optionalInputMode": "gen_placeholder",
|
|
56
|
-
"deterministic": "ignore"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
Binary file
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"binFileName": "AllFinite_f55e0ebaad1f2f572e43677336992fa0",
|
|
3
|
-
"binFileSuffix": ".o",
|
|
4
|
-
"blockDim": -1,
|
|
5
|
-
"coreType": "VectorCore",
|
|
6
|
-
"core_type": "AIV",
|
|
7
|
-
"intercoreSync": 0,
|
|
8
|
-
"kernelName": "AllFinite_f55e0ebaad1f2f572e43677336992fa0",
|
|
9
|
-
"magic": "RT_DEV_BINARY_MAGIC_ELF_AIVEC",
|
|
10
|
-
"memoryStamping": [],
|
|
11
|
-
"opParaSize": 0,
|
|
12
|
-
"parameters": [],
|
|
13
|
-
"sha256": "53d0f52178ef17f2d971d6518d14ef464129bd920fb95cfd9495ca4c9247e48e",
|
|
14
|
-
"kernelList": [
|
|
15
|
-
{
|
|
16
|
-
"kernelName": "AllFinite_f55e0ebaad1f2f572e43677336992fa0_0"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"optionalInputMode": "gen_placeholder",
|
|
20
|
-
"compileInfo": {},
|
|
21
|
-
"supportInfo": {
|
|
22
|
-
"implMode": "",
|
|
23
|
-
"int64Mode": false,
|
|
24
|
-
"simplifiedKeyMode": 0,
|
|
25
|
-
"simplifiedKey": [
|
|
26
|
-
"AllFinite/d=0,p=0/1,2/12,2",
|
|
27
|
-
"AllFinite/d=1,p=0/1,2/12,2"
|
|
28
|
-
],
|
|
29
|
-
"staticKey": "aaee380ee48b9c261d816baac1f6fc0b820ce3b2255e1eff19382df469b7e6de",
|
|
30
|
-
"inputs": [
|
|
31
|
-
{
|
|
32
|
-
"name": "gradient",
|
|
33
|
-
"index": 0,
|
|
34
|
-
"dtype": "float16",
|
|
35
|
-
"format": "ND",
|
|
36
|
-
"paramType": "required",
|
|
37
|
-
"shape": [
|
|
38
|
-
-2
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"outputs": [
|
|
43
|
-
{
|
|
44
|
-
"name": "is_finite",
|
|
45
|
-
"index": 0,
|
|
46
|
-
"dtype": "bool",
|
|
47
|
-
"format": "ND",
|
|
48
|
-
"paramType": "required",
|
|
49
|
-
"shape": [
|
|
50
|
-
-2
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"opMode": "dynamic",
|
|
55
|
-
"optionalInputMode": "gen_placeholder",
|
|
56
|
-
"deterministic": "ignore"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
Binary file
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"binList": [
|
|
3
|
-
{
|
|
4
|
-
"simplifiedKey": [
|
|
5
|
-
"AllFinite/d=0,p=0/1,2/12,2",
|
|
6
|
-
"AllFinite/d=1,p=0/1,2/12,2"
|
|
7
|
-
],
|
|
8
|
-
"staticKey": "aaee380ee48b9c261d816baac1f6fc0b820ce3b2255e1eff19382df469b7e6de",
|
|
9
|
-
"int64Mode": false,
|
|
10
|
-
"inputs": [
|
|
11
|
-
{
|
|
12
|
-
"name": "gradient",
|
|
13
|
-
"index": 0,
|
|
14
|
-
"dtype": "float16",
|
|
15
|
-
"format": "ND",
|
|
16
|
-
"paramType": "required",
|
|
17
|
-
"shape": [
|
|
18
|
-
-2
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"outputs": [
|
|
23
|
-
{
|
|
24
|
-
"name": "is_finite",
|
|
25
|
-
"index": 0,
|
|
26
|
-
"dtype": "bool",
|
|
27
|
-
"format": "ND",
|
|
28
|
-
"paramType": "required",
|
|
29
|
-
"shape": [
|
|
30
|
-
-2
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"binInfo": {
|
|
35
|
-
"jsonFilePath": "ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.json"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"simplifiedKey": [
|
|
40
|
-
"AllFinite/d=0,p=0/27,2/12,2",
|
|
41
|
-
"AllFinite/d=1,p=0/27,2/12,2"
|
|
42
|
-
],
|
|
43
|
-
"staticKey": "7f66e3c6666676ff1823556ab378ab14ced057187dd81817f072c958578fcd6a",
|
|
44
|
-
"int64Mode": false,
|
|
45
|
-
"inputs": [
|
|
46
|
-
{
|
|
47
|
-
"name": "gradient",
|
|
48
|
-
"index": 0,
|
|
49
|
-
"dtype": "bfloat16",
|
|
50
|
-
"format": "ND",
|
|
51
|
-
"paramType": "required",
|
|
52
|
-
"shape": [
|
|
53
|
-
-2
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"outputs": [
|
|
58
|
-
{
|
|
59
|
-
"name": "is_finite",
|
|
60
|
-
"index": 0,
|
|
61
|
-
"dtype": "bool",
|
|
62
|
-
"format": "ND",
|
|
63
|
-
"paramType": "required",
|
|
64
|
-
"shape": [
|
|
65
|
-
-2
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"binInfo": {
|
|
70
|
-
"jsonFilePath": "ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.json"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"simplifiedKey": [
|
|
75
|
-
"AllFinite/d=0,p=0/0,2/12,2",
|
|
76
|
-
"AllFinite/d=1,p=0/0,2/12,2"
|
|
77
|
-
],
|
|
78
|
-
"staticKey": "d0f82552295948866b5bab1c0ef5a9cd9662ee964af71eeea40b0c8d27c08835",
|
|
79
|
-
"int64Mode": false,
|
|
80
|
-
"inputs": [
|
|
81
|
-
{
|
|
82
|
-
"name": "gradient",
|
|
83
|
-
"index": 0,
|
|
84
|
-
"dtype": "float32",
|
|
85
|
-
"format": "ND",
|
|
86
|
-
"paramType": "required",
|
|
87
|
-
"shape": [
|
|
88
|
-
-2
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"outputs": [
|
|
93
|
-
{
|
|
94
|
-
"name": "is_finite",
|
|
95
|
-
"index": 0,
|
|
96
|
-
"dtype": "bool",
|
|
97
|
-
"format": "ND",
|
|
98
|
-
"paramType": "required",
|
|
99
|
-
"shape": [
|
|
100
|
-
-2
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"binInfo": {
|
|
105
|
-
"jsonFilePath": "ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.json"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AllFinite": {
|
|
3
|
-
"dynamicRankSupport": true,
|
|
4
|
-
"simplifiedKeyMode": 0,
|
|
5
|
-
"binaryList": [
|
|
6
|
-
{
|
|
7
|
-
"coreType": 2,
|
|
8
|
-
"simplifiedKey": "AllFinite/d=0,p=0/1,2/12,2",
|
|
9
|
-
"binPath": "ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.o"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"coreType": 2,
|
|
13
|
-
"simplifiedKey": "AllFinite/d=1,p=0/1,2/12,2",
|
|
14
|
-
"binPath": "ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.o"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"coreType": 2,
|
|
18
|
-
"simplifiedKey": "AllFinite/d=0,p=0/27,2/12,2",
|
|
19
|
-
"binPath": "ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.o"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"coreType": 2,
|
|
23
|
-
"simplifiedKey": "AllFinite/d=1,p=0/27,2/12,2",
|
|
24
|
-
"binPath": "ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.o"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"coreType": 2,
|
|
28
|
-
"simplifiedKey": "AllFinite/d=0,p=0/0,2/12,2",
|
|
29
|
-
"binPath": "ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.o"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"coreType": 2,
|
|
33
|
-
"simplifiedKey": "AllFinite/d=1,p=0/0,2/12,2",
|
|
34
|
-
"binPath": "ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.o"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
}
|