mindspore 2.4.0__cp310-cp310-manylinux1_x86_64.whl → 2.4.10__cp310-cp310-manylinux1_x86_64.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/_c_dataengine.cpython-310-x86_64-linux-gnu.so +0 -0
- mindspore/_c_expression.cpython-310-x86_64-linux-gnu.so +0 -0
- mindspore/_c_mindrecord.cpython-310-x86_64-linux-gnu.so +0 -0
- mindspore/bin/cache_server +0 -0
- mindspore/common/api.py +1 -4
- mindspore/common/file_system.py +2 -0
- mindspore/common/initializer.py +51 -15
- mindspore/common/parameter.py +6 -5
- mindspore/common/tensor.py +15 -49
- mindspore/communication/_comm_helper.py +5 -0
- mindspore/communication/comm_func.py +7 -7
- mindspore/context.py +16 -2
- mindspore/dataset/engine/datasets_standard_format.py +17 -0
- mindspore/dataset/engine/datasets_user_defined.py +27 -1
- mindspore/experimental/llm_boost/__init__.py +2 -2
- mindspore/experimental/llm_boost/atb/boost_base.py +240 -64
- mindspore/experimental/llm_boost/atb/llama_boost.py +46 -29
- mindspore/experimental/llm_boost/atb/qwen_boost.py +47 -24
- mindspore/include/api/context.h +1 -1
- mindspore/include/dataset/constants.h +2 -2
- mindspore/include/mindapi/base/format.h +13 -0
- 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/libdnnl.so.2 +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_gpr.so.15 +0 -0
- mindspore/lib/libmindspore_grpc++.so.1 +0 -0
- mindspore/lib/libmindspore_grpc.so.15 +0 -0
- mindspore/lib/libmindspore_ops.so +0 -0
- mindspore/lib/libopencv_core.so.4.5 +0 -0
- mindspore/lib/libopencv_imgcodecs.so.4.5 +0 -0
- mindspore/lib/libopencv_imgproc.so.4.5 +0 -0
- mindspore/lib/libswresample.so.4 +0 -0
- mindspore/lib/libswscale.so.6 +0 -0
- mindspore/lib/plugin/ascend/custom_aicore_ops/op_proto/libop_proto.so +0 -0
- 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_proto/libcust_op_proto.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/framework/npu_supported_ops.json +10 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_api/lib/libcust_opapi.so +0 -0
- mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_impl/ai_core/tbe/config/ascend910/aic-ascend910-ops-info.json +0 -42
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl}/dynamic/decoder_kv_cache.py +51 -16
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl}/dynamic/prompt_kv_cache.py +51 -16
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/binary_info_config.json +302 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/decoder_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/prompt_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/op_tiling/lib/linux/x86_64/libcust_opmaster_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_proto/inc/op_proto.h +33 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910/version.info +1 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/framework/npu_supported_ops.json +14 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/include/aclnn_decoder_kv_cache.h +59 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/include/aclnn_prompt_kv_cache.h +59 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/lib/libcust_opapi.so +0 -0
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl}/dynamic/all_finite.py +51 -16
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/decoder_kv_cache.cpp +192 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/decoder_kv_cache.py +215 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/prompt_kv_cache.cpp +274 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/prompt_kv_cache.py +215 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.json +80 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.json +80 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.json +80 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +158 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +167 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.json +78 -0
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.o → custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.o} +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.json +78 -0
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.o → custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.o} +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.json +78 -0
- mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.o → custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.o} +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +156 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +165 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/all_finite.json +139 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/binary_info_config.json +361 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/decoder_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/prompt_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/all_finite.json +139 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/binary_info_config.json +361 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/decoder_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/prompt_kv_cache.json +892 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/op_tiling/lib/linux/x86_64/libcust_opmaster_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_910b/version.info +1 -0
- mindspore/lib/plugin/ascend/custom_compiler/setup.py +1 -1
- mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
- mindspore/lib/plugin/ascend/libhccl_plugin.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_internal_kernels.so +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/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/include/asdops/utils/rt/base/types.h +5 -5
- 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/asdops/lib/liblcal.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/liblcal_static.a +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme_op.h +1 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/flash_attention_score_op.h +6 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/paged_attention_op.h +6 -1
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/rms_norm_op.h +4 -3
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_quant_acme_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_310p_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/op_kernels/ascend910b/flash_attention_score/flash_attention_score_bf16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/flash_attention_score/flash_attention_score_bf16_bnsd_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/flash_attention_score/flash_attention_score_bf16_bsh_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/flash_attention_score/flash_attention_score_fp16_bnsd_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/flash_attention_score/flash_attention_score_fp16_bnsd_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/flash_attention_score/flash_attention_score_fp16_bsh_full_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bnsd_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bsh_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bnsd_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bsh_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/lccl/lib/liblcal.so +0 -0
- mindspore/lib/plugin/gpu/libcuda_ops.so.10 +0 -0
- mindspore/lib/plugin/gpu/libcuda_ops.so.11 +0 -0
- mindspore/lib/plugin/gpu10.1/libnccl.so.2 +0 -0
- mindspore/lib/plugin/gpu11.1/libnccl.so.2 +0 -0
- mindspore/lib/plugin/gpu11.6/libnccl.so.2 +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.10.1 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.11.1 +0 -0
- mindspore/lib/plugin/libmindspore_gpu.so.11.6 +0 -0
- mindspore/mint/__init__.py +490 -2
- mindspore/mint/nn/__init__.py +2 -2
- mindspore/mint/optim/adamw.py +6 -14
- mindspore/nn/__init__.py +2 -0
- mindspore/nn/cell.py +16 -4
- mindspore/nn/layer/basic.py +24 -7
- mindspore/nn/layer/conv.py +3 -0
- mindspore/nn/layer/embedding.py +31 -14
- mindspore/nn/layer/pooling.py +8 -10
- mindspore/nn/optim/tft_wrapper.py +12 -15
- mindspore/nn/utils/__init__.py +22 -0
- mindspore/nn/utils/init.py +71 -0
- mindspore/ops/_grad_experimental/grad_array_ops.py +0 -11
- mindspore/ops/_grad_experimental/grad_comm_ops.py +45 -8
- mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +6 -0
- mindspore/ops/auto_generate/gen_extend_func.py +33 -0
- mindspore/ops/auto_generate/gen_ops_def.py +52 -3
- mindspore/ops/auto_generate/gen_ops_prim.py +158 -8
- mindspore/ops/function/array_func.py +2 -0
- mindspore/ops/function/math_func.py +12 -5
- mindspore/ops/function/random_func.py +221 -7
- mindspore/ops/operations/__init__.py +1 -1
- mindspore/ops/operations/array_ops.py +3 -1
- mindspore/ops/operations/comm_ops.py +25 -1
- mindspore/ops/operations/custom_ops.py +6 -4
- mindspore/ops/operations/manually_defined/ops_def.py +8 -10
- mindspore/ops/operations/nn_ops.py +7 -2
- mindspore/parallel/_auto_parallel_context.py +26 -5
- mindspore/parallel/_cell_wrapper.py +24 -3
- mindspore/parallel/_tensor.py +46 -2
- mindspore/parallel/_utils.py +39 -21
- mindspore/parallel/transform_safetensors.py +196 -43
- mindspore/profiler/profiling.py +5 -1
- mindspore/run_check/_check_version.py +20 -9
- mindspore/train/_utils.py +92 -32
- mindspore/train/callback/_checkpoint.py +12 -9
- mindspore/train/callback/_on_request_exit.py +12 -1
- mindspore/train/callback/_tft_register.py +33 -9
- mindspore/train/dataset_helper.py +10 -2
- mindspore/train/model.py +21 -0
- mindspore/train/serialization.py +12 -19
- mindspore/version.py +1 -1
- {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/METADATA +9 -7
- {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/RECORD +282 -155
- 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/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_86a73ff6e28d734c96bb8d3054f7dd18.json +0 -58
- 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/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_ascendc_ops/op_impl/ai_core/tbe/op_tiling/lib/linux/x86_64/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/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
- mindspore/lib/plugin/ascend/custom_ascendc_ops/version.info +0 -1
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_api/include/aclnn_decoder_kv_cache.h +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_api/include/aclnn_prompt_kv_cache.h +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl}/dynamic/decoder_kv_cache.cpp +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl}/dynamic/prompt_kv_cache.cpp +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_api/include/aclnn_all_finite.h +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_impl/ai_core/tbe/config/ascend310p/aic-ascend310p-ops-info.json +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_impl/ai_core/tbe/config/ascend910b/aic-ascend910b-ops-info.json +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops/op_impl/ai_core/tbe/custom_ascendc_ops_impl → custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl}/dynamic/all_finite.cpp +0 -0
- /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_proto/inc/op_proto.h +0 -0
- {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/WHEEL +0 -0
- {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/entry_points.txt +0 -0
- {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/top_level.txt +0 -0
|
@@ -1655,6 +1655,54 @@ def cosh(input):
|
|
|
1655
1655
|
return cosh_op(input)
|
|
1656
1656
|
|
|
1657
1657
|
|
|
1658
|
+
def count_nonzero(input, dim=None):
|
|
1659
|
+
r"""
|
|
1660
|
+
Counts the number of non-zero values in the tensor input along the given dim. If no dim is specified then all non-zeros in the tensor are counted.
|
|
1661
|
+
|
|
1662
|
+
.. warning::
|
|
1663
|
+
This is an experimental API that is subject to change or deletion.
|
|
1664
|
+
|
|
1665
|
+
Args:
|
|
1666
|
+
input (Tensor): Input data is used to count non-zero numbers. With shape
|
|
1667
|
+
:math:`(*)` where :math:`*` means, any number of additional dimensions.
|
|
1668
|
+
dim (Union[int, tuple(int), list(int)], optional): The dimension to reduce. Default value: ``None``, which indicates that the number of non-zero elements is calculated. If `dim` is ``None``, all elements in the tensor are summed up.
|
|
1669
|
+
|
|
1670
|
+
Returns:
|
|
1671
|
+
Tensor, number of nonzero element across dim specified by `dim`.
|
|
1672
|
+
|
|
1673
|
+
Raises:
|
|
1674
|
+
TypeError: If `input` is not tensor.
|
|
1675
|
+
TypeError: If `dim` is not int, tuple(int), list(int) or None.
|
|
1676
|
+
ValueError: If any value in `dim` is not in range [-x.ndim, x.ndim).
|
|
1677
|
+
|
|
1678
|
+
Supported Platforms:
|
|
1679
|
+
``Ascend``
|
|
1680
|
+
|
|
1681
|
+
Examples:
|
|
1682
|
+
>>> from mindspore import Tensor, ops
|
|
1683
|
+
>>> import numpy as np
|
|
1684
|
+
>>> import mindspore
|
|
1685
|
+
>>> # case 1: each value specified.
|
|
1686
|
+
>>> x = Tensor(np.array([[0, 1, 0], [1, 1, 0]]).astype(np.float32))
|
|
1687
|
+
>>> nonzero_num = ops.count_nonzero(input=x, dim=[0, 1])
|
|
1688
|
+
>>> print(nonzero_num)
|
|
1689
|
+
[[3]]
|
|
1690
|
+
>>> # case 2: all value is default.
|
|
1691
|
+
>>> nonzero_num = ops.count_nonzero(input=x)
|
|
1692
|
+
>>> print(nonzero_num)
|
|
1693
|
+
3
|
|
1694
|
+
>>> # case 3: dim value was specified 0.
|
|
1695
|
+
>>> nonzero_num = ops.count_nonzero(input=x, dim=[0,])
|
|
1696
|
+
>>> print(nonzero_num)
|
|
1697
|
+
[1 2 0]
|
|
1698
|
+
>>> # case 4: dim value was specified 1.
|
|
1699
|
+
>>> nonzero_num = ops.count_nonzero(input=x, dim=[1,])
|
|
1700
|
+
>>> print(nonzero_num)
|
|
1701
|
+
[1 2]
|
|
1702
|
+
"""
|
|
1703
|
+
return count_nonzero_op(input, dim)
|
|
1704
|
+
|
|
1705
|
+
|
|
1658
1706
|
def cummax(input, axis):
|
|
1659
1707
|
r"""
|
|
1660
1708
|
Returns a tuple (values,indices) where 'values' is the cumulative maximum value of input Tensor `input`
|
|
@@ -1860,7 +1908,8 @@ def dense(input, weight, bias=None):
|
|
|
1860
1908
|
output = input * weight^{T} + bias
|
|
1861
1909
|
|
|
1862
1910
|
.. warning::
|
|
1863
|
-
This is an experimental API that is subject to change or deletion.
|
|
1911
|
+
- This is an experimental API that is subject to change or deletion.
|
|
1912
|
+
- In PYNATIVE mode, if `bias` is not 1D, the `input` cannot be greater than 6D.
|
|
1864
1913
|
|
|
1865
1914
|
Args:
|
|
1866
1915
|
input (Tensor): Input Tensor of shape :math:`(*, in\_channels)`,
|
|
@@ -1877,6 +1926,7 @@ def dense(input, weight, bias=None):
|
|
|
1877
1926
|
TypeError: If `input` is not Tensor.
|
|
1878
1927
|
TypeError: If `weight` is not Tensor.
|
|
1879
1928
|
TypeError: If `bias` is not Tensor.
|
|
1929
|
+
RuntimeError: If `bias` is not 1D and `input` is greater than 6D in PYNATIVE mode.
|
|
1880
1930
|
|
|
1881
1931
|
Supported Platforms:
|
|
1882
1932
|
``Ascend`` ``GPU`` ``CPU``
|
|
@@ -6404,7 +6454,7 @@ def rotary_position_embedding(x, cos, sin, mode=0):
|
|
|
6404
6454
|
|
|
6405
6455
|
Args:
|
|
6406
6456
|
x (Tensor): 4D tensor, with float16, bfloat16 or float32 data type.
|
|
6407
|
-
cos (Tensor): 4D
|
|
6457
|
+
cos (Tensor): 4D constant, has the same type as `x` , in range of [-1, 1].
|
|
6408
6458
|
sin (Tensor): Same with `cos` .
|
|
6409
6459
|
mode (int): An optional attribute. Used to select a calculation mode. 0: rotate_half(GPT-NeoX style); 1: rotate_interleaved(GPT-J style). Defaults to ``0`` .
|
|
6410
6460
|
|
|
@@ -6420,7 +6470,6 @@ def rotary_position_embedding(x, cos, sin, mode=0):
|
|
|
6420
6470
|
|
|
6421
6471
|
11SD, B1SD, BNSD; D < 896 and D is an Even. B, N < 1000;
|
|
6422
6472
|
|
|
6423
|
-
B * N <= 1024 if gradient calculation of cos/sin is used.
|
|
6424
6473
|
- Supported layout: 11SD, B1SD, BNSD;
|
|
6425
6474
|
|
|
6426
6475
|
D < 896 and D is an Even.
|
|
@@ -81,6 +81,7 @@ from mindspore._c_expression import pyboost_copy_ext
|
|
|
81
81
|
from mindspore._c_expression import pyboost_copy
|
|
82
82
|
from mindspore._c_expression import pyboost_cos
|
|
83
83
|
from mindspore._c_expression import pyboost_cosh
|
|
84
|
+
from mindspore._c_expression import pyboost_count_nonzero
|
|
84
85
|
from mindspore._c_expression import pyboost_cross
|
|
85
86
|
from mindspore._c_expression import pyboost_cummax
|
|
86
87
|
from mindspore._c_expression import pyboost_cummin_ext
|
|
@@ -116,7 +117,6 @@ from mindspore._c_expression import pyboost_gather_d_grad_v2
|
|
|
116
117
|
from mindspore._c_expression import pyboost_gather_d
|
|
117
118
|
from mindspore._c_expression import pyboost_gelu_grad
|
|
118
119
|
from mindspore._c_expression import pyboost_gelu
|
|
119
|
-
from mindspore._c_expression import pyboost_generator
|
|
120
120
|
from mindspore._c_expression import pyboost_greater_equal
|
|
121
121
|
from mindspore._c_expression import pyboost_greater
|
|
122
122
|
from mindspore._c_expression import pyboost_grid_sampler_2d_grad
|
|
@@ -195,6 +195,7 @@ from mindspore._c_expression import pyboost_muls
|
|
|
195
195
|
from mindspore._c_expression import pyboost_multinomial_ext
|
|
196
196
|
from mindspore._c_expression import pyboost_mv
|
|
197
197
|
from mindspore._c_expression import pyboost_nan_to_num
|
|
198
|
+
from mindspore._c_expression import pyboost_ne_scalar
|
|
198
199
|
from mindspore._c_expression import pyboost_neg
|
|
199
200
|
from mindspore._c_expression import pyboost_non_zero_ext
|
|
200
201
|
from mindspore._c_expression import pyboost_non_zero
|
|
@@ -214,6 +215,11 @@ from mindspore._c_expression import pyboost_prelu
|
|
|
214
215
|
from mindspore._c_expression import pyboost_prod_ext
|
|
215
216
|
from mindspore._c_expression import pyboost_rand_ext
|
|
216
217
|
from mindspore._c_expression import pyboost_rand_like_ext
|
|
218
|
+
from mindspore._c_expression import pyboost_randint_like
|
|
219
|
+
from mindspore._c_expression import pyboost_randint
|
|
220
|
+
from mindspore._c_expression import pyboost_randn_like
|
|
221
|
+
from mindspore._c_expression import pyboost_randn
|
|
222
|
+
from mindspore._c_expression import pyboost_randperm_ext
|
|
217
223
|
from mindspore._c_expression import pyboost_reciprocal
|
|
218
224
|
from mindspore._c_expression import pyboost_reduce_all
|
|
219
225
|
from mindspore._c_expression import pyboost_reduce_any
|
|
@@ -250,6 +256,7 @@ from mindspore._c_expression import pyboost_scatter_add_ext
|
|
|
250
256
|
from mindspore._c_expression import pyboost_scatter
|
|
251
257
|
from mindspore._c_expression import pyboost_scatter_value
|
|
252
258
|
from mindspore._c_expression import pyboost_searchsorted
|
|
259
|
+
from mindspore._c_expression import pyboost_select_ext
|
|
253
260
|
from mindspore._c_expression import pyboost_select
|
|
254
261
|
from mindspore._c_expression import pyboost_select_v2
|
|
255
262
|
from mindspore._c_expression import pyboost_selu_ext
|
|
@@ -317,6 +324,7 @@ from mindspore._c_expression import pyboost_zeros
|
|
|
317
324
|
from mindspore._c_expression import pyboost_add_rmsnorm_quant_v2
|
|
318
325
|
from mindspore._c_expression import pyboost_dynamic_quant_ext
|
|
319
326
|
from mindspore._c_expression import pyboost_grouped_matmul
|
|
327
|
+
from mindspore._c_expression import pyboost_kv_cache_scatter_update
|
|
320
328
|
from mindspore._c_expression import pyboost_moe_finalize_routing
|
|
321
329
|
from mindspore._c_expression import pyboost_quant_batch_matmul
|
|
322
330
|
from mindspore._c_expression import pyboost_quant_v2
|
|
@@ -2379,7 +2387,8 @@ class BatchMatMul(Primitive):
|
|
|
2379
2387
|
|
|
2380
2388
|
\text{output}[..., :, :] = \text{matrix}(x[..., :, :]) * \text{matrix}(y[..., :, :])
|
|
2381
2389
|
|
|
2382
|
-
The rank of
|
|
2390
|
+
The rank of the two input tensors must be at least `2`, and the two input tensors must have the same rank
|
|
2391
|
+
if the environment is GPU or CPU.
|
|
2383
2392
|
|
|
2384
2393
|
Args:
|
|
2385
2394
|
transpose_a (bool): If ``True`` , the last two dimensions of `x` is transposed before multiplication.
|
|
@@ -3770,6 +3779,36 @@ class Cosh(Primitive):
|
|
|
3770
3779
|
cosh_op=Cosh()
|
|
3771
3780
|
|
|
3772
3781
|
|
|
3782
|
+
class CountNonZero(Primitive):
|
|
3783
|
+
r"""
|
|
3784
|
+
.. code-block::
|
|
3785
|
+
|
|
3786
|
+
prim = ops.CountNonZero()
|
|
3787
|
+
out = prim(input, dim)
|
|
3788
|
+
|
|
3789
|
+
is equivalent to
|
|
3790
|
+
|
|
3791
|
+
.. code-block::
|
|
3792
|
+
|
|
3793
|
+
ops.count_nonzero(input, dim)
|
|
3794
|
+
|
|
3795
|
+
Refer to :func:`mindspore.ops.count_nonzero` for more details.
|
|
3796
|
+
"""
|
|
3797
|
+
__mindspore_signature__ = (
|
|
3798
|
+
sig.make_sig('input'),
|
|
3799
|
+
sig.make_sig('dim', default=None),
|
|
3800
|
+
)
|
|
3801
|
+
|
|
3802
|
+
@prim_arg_register
|
|
3803
|
+
def __init__(self):
|
|
3804
|
+
pass
|
|
3805
|
+
|
|
3806
|
+
def __call__(self, input, dim=None):
|
|
3807
|
+
return _convert_stub(pyboost_count_nonzero(self, [input, dim]))
|
|
3808
|
+
|
|
3809
|
+
count_nonzero_op=CountNonZero()
|
|
3810
|
+
|
|
3811
|
+
|
|
3773
3812
|
class Cross(Primitive):
|
|
3774
3813
|
r"""
|
|
3775
3814
|
Returns the cross product of vectors in dimension `dim` of input and other.
|
|
@@ -6490,7 +6529,8 @@ class Generator(Primitive):
|
|
|
6490
6529
|
self.add_prim_attr("side_effect_mem", True)
|
|
6491
6530
|
|
|
6492
6531
|
def __call__(self, cmd, inputs):
|
|
6493
|
-
return
|
|
6532
|
+
return super().__call__(cmd, inputs)
|
|
6533
|
+
|
|
6494
6534
|
|
|
6495
6535
|
generator_op=Generator()
|
|
6496
6536
|
|
|
@@ -8678,6 +8718,9 @@ class LinSpaceExt(Primitive):
|
|
|
8678
8718
|
&output = [start, start+step, start+2*step, ... , end]
|
|
8679
8719
|
\end{aligned}
|
|
8680
8720
|
|
|
8721
|
+
.. warning::
|
|
8722
|
+
Atlas training series does not support int16 dtype currently.
|
|
8723
|
+
|
|
8681
8724
|
Inputs:
|
|
8682
8725
|
- **start** (Union[float, int]) - Start value of interval.
|
|
8683
8726
|
It can be a float or integer.
|
|
@@ -9446,7 +9489,7 @@ class MatMul(Primitive):
|
|
|
9446
9489
|
|
|
9447
9490
|
.. math::
|
|
9448
9491
|
|
|
9449
|
-
|
|
9492
|
+
(Output)_{i j}=\sum_{k=1}^{p} a_{i k} b_{k j}=a_{i 1} b_{1 j}+a_{i 2} b_{2 j}+\cdots+a_{i p} b_{p j}, p\in N
|
|
9450
9493
|
|
|
9451
9494
|
where the :math:`i,j` indicates the output of the i-th row and j-th column element.
|
|
9452
9495
|
|
|
@@ -11245,6 +11288,115 @@ class RandLikeExt(Primitive):
|
|
|
11245
11288
|
rand_like_ext_op=RandLikeExt()
|
|
11246
11289
|
|
|
11247
11290
|
|
|
11291
|
+
class RandIntLike(Primitive):
|
|
11292
|
+
r"""
|
|
11293
|
+
|
|
11294
|
+
"""
|
|
11295
|
+
__mindspore_signature__ = (
|
|
11296
|
+
sig.make_sig('input'),
|
|
11297
|
+
sig.make_sig('low'),
|
|
11298
|
+
sig.make_sig('high'),
|
|
11299
|
+
sig.make_sig('seed'),
|
|
11300
|
+
sig.make_sig('offset'),
|
|
11301
|
+
sig.make_sig('dtype', default=None),
|
|
11302
|
+
)
|
|
11303
|
+
|
|
11304
|
+
@prim_arg_register
|
|
11305
|
+
def __init__(self):
|
|
11306
|
+
pass
|
|
11307
|
+
|
|
11308
|
+
def __call__(self, input, low, high, seed, offset, dtype=None):
|
|
11309
|
+
return _convert_stub(pyboost_randint_like(self, [input, low, high, seed, offset, dtype if dtype is None else dtype_to_type_id('RandIntLike', 'dtype', dtype)]))
|
|
11310
|
+
|
|
11311
|
+
randint_like_op=RandIntLike()
|
|
11312
|
+
|
|
11313
|
+
|
|
11314
|
+
class RandInt(Primitive):
|
|
11315
|
+
r"""
|
|
11316
|
+
|
|
11317
|
+
"""
|
|
11318
|
+
__mindspore_signature__ = (
|
|
11319
|
+
sig.make_sig('low'),
|
|
11320
|
+
sig.make_sig('high'),
|
|
11321
|
+
sig.make_sig('shape'),
|
|
11322
|
+
sig.make_sig('seed'),
|
|
11323
|
+
sig.make_sig('offset'),
|
|
11324
|
+
sig.make_sig('dtype', default=None),
|
|
11325
|
+
)
|
|
11326
|
+
|
|
11327
|
+
@prim_arg_register
|
|
11328
|
+
def __init__(self):
|
|
11329
|
+
pass
|
|
11330
|
+
|
|
11331
|
+
def __call__(self, low, high, shape, seed, offset, dtype=None):
|
|
11332
|
+
return _convert_stub(pyboost_randint(self, [low, high, shape, seed, offset, dtype if dtype is None else dtype_to_type_id('RandInt', 'dtype', dtype)]))
|
|
11333
|
+
|
|
11334
|
+
randint_op=RandInt()
|
|
11335
|
+
|
|
11336
|
+
|
|
11337
|
+
class RandnLike(Primitive):
|
|
11338
|
+
r"""
|
|
11339
|
+
|
|
11340
|
+
"""
|
|
11341
|
+
__mindspore_signature__ = (
|
|
11342
|
+
sig.make_sig('input'),
|
|
11343
|
+
sig.make_sig('seed'),
|
|
11344
|
+
sig.make_sig('offset'),
|
|
11345
|
+
sig.make_sig('dtype', default=None),
|
|
11346
|
+
)
|
|
11347
|
+
|
|
11348
|
+
@prim_arg_register
|
|
11349
|
+
def __init__(self):
|
|
11350
|
+
pass
|
|
11351
|
+
|
|
11352
|
+
def __call__(self, input, seed, offset, dtype=None):
|
|
11353
|
+
return _convert_stub(pyboost_randn_like(self, [input, seed, offset, dtype if dtype is None else dtype_to_type_id('RandnLike', 'dtype', dtype)]))
|
|
11354
|
+
|
|
11355
|
+
randn_like_op=RandnLike()
|
|
11356
|
+
|
|
11357
|
+
|
|
11358
|
+
class Randn(Primitive):
|
|
11359
|
+
r"""
|
|
11360
|
+
|
|
11361
|
+
"""
|
|
11362
|
+
__mindspore_signature__ = (
|
|
11363
|
+
sig.make_sig('shape'),
|
|
11364
|
+
sig.make_sig('seed'),
|
|
11365
|
+
sig.make_sig('offset'),
|
|
11366
|
+
sig.make_sig('dtype', default=None),
|
|
11367
|
+
)
|
|
11368
|
+
|
|
11369
|
+
@prim_arg_register
|
|
11370
|
+
def __init__(self):
|
|
11371
|
+
pass
|
|
11372
|
+
|
|
11373
|
+
def __call__(self, shape, seed, offset, dtype=None):
|
|
11374
|
+
return _convert_stub(pyboost_randn(self, [shape, seed, offset, dtype if dtype is None else dtype_to_type_id('Randn', 'dtype', dtype)]))
|
|
11375
|
+
|
|
11376
|
+
randn_op=Randn()
|
|
11377
|
+
|
|
11378
|
+
|
|
11379
|
+
class RandpermExt(Primitive):
|
|
11380
|
+
r"""
|
|
11381
|
+
|
|
11382
|
+
"""
|
|
11383
|
+
__mindspore_signature__ = (
|
|
11384
|
+
sig.make_sig('n'),
|
|
11385
|
+
sig.make_sig('seed'),
|
|
11386
|
+
sig.make_sig('offset'),
|
|
11387
|
+
sig.make_sig('dtype', default=mstype.int64),
|
|
11388
|
+
)
|
|
11389
|
+
|
|
11390
|
+
@prim_arg_register
|
|
11391
|
+
def __init__(self):
|
|
11392
|
+
pass
|
|
11393
|
+
|
|
11394
|
+
def __call__(self, n, seed, offset, dtype=mstype.int64):
|
|
11395
|
+
return _convert_stub(pyboost_randperm_ext(self, [n, seed, offset, dtype_to_type_id('RandpermExt', 'dtype', dtype)]))
|
|
11396
|
+
|
|
11397
|
+
randperm_ext_op=RandpermExt()
|
|
11398
|
+
|
|
11399
|
+
|
|
11248
11400
|
class RandpermV2(Primitive):
|
|
11249
11401
|
r"""
|
|
11250
11402
|
.. code-block::
|
|
@@ -13631,8 +13783,7 @@ class SelectExt(Primitive):
|
|
|
13631
13783
|
pass
|
|
13632
13784
|
|
|
13633
13785
|
def __call__(self, input, dim, index):
|
|
13634
|
-
return
|
|
13635
|
-
|
|
13786
|
+
return _convert_stub(pyboost_select_ext(self, [input, dim, index]))
|
|
13636
13787
|
|
|
13637
13788
|
select_ext_op=SelectExt()
|
|
13638
13789
|
|
|
@@ -16494,8 +16645,7 @@ class KVCacheScatterUpdate(Primitive):
|
|
|
16494
16645
|
self.add_prim_attr("side_effect_mem", True)
|
|
16495
16646
|
|
|
16496
16647
|
def __call__(self, var, indices, updates, axis, reduce='none'):
|
|
16497
|
-
return
|
|
16498
|
-
|
|
16648
|
+
return _convert_stub(pyboost_kv_cache_scatter_update(self, [var, indices, updates, axis, str_to_enum('KVCacheScatterUpdate', 'reduce', reduce)]))
|
|
16499
16649
|
|
|
16500
16650
|
kv_cache_scatter_update_op=KVCacheScatterUpdate()
|
|
16501
16651
|
|
|
@@ -1312,6 +1312,8 @@ def unique_with_pad(x, pad_num):
|
|
|
1312
1312
|
|
|
1313
1313
|
.. warning::
|
|
1314
1314
|
:func:`mindspore.ops.unique_with_pad` is deprecated from version 2.4 and will be removed in a future version.
|
|
1315
|
+
Please use the :func:`mindspore.ops.unique` combined with :func:`mindspore.ops.pad` to realize
|
|
1316
|
+
the same function.
|
|
1315
1317
|
|
|
1316
1318
|
Args:
|
|
1317
1319
|
x (Tensor): The tensor need to be unique. Must be 1-D vector with types: int32, int64.
|
|
@@ -2761,6 +2761,9 @@ def linspace_ext(start, end, steps, *, dtype=None):
|
|
|
2761
2761
|
&output = [start, start+step, start+2*step, ... , end]
|
|
2762
2762
|
\end{aligned}
|
|
2763
2763
|
|
|
2764
|
+
.. warning::
|
|
2765
|
+
Atlas training series does not support int16 dtype currently.
|
|
2766
|
+
|
|
2764
2767
|
Args:
|
|
2765
2768
|
start (Union[float, int]): Start value of interval.
|
|
2766
2769
|
It can be a float or integer.
|
|
@@ -7518,7 +7521,7 @@ def norm_ext(input, p='fro', dim=None, keepdim=False, *, dtype=None):
|
|
|
7518
7521
|
This is an experimental API that is subject to change or deletion.
|
|
7519
7522
|
|
|
7520
7523
|
Args:
|
|
7521
|
-
input (Tensor): The input of
|
|
7524
|
+
input (Tensor): The input of norm with data type of bfloat16, float16 or float32.
|
|
7522
7525
|
The shape is :math:`(*)` where :math:`*` means, any number of additional dimensions.
|
|
7523
7526
|
p (Union[int, float, inf, -inf, 'fro', 'nuc'], optional): norm's mode. refer to the table above for
|
|
7524
7527
|
behavior. Default: ``fro`` .
|
|
@@ -7554,6 +7557,9 @@ def norm_ext(input, p='fro', dim=None, keepdim=False, *, dtype=None):
|
|
|
7554
7557
|
>>> print(ops.function.math_func.norm_ext(x, 2.0))
|
|
7555
7558
|
38.327538
|
|
7556
7559
|
"""
|
|
7560
|
+
if not isinstance(input, (Tensor, Tensor_)):
|
|
7561
|
+
raise TypeError(f"For `norm_ext`, the `input` must be Tensor!, but get {type(input)}.")
|
|
7562
|
+
|
|
7557
7563
|
if (dim is not None) or keepdim or (dtype is not None):
|
|
7558
7564
|
raise ValueError(f"For `norm_ext`, the value of `dim`, `keepdim` and `dtype` must be default value currently.")
|
|
7559
7565
|
|
|
@@ -9082,9 +9088,9 @@ def remainder(input, other):
|
|
|
9082
9088
|
both dtypes cannot be bool, and the shapes of them could be broadcast. When the inputs are one tensor
|
|
9083
9089
|
and one scalar, the scalar could only be a constant.
|
|
9084
9090
|
|
|
9085
|
-
..
|
|
9091
|
+
.. code:: python
|
|
9086
9092
|
|
|
9087
|
-
remainder(input, other)
|
|
9093
|
+
remainder(input, other) == input - input.div(other, rounding_mode="floor") * other
|
|
9088
9094
|
|
|
9089
9095
|
.. warning::
|
|
9090
9096
|
- When the elements of input exceed 2048, there might be accuracy problems.
|
|
@@ -9129,9 +9135,10 @@ def remainder_ext(input, other):
|
|
|
9129
9135
|
|
|
9130
9136
|
Supports broadcasting to a common shape and implicit type promotion.
|
|
9131
9137
|
|
|
9132
|
-
..
|
|
9138
|
+
.. code:: python
|
|
9139
|
+
|
|
9140
|
+
remainder(input, other) == input - input.div(other, rounding_mode="floor") * other
|
|
9133
9141
|
|
|
9134
|
-
remainder(input, other) = input - input.div(other, rounding\_mode="floor") * other
|
|
9135
9142
|
|
|
9136
9143
|
Note:
|
|
9137
9144
|
Complex inputs are not supported. At least one input need to be tensor, but not both are bool tensors.
|