mindspore 2.4.0__cp311-none-any.whl → 2.4.10__cp311-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/_c_dataengine.cpython-311-aarch64-linux-gnu.so +0 -0
- mindspore/_c_expression.cpython-311-aarch64-linux-gnu.so +0 -0
- mindspore/_c_mindrecord.cpython-311-aarch64-linux-gnu.so +0 -0
- mindspore/bin/cache_admin +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_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_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/aarch64/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/aarch64/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_ops → 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_86a73ff6e28d734c96bb8d3054f7dd18.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_f55e0ebaad1f2f572e43677336992fa0.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_576ceaeef5870c451cab59af55ea46ad.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/aarch64/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/aarch64/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_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_layer_norm_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/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/libapply_rotary_pos_emb_310p_old_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/libapply_rotary_pos_emb_old_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/libms_kernels_internal.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libmulti_weight_matmul_kernel_impl.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/libreshape_and_cache_nz_impl.so +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_nz_old_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/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_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_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/flash_attention_score/flash_attention_score_fp16_bsh_tri_mix.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_bf16.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp16.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp32.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_bf16.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp16.o +0 -0
- mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp32.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/ascend/ms_kernels_internal/lccl/lib/liblccl_wrapper.so +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.2 +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 +299 -172
- 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/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/lib/linux/aarch64/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
mindspore/include/api/context.h
CHANGED
|
@@ -236,7 +236,7 @@ std::string DeviceInfoContext::GetProviderDevice() const { return CharToString(G
|
|
|
236
236
|
void DeviceInfoContext::SetProviderDevice(const std::string &device) { SetProviderDevice(StringToChar(device)); }
|
|
237
237
|
|
|
238
238
|
/// \brief Derived from DeviceInfoContext, The configuration of the model running auto on the Host Devices, include
|
|
239
|
-
/// CPU/GPU/NPU/
|
|
239
|
+
/// CPU/GPU/NPU/Ascend. This option is only valid for MindSpore Lite.
|
|
240
240
|
class MS_API AutoDeviceInfo : public DeviceInfoContext {
|
|
241
241
|
public:
|
|
242
242
|
/// \brief Get the type of this DeviceInfoContext.
|
|
@@ -108,8 +108,8 @@ enum class DATASET_API ManualOffloadMode {
|
|
|
108
108
|
enum class DATASET_API MapTargetDevice {
|
|
109
109
|
kCpu = 0, ///< CPU Device.
|
|
110
110
|
kGpu, ///< Gpu Device.
|
|
111
|
-
kAscend310, ///<
|
|
112
|
-
kAscend910B, ///<
|
|
111
|
+
kAscend310, ///<
|
|
112
|
+
kAscend910B, ///<
|
|
113
113
|
kInvalid = 100
|
|
114
114
|
};
|
|
115
115
|
|
|
@@ -161,5 +161,18 @@ inline std::string FormatEnumToString(mindspore::Format format) {
|
|
|
161
161
|
}
|
|
162
162
|
return names[format];
|
|
163
163
|
}
|
|
164
|
+
|
|
165
|
+
inline Format FromStrToEnum(const std::string &format_str) {
|
|
166
|
+
if (format_str == "DefaultFormat") {
|
|
167
|
+
return mindspore::Format::DEFAULT_FORMAT;
|
|
168
|
+
}
|
|
169
|
+
const auto &names = GetFormatNames();
|
|
170
|
+
for (size_t i = 0; i < names.size(); ++i) {
|
|
171
|
+
if (names[i] == format_str) {
|
|
172
|
+
return static_cast<mindspore::Format>(i);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return mindspore::Format::DEFAULT_FORMAT;
|
|
176
|
+
}
|
|
164
177
|
} // namespace mindspore
|
|
165
178
|
#endif // MINDSPORE_CORE_MINDAPI_BASE_FORMAT_H_
|
mindspore/lib/libavcodec.so.59
CHANGED
|
Binary file
|
mindspore/lib/libavdevice.so.59
CHANGED
|
Binary file
|
mindspore/lib/libavfilter.so.8
CHANGED
|
Binary file
|
mindspore/lib/libavformat.so.59
CHANGED
|
Binary file
|
mindspore/lib/libavutil.so.57
CHANGED
|
Binary file
|
mindspore/lib/libdnnl.so.2
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
mindspore/lib/libswresample.so.4
CHANGED
|
Binary file
|
mindspore/lib/libswscale.so.6
CHANGED
|
Binary file
|
|
Binary file
|
mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,46 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"AllFinite":{
|
|
3
|
-
"dynamicCompileStatic":{
|
|
4
|
-
"flag":"true"
|
|
5
|
-
},
|
|
6
|
-
"dynamicFormat":{
|
|
7
|
-
"flag":"true"
|
|
8
|
-
},
|
|
9
|
-
"dynamicRankSupport":{
|
|
10
|
-
"flag":"true"
|
|
11
|
-
},
|
|
12
|
-
"dynamicShapeSupport":{
|
|
13
|
-
"flag":"true"
|
|
14
|
-
},
|
|
15
|
-
"input0":{
|
|
16
|
-
"dtype":"float16,float32,bfloat16",
|
|
17
|
-
"format":"ND,ND,ND",
|
|
18
|
-
"name":"gradient",
|
|
19
|
-
"paramType":"required",
|
|
20
|
-
"shape":"all",
|
|
21
|
-
"unknownshape_format":"ND,ND,ND"
|
|
22
|
-
},
|
|
23
|
-
"needCheckSupport":{
|
|
24
|
-
"flag":"false"
|
|
25
|
-
},
|
|
26
|
-
"opFile":{
|
|
27
|
-
"value":"all_finite"
|
|
28
|
-
},
|
|
29
|
-
"opInterface":{
|
|
30
|
-
"value":"all_finite"
|
|
31
|
-
},
|
|
32
|
-
"output0":{
|
|
33
|
-
"dtype":"bool,bool,bool",
|
|
34
|
-
"format":"ND,ND,ND",
|
|
35
|
-
"name":"is_finite",
|
|
36
|
-
"paramType":"required",
|
|
37
|
-
"shape":"all",
|
|
38
|
-
"unknownshape_format":"ND,ND,ND"
|
|
39
|
-
},
|
|
40
|
-
"precision_reduce":{
|
|
41
|
-
"flag":"true"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
2
|
"DecoderKvCache":{
|
|
45
3
|
"dynamicCompileStatic":{
|
|
46
4
|
"flag":"true"
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Copyright (c) Huawei Technologies Co., Ltd. 2023-2024. All rights reserved.
|
|
5
|
+
"""
|
|
1
6
|
|
|
2
7
|
import os, sys
|
|
3
8
|
import ctypes
|
|
@@ -6,6 +11,7 @@ import shutil
|
|
|
6
11
|
from tbe.common.platform import get_soc_spec
|
|
7
12
|
from tbe.common.utils import para_check
|
|
8
13
|
from tbe.tikcpp import compile_op, replay_op, check_op_cap, generalize_op_params, get_code_channel, OpInfo
|
|
14
|
+
from tbe.tikcpp.compile_op import CommonUtility, AscendCLogLevel
|
|
9
15
|
from tbe.common.buildcfg import get_default_build_config
|
|
10
16
|
from impl.util.platform_adapter import tbe_register
|
|
11
17
|
from tbe.common.buildcfg import get_current_build_config
|
|
@@ -28,6 +34,7 @@ DTYPE_MAP = {"float32": ["DT_FLOAT", "float"],
|
|
|
28
34
|
"dual_sub_int8": ["DT_DUAL_SUB_INT8", "unknown"],
|
|
29
35
|
"dual_sub_uint8": ["DT_DUAL_SUB_UINT8", "unknown"],
|
|
30
36
|
"string": ["DT_STRING", "unknown"],
|
|
37
|
+
"complex32": ["DT_COMPLEX32", "unknown"],
|
|
31
38
|
"complex64": ["DT_COMPLEX64", "unknown"],
|
|
32
39
|
"complex128": ["DT_COMPLEX128", "unknown"],
|
|
33
40
|
"qint8": ["DT_QINT8", "unknown"],
|
|
@@ -49,21 +56,23 @@ def add_dtype_fmt_option_single(x, x_n, is_ref: bool = False):
|
|
|
49
56
|
options.append("-DORIG_DTYPE_{n}={ot}".format(n=x_n_in_kernel, ot=DTYPE_MAP.get(x_dtype)[0]))
|
|
50
57
|
options.append("-DFORMAT_{n}=FORMAT_{f}".format(n=x_n_in_kernel, f=x_fmt))
|
|
51
58
|
return options
|
|
52
|
-
|
|
59
|
+
|
|
53
60
|
def get_dtype_fmt_options(__inputs__, __outputs__):
|
|
54
61
|
options = []
|
|
62
|
+
input_names = ['cache', 'update', 'valid_seq_len', 'batch_index', 'seq_len_axis', 'new_max_seq_len', 'cur_max_seq_len']
|
|
63
|
+
output_names = ['out']
|
|
55
64
|
unique_param_name_set = set()
|
|
56
|
-
for x in __inputs__:
|
|
65
|
+
for idx, x in enumerate(__inputs__):
|
|
57
66
|
if x is None:
|
|
58
67
|
continue
|
|
59
|
-
x_n =
|
|
68
|
+
x_n = input_names[idx].upper()
|
|
60
69
|
unique_param_name_set.add(x_n)
|
|
61
70
|
options += add_dtype_fmt_option_single(x, x_n)
|
|
62
|
-
|
|
63
|
-
for x in __outputs__:
|
|
71
|
+
|
|
72
|
+
for idx, x in enumerate(__outputs__):
|
|
64
73
|
if x is None:
|
|
65
74
|
continue
|
|
66
|
-
x_n =
|
|
75
|
+
x_n = output_names[idx].upper()
|
|
67
76
|
if x_n in unique_param_name_set:
|
|
68
77
|
options += add_dtype_fmt_option_single(x, x_n, True)
|
|
69
78
|
else:
|
|
@@ -74,27 +83,40 @@ def load_dso(so_path):
|
|
|
74
83
|
try:
|
|
75
84
|
ctypes.CDLL(so_path)
|
|
76
85
|
except OSError as error :
|
|
77
|
-
|
|
86
|
+
CommonUtility.print_compile_log("", error, AscendCLogLevel.LOG_ERROR)
|
|
78
87
|
raise RuntimeError("cannot open %s" %(so_path))
|
|
79
88
|
else:
|
|
80
|
-
|
|
89
|
+
msg = "load so succ " + so_path
|
|
90
|
+
CommonUtility.print_compile_log("", msg, AscendCLogLevel.LOG_INFO)
|
|
81
91
|
|
|
82
92
|
def get_shortsoc_compile_option(compile_option_list: list, shortsoc:str):
|
|
83
93
|
compile_options = []
|
|
84
94
|
if shortsoc in compile_option_list:
|
|
85
|
-
compile_options
|
|
86
|
-
|
|
87
|
-
compile_options
|
|
95
|
+
compile_options.extend(compile_option_list[shortsoc])
|
|
96
|
+
if '__ALLSOC__' in compile_option_list:
|
|
97
|
+
compile_options.extend(compile_option_list['__ALLSOC__'])
|
|
88
98
|
return compile_options
|
|
89
99
|
|
|
90
100
|
def get_kernel_source(src_file, dir_snake, dir_ex):
|
|
91
101
|
src_ex = os.path.join(PYF_PATH, "..", "ascendc", dir_ex, src_file)
|
|
92
102
|
if os.path.exists(src_ex):
|
|
93
103
|
return src_ex
|
|
104
|
+
src = os.environ.get('BUILD_KERNEL_SRC')
|
|
105
|
+
if src and os.path.exists(src):
|
|
106
|
+
return src
|
|
94
107
|
src = os.path.join(PYF_PATH, "..", "ascendc", dir_snake, src_file)
|
|
95
108
|
if os.path.exists(src):
|
|
96
109
|
return src
|
|
97
110
|
src = os.path.join(PYF_PATH, src_file)
|
|
111
|
+
if os.path.exists(src):
|
|
112
|
+
return src
|
|
113
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", dir_snake, dir_snake + ".cpp")
|
|
114
|
+
if os.path.exists(src):
|
|
115
|
+
return src
|
|
116
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", dir_ex, dir_ex + ".cpp")
|
|
117
|
+
if os.path.exists(src):
|
|
118
|
+
return src
|
|
119
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", os.path.splitext(src_file)[0], src_file)
|
|
98
120
|
if os.path.exists(src):
|
|
99
121
|
return src
|
|
100
122
|
return src_ex
|
|
@@ -109,6 +131,8 @@ def _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, s
|
|
|
109
131
|
__inputs__.append(arg[0])
|
|
110
132
|
else:
|
|
111
133
|
__inputs__.append(arg)
|
|
134
|
+
else:
|
|
135
|
+
__inputs__.append(arg)
|
|
112
136
|
__outputs__ = []
|
|
113
137
|
for arg in [out_out_]:
|
|
114
138
|
if arg != None:
|
|
@@ -118,24 +142,30 @@ def _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, s
|
|
|
118
142
|
__outputs__.append(arg[0])
|
|
119
143
|
else:
|
|
120
144
|
__outputs__.append(arg)
|
|
145
|
+
else:
|
|
146
|
+
__outputs__.append(arg)
|
|
121
147
|
__attrs__ = []
|
|
122
148
|
return __inputs__, __outputs__, __attrs__
|
|
123
149
|
|
|
124
150
|
@tbe_register.register_operator("DecoderKvCache", trans_bool_to_s8=False)
|
|
125
151
|
@para_check.check_op_params(para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_OUTPUT, para_check.KERNEL_NAME)
|
|
126
152
|
def decoder_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_, kernel_name="decoder_kv_cache", impl_mode=""):
|
|
153
|
+
# do ascendc build step
|
|
127
154
|
if get_current_build_config("enable_op_prebuild"):
|
|
128
155
|
return
|
|
129
156
|
__inputs__, __outputs__, __attrs__ = _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_)
|
|
130
157
|
options = get_dtype_fmt_options(__inputs__, __outputs__)
|
|
131
158
|
options += ["-x", "cce"]
|
|
132
|
-
bisheng =
|
|
159
|
+
bisheng = os.environ.get('BISHENG_REAL_PATH')
|
|
160
|
+
if bisheng is None:
|
|
161
|
+
bisheng = shutil.which("bisheng")
|
|
133
162
|
if bisheng != None:
|
|
134
163
|
bisheng_path = os.path.dirname(bisheng)
|
|
135
164
|
tikcpp_path = os.path.realpath(os.path.join(bisheng_path, "..", "..", "tikcpp"))
|
|
136
165
|
else:
|
|
137
166
|
tikcpp_path = os.path.realpath("/usr/local/Ascend/latest/compiler/tikcpp")
|
|
138
167
|
options.append("-I" + tikcpp_path)
|
|
168
|
+
options.append("-I" + os.path.join(tikcpp_path, "..", "..", "include"))
|
|
139
169
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw"))
|
|
140
170
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "impl"))
|
|
141
171
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "interface"))
|
|
@@ -144,8 +174,10 @@ def decoder_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in
|
|
|
144
174
|
options.append("-DHIGH_PERFORMANCE=1")
|
|
145
175
|
elif impl_mode == "high_precision":
|
|
146
176
|
options.append("-DHIGH_PRECISION=1")
|
|
147
|
-
if
|
|
148
|
-
options.append("-
|
|
177
|
+
if get_current_build_config("enable_deterministic_mode") == 1:
|
|
178
|
+
options.append("-DDETERMINISTIC_MODE=1")
|
|
179
|
+
else:
|
|
180
|
+
options.append("-DDETERMINISTIC_MODE=0")
|
|
149
181
|
|
|
150
182
|
custom_compile_options = {},
|
|
151
183
|
custom_all_compile_options = {},
|
|
@@ -162,11 +194,14 @@ def decoder_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in
|
|
|
162
194
|
ascendc_src_file = "decoder_kv_cache.cpp"
|
|
163
195
|
src = get_kernel_source(ascendc_src_file, ascendc_src_dir, ascendc_src_dir_ex)
|
|
164
196
|
|
|
165
|
-
|
|
197
|
+
msg = "start compile Acend C Operator DecoderKvCache, kernel name is " + kernel_name
|
|
198
|
+
CommonUtility.print_compile_log("", msg, AscendCLogLevel.LOG_INFO)
|
|
166
199
|
op_type = "DecoderKvCache"
|
|
167
200
|
code_channel = get_code_channel(src, kernel_name, op_type, options)
|
|
168
201
|
op_info = OpInfo(kernel_name = kernel_name, op_type = op_type, inputs = __inputs__, outputs = __outputs__,\
|
|
169
|
-
attrs = __attrs__, impl_mode = impl_mode, origin_inputs=[cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__], origin_outputs = [out_out_]
|
|
202
|
+
attrs = __attrs__, impl_mode = impl_mode, origin_inputs=[cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__], origin_outputs = [out_out_],\
|
|
203
|
+
param_type_dynamic = False, mc2_ctx = [], param_type_list = ['required', 'required', 'required', 'required', 'required', 'required', 'required', 'required'], init_value_list = [None],\
|
|
204
|
+
output_shape_depend_on_compute = [])
|
|
170
205
|
compile_op(src, origin_func_name, op_info, options, code_channel, '{}')
|
|
171
206
|
|
|
172
207
|
def op_select_format(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_, impl_mode=""):
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Copyright (c) Huawei Technologies Co., Ltd. 2023-2024. All rights reserved.
|
|
5
|
+
"""
|
|
1
6
|
|
|
2
7
|
import os, sys
|
|
3
8
|
import ctypes
|
|
@@ -6,6 +11,7 @@ import shutil
|
|
|
6
11
|
from tbe.common.platform import get_soc_spec
|
|
7
12
|
from tbe.common.utils import para_check
|
|
8
13
|
from tbe.tikcpp import compile_op, replay_op, check_op_cap, generalize_op_params, get_code_channel, OpInfo
|
|
14
|
+
from tbe.tikcpp.compile_op import CommonUtility, AscendCLogLevel
|
|
9
15
|
from tbe.common.buildcfg import get_default_build_config
|
|
10
16
|
from impl.util.platform_adapter import tbe_register
|
|
11
17
|
from tbe.common.buildcfg import get_current_build_config
|
|
@@ -28,6 +34,7 @@ DTYPE_MAP = {"float32": ["DT_FLOAT", "float"],
|
|
|
28
34
|
"dual_sub_int8": ["DT_DUAL_SUB_INT8", "unknown"],
|
|
29
35
|
"dual_sub_uint8": ["DT_DUAL_SUB_UINT8", "unknown"],
|
|
30
36
|
"string": ["DT_STRING", "unknown"],
|
|
37
|
+
"complex32": ["DT_COMPLEX32", "unknown"],
|
|
31
38
|
"complex64": ["DT_COMPLEX64", "unknown"],
|
|
32
39
|
"complex128": ["DT_COMPLEX128", "unknown"],
|
|
33
40
|
"qint8": ["DT_QINT8", "unknown"],
|
|
@@ -49,21 +56,23 @@ def add_dtype_fmt_option_single(x, x_n, is_ref: bool = False):
|
|
|
49
56
|
options.append("-DORIG_DTYPE_{n}={ot}".format(n=x_n_in_kernel, ot=DTYPE_MAP.get(x_dtype)[0]))
|
|
50
57
|
options.append("-DFORMAT_{n}=FORMAT_{f}".format(n=x_n_in_kernel, f=x_fmt))
|
|
51
58
|
return options
|
|
52
|
-
|
|
59
|
+
|
|
53
60
|
def get_dtype_fmt_options(__inputs__, __outputs__):
|
|
54
61
|
options = []
|
|
62
|
+
input_names = ['cache', 'update', 'valid_seq_len', 'batch_index', 'seq_len_axis', 'new_max_seq_len', 'cur_max_seq_len']
|
|
63
|
+
output_names = ['out']
|
|
55
64
|
unique_param_name_set = set()
|
|
56
|
-
for x in __inputs__:
|
|
65
|
+
for idx, x in enumerate(__inputs__):
|
|
57
66
|
if x is None:
|
|
58
67
|
continue
|
|
59
|
-
x_n =
|
|
68
|
+
x_n = input_names[idx].upper()
|
|
60
69
|
unique_param_name_set.add(x_n)
|
|
61
70
|
options += add_dtype_fmt_option_single(x, x_n)
|
|
62
|
-
|
|
63
|
-
for x in __outputs__:
|
|
71
|
+
|
|
72
|
+
for idx, x in enumerate(__outputs__):
|
|
64
73
|
if x is None:
|
|
65
74
|
continue
|
|
66
|
-
x_n =
|
|
75
|
+
x_n = output_names[idx].upper()
|
|
67
76
|
if x_n in unique_param_name_set:
|
|
68
77
|
options += add_dtype_fmt_option_single(x, x_n, True)
|
|
69
78
|
else:
|
|
@@ -74,27 +83,40 @@ def load_dso(so_path):
|
|
|
74
83
|
try:
|
|
75
84
|
ctypes.CDLL(so_path)
|
|
76
85
|
except OSError as error :
|
|
77
|
-
|
|
86
|
+
CommonUtility.print_compile_log("", error, AscendCLogLevel.LOG_ERROR)
|
|
78
87
|
raise RuntimeError("cannot open %s" %(so_path))
|
|
79
88
|
else:
|
|
80
|
-
|
|
89
|
+
msg = "load so succ " + so_path
|
|
90
|
+
CommonUtility.print_compile_log("", msg, AscendCLogLevel.LOG_INFO)
|
|
81
91
|
|
|
82
92
|
def get_shortsoc_compile_option(compile_option_list: list, shortsoc:str):
|
|
83
93
|
compile_options = []
|
|
84
94
|
if shortsoc in compile_option_list:
|
|
85
|
-
compile_options
|
|
86
|
-
|
|
87
|
-
compile_options
|
|
95
|
+
compile_options.extend(compile_option_list[shortsoc])
|
|
96
|
+
if '__ALLSOC__' in compile_option_list:
|
|
97
|
+
compile_options.extend(compile_option_list['__ALLSOC__'])
|
|
88
98
|
return compile_options
|
|
89
99
|
|
|
90
100
|
def get_kernel_source(src_file, dir_snake, dir_ex):
|
|
91
101
|
src_ex = os.path.join(PYF_PATH, "..", "ascendc", dir_ex, src_file)
|
|
92
102
|
if os.path.exists(src_ex):
|
|
93
103
|
return src_ex
|
|
104
|
+
src = os.environ.get('BUILD_KERNEL_SRC')
|
|
105
|
+
if src and os.path.exists(src):
|
|
106
|
+
return src
|
|
94
107
|
src = os.path.join(PYF_PATH, "..", "ascendc", dir_snake, src_file)
|
|
95
108
|
if os.path.exists(src):
|
|
96
109
|
return src
|
|
97
110
|
src = os.path.join(PYF_PATH, src_file)
|
|
111
|
+
if os.path.exists(src):
|
|
112
|
+
return src
|
|
113
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", dir_snake, dir_snake + ".cpp")
|
|
114
|
+
if os.path.exists(src):
|
|
115
|
+
return src
|
|
116
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", dir_ex, dir_ex + ".cpp")
|
|
117
|
+
if os.path.exists(src):
|
|
118
|
+
return src
|
|
119
|
+
src = os.path.join(PYF_PATH, "..", "ascendc", os.path.splitext(src_file)[0], src_file)
|
|
98
120
|
if os.path.exists(src):
|
|
99
121
|
return src
|
|
100
122
|
return src_ex
|
|
@@ -109,6 +131,8 @@ def _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, s
|
|
|
109
131
|
__inputs__.append(arg[0])
|
|
110
132
|
else:
|
|
111
133
|
__inputs__.append(arg)
|
|
134
|
+
else:
|
|
135
|
+
__inputs__.append(arg)
|
|
112
136
|
__outputs__ = []
|
|
113
137
|
for arg in [out_out_]:
|
|
114
138
|
if arg != None:
|
|
@@ -118,24 +142,30 @@ def _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, s
|
|
|
118
142
|
__outputs__.append(arg[0])
|
|
119
143
|
else:
|
|
120
144
|
__outputs__.append(arg)
|
|
145
|
+
else:
|
|
146
|
+
__outputs__.append(arg)
|
|
121
147
|
__attrs__ = []
|
|
122
148
|
return __inputs__, __outputs__, __attrs__
|
|
123
149
|
|
|
124
150
|
@tbe_register.register_operator("PromptKvCache", trans_bool_to_s8=False)
|
|
125
151
|
@para_check.check_op_params(para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_INPUT, para_check.REQUIRED_OUTPUT, para_check.KERNEL_NAME)
|
|
126
152
|
def prompt_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_, kernel_name="prompt_kv_cache", impl_mode=""):
|
|
153
|
+
# do ascendc build step
|
|
127
154
|
if get_current_build_config("enable_op_prebuild"):
|
|
128
155
|
return
|
|
129
156
|
__inputs__, __outputs__, __attrs__ = _build_args(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_)
|
|
130
157
|
options = get_dtype_fmt_options(__inputs__, __outputs__)
|
|
131
158
|
options += ["-x", "cce"]
|
|
132
|
-
bisheng =
|
|
159
|
+
bisheng = os.environ.get('BISHENG_REAL_PATH')
|
|
160
|
+
if bisheng is None:
|
|
161
|
+
bisheng = shutil.which("bisheng")
|
|
133
162
|
if bisheng != None:
|
|
134
163
|
bisheng_path = os.path.dirname(bisheng)
|
|
135
164
|
tikcpp_path = os.path.realpath(os.path.join(bisheng_path, "..", "..", "tikcpp"))
|
|
136
165
|
else:
|
|
137
166
|
tikcpp_path = os.path.realpath("/usr/local/Ascend/latest/compiler/tikcpp")
|
|
138
167
|
options.append("-I" + tikcpp_path)
|
|
168
|
+
options.append("-I" + os.path.join(tikcpp_path, "..", "..", "include"))
|
|
139
169
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw"))
|
|
140
170
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "impl"))
|
|
141
171
|
options.append("-I" + os.path.join(tikcpp_path, "tikcfw", "interface"))
|
|
@@ -144,8 +174,10 @@ def prompt_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in_
|
|
|
144
174
|
options.append("-DHIGH_PERFORMANCE=1")
|
|
145
175
|
elif impl_mode == "high_precision":
|
|
146
176
|
options.append("-DHIGH_PRECISION=1")
|
|
147
|
-
if
|
|
148
|
-
options.append("-
|
|
177
|
+
if get_current_build_config("enable_deterministic_mode") == 1:
|
|
178
|
+
options.append("-DDETERMINISTIC_MODE=1")
|
|
179
|
+
else:
|
|
180
|
+
options.append("-DDETERMINISTIC_MODE=0")
|
|
149
181
|
|
|
150
182
|
custom_compile_options = {},
|
|
151
183
|
custom_all_compile_options = {},
|
|
@@ -162,11 +194,14 @@ def prompt_kv_cache(cache_in__, update_in__, valid_seq_len_in__, batch_index_in_
|
|
|
162
194
|
ascendc_src_file = "prompt_kv_cache.cpp"
|
|
163
195
|
src = get_kernel_source(ascendc_src_file, ascendc_src_dir, ascendc_src_dir_ex)
|
|
164
196
|
|
|
165
|
-
|
|
197
|
+
msg = "start compile Acend C Operator PromptKvCache, kernel name is " + kernel_name
|
|
198
|
+
CommonUtility.print_compile_log("", msg, AscendCLogLevel.LOG_INFO)
|
|
166
199
|
op_type = "PromptKvCache"
|
|
167
200
|
code_channel = get_code_channel(src, kernel_name, op_type, options)
|
|
168
201
|
op_info = OpInfo(kernel_name = kernel_name, op_type = op_type, inputs = __inputs__, outputs = __outputs__,\
|
|
169
|
-
attrs = __attrs__, impl_mode = impl_mode, origin_inputs=[cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__], origin_outputs = [out_out_]
|
|
202
|
+
attrs = __attrs__, impl_mode = impl_mode, origin_inputs=[cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__], origin_outputs = [out_out_],\
|
|
203
|
+
param_type_dynamic = False, mc2_ctx = [], param_type_list = ['required', 'required', 'required', 'required', 'required', 'required', 'required', 'required'], init_value_list = [None],\
|
|
204
|
+
output_shape_depend_on_compute = [])
|
|
170
205
|
compile_op(src, origin_func_name, op_info, options, code_channel, '{}')
|
|
171
206
|
|
|
172
207
|
def op_select_format(cache_in__, update_in__, valid_seq_len_in__, batch_index_in__, seq_len_axis_in__, new_max_seq_len_in__, cur_max_seq_len_in__, out_out_, impl_mode=""):
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"binFileName": "DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272",
|
|
3
|
+
"binFileSuffix": ".o",
|
|
4
|
+
"blockDim": -1,
|
|
5
|
+
"coreType": "AiCore",
|
|
6
|
+
"globalworkspace_spec_workspace": {
|
|
7
|
+
"size": 32,
|
|
8
|
+
"type": 0
|
|
9
|
+
},
|
|
10
|
+
"kernelName": "DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272",
|
|
11
|
+
"magic": "RT_DEV_BINARY_MAGIC_ELF",
|
|
12
|
+
"memoryStamping": [],
|
|
13
|
+
"opParaSize": 120,
|
|
14
|
+
"parameters": [
|
|
15
|
+
null,
|
|
16
|
+
null,
|
|
17
|
+
null,
|
|
18
|
+
null,
|
|
19
|
+
null,
|
|
20
|
+
null,
|
|
21
|
+
null,
|
|
22
|
+
null,
|
|
23
|
+
null
|
|
24
|
+
],
|
|
25
|
+
"sha256": "4df14064cf209e2a93f2f676f4b77bd62f935ca5f07b6c56c32fc33c7ac27cc6",
|
|
26
|
+
"workspace": {
|
|
27
|
+
"num": 1,
|
|
28
|
+
"size": [
|
|
29
|
+
-1
|
|
30
|
+
],
|
|
31
|
+
"type": [
|
|
32
|
+
0
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"kernelList": [
|
|
36
|
+
{
|
|
37
|
+
"kernelName": "DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272_1"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"kernelName": "DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272_2"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kernelName": "DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272_4"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"optionalInputMode": "gen_placeholder",
|
|
47
|
+
"optionalOutputMode": "gen_placeholder",
|
|
48
|
+
"compileInfo": {},
|
|
49
|
+
"supportInfo": {
|
|
50
|
+
"implMode": "high_performance",
|
|
51
|
+
"int64Mode": false,
|
|
52
|
+
"simplifiedKeyMode": 0,
|
|
53
|
+
"simplifiedKey": [
|
|
54
|
+
"DecoderKvCache/d=0,p=1/0,2/0,2/9,2/9,2/9,2/9,2/9,2/0,2",
|
|
55
|
+
"DecoderKvCache/d=0,p=0/0,2/0,2/9,2/9,2/9,2/9,2/9,2/0,2",
|
|
56
|
+
"DecoderKvCache/d=1,p=1/0,2/0,2/9,2/9,2/9,2/9,2/9,2/0,2",
|
|
57
|
+
"DecoderKvCache/d=1,p=0/0,2/0,2/9,2/9,2/9,2/9,2/9,2/0,2"
|
|
58
|
+
],
|
|
59
|
+
"optionalInputMode": "gen_placeholder",
|
|
60
|
+
"optionalOutputMode": "gen_placeholder",
|
|
61
|
+
"staticKey": "d2856beaf2ce2851079a33584f85d8aef4bd9ee1145fdcf53bacd6d0035a1c4e,4a1f6ada9e32bab6f426997be4c2205d430f3e80f3e028831ec7146ba3e0f1f9",
|
|
62
|
+
"inputs": [
|
|
63
|
+
{
|
|
64
|
+
"name": "cache",
|
|
65
|
+
"index": 0,
|
|
66
|
+
"dtype": "float32",
|
|
67
|
+
"format": "ND",
|
|
68
|
+
"paramType": "required",
|
|
69
|
+
"shape": [
|
|
70
|
+
-2
|
|
71
|
+
],
|
|
72
|
+
"format_match_mode": "FormatAgnostic"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "update",
|
|
76
|
+
"index": 1,
|
|
77
|
+
"dtype": "float32",
|
|
78
|
+
"format": "ND",
|
|
79
|
+
"paramType": "required",
|
|
80
|
+
"shape": [
|
|
81
|
+
-2
|
|
82
|
+
],
|
|
83
|
+
"format_match_mode": "FormatAgnostic"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "valid_seq_len",
|
|
87
|
+
"index": 2,
|
|
88
|
+
"dtype": "int64",
|
|
89
|
+
"format": "ND",
|
|
90
|
+
"paramType": "required",
|
|
91
|
+
"shape": [
|
|
92
|
+
-2
|
|
93
|
+
],
|
|
94
|
+
"format_match_mode": "FormatAgnostic"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "batch_index",
|
|
98
|
+
"index": 3,
|
|
99
|
+
"dtype": "int64",
|
|
100
|
+
"format": "ND",
|
|
101
|
+
"paramType": "required",
|
|
102
|
+
"shape": [
|
|
103
|
+
-2
|
|
104
|
+
],
|
|
105
|
+
"format_match_mode": "FormatAgnostic"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "seq_len_axis",
|
|
109
|
+
"index": 4,
|
|
110
|
+
"dtype": "int64",
|
|
111
|
+
"format": "ND",
|
|
112
|
+
"paramType": "required",
|
|
113
|
+
"shape": [
|
|
114
|
+
-2
|
|
115
|
+
],
|
|
116
|
+
"format_match_mode": "FormatAgnostic"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "new_max_seq_len",
|
|
120
|
+
"index": 5,
|
|
121
|
+
"dtype": "int64",
|
|
122
|
+
"format": "ND",
|
|
123
|
+
"paramType": "required",
|
|
124
|
+
"shape": [
|
|
125
|
+
-2
|
|
126
|
+
],
|
|
127
|
+
"format_match_mode": "FormatAgnostic"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "cur_max_seq_len",
|
|
131
|
+
"index": 6,
|
|
132
|
+
"dtype": "int64",
|
|
133
|
+
"format": "ND",
|
|
134
|
+
"paramType": "required",
|
|
135
|
+
"shape": [
|
|
136
|
+
-2
|
|
137
|
+
],
|
|
138
|
+
"format_match_mode": "FormatAgnostic"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"outputs": [
|
|
142
|
+
{
|
|
143
|
+
"name": "out",
|
|
144
|
+
"index": 0,
|
|
145
|
+
"dtype": "float32",
|
|
146
|
+
"format": "ND",
|
|
147
|
+
"paramType": "required",
|
|
148
|
+
"shape": [
|
|
149
|
+
-2
|
|
150
|
+
],
|
|
151
|
+
"format_match_mode": "FormatAgnostic"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"opMode": "dynamic",
|
|
155
|
+
"deterministic": "ignore"
|
|
156
|
+
},
|
|
157
|
+
"filePath": "ascend910/bin/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json"
|
|
158
|
+
}
|