mindspore 2.4.0__cp311-cp311-manylinux1_x86_64.whl → 2.4.10__cp311-cp311-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.

Files changed (295) hide show
  1. mindspore/.commit_id +1 -1
  2. mindspore/_c_dataengine.cpython-311-x86_64-linux-gnu.so +0 -0
  3. mindspore/_c_expression.cpython-311-x86_64-linux-gnu.so +0 -0
  4. mindspore/_c_mindrecord.cpython-311-x86_64-linux-gnu.so +0 -0
  5. mindspore/bin/cache_admin +0 -0
  6. mindspore/bin/cache_server +0 -0
  7. mindspore/common/api.py +1 -4
  8. mindspore/common/file_system.py +2 -0
  9. mindspore/common/initializer.py +51 -15
  10. mindspore/common/parameter.py +6 -5
  11. mindspore/common/tensor.py +15 -49
  12. mindspore/communication/_comm_helper.py +5 -0
  13. mindspore/communication/comm_func.py +7 -7
  14. mindspore/context.py +16 -2
  15. mindspore/dataset/engine/datasets_standard_format.py +17 -0
  16. mindspore/dataset/engine/datasets_user_defined.py +27 -1
  17. mindspore/experimental/llm_boost/__init__.py +2 -2
  18. mindspore/experimental/llm_boost/atb/boost_base.py +240 -64
  19. mindspore/experimental/llm_boost/atb/llama_boost.py +46 -29
  20. mindspore/experimental/llm_boost/atb/qwen_boost.py +47 -24
  21. mindspore/include/api/context.h +1 -1
  22. mindspore/include/dataset/constants.h +2 -2
  23. mindspore/include/mindapi/base/format.h +13 -0
  24. mindspore/lib/libavcodec.so.59 +0 -0
  25. mindspore/lib/libavdevice.so.59 +0 -0
  26. mindspore/lib/libavfilter.so.8 +0 -0
  27. mindspore/lib/libavformat.so.59 +0 -0
  28. mindspore/lib/libavutil.so.57 +0 -0
  29. mindspore/lib/libdnnl.so.2 +0 -0
  30. mindspore/lib/libicuuc.so.69 +0 -0
  31. mindspore/lib/libmindspore_backend.so +0 -0
  32. mindspore/lib/libmindspore_common.so +0 -0
  33. mindspore/lib/libmindspore_core.so +0 -0
  34. mindspore/lib/libmindspore_glog.so.0 +0 -0
  35. mindspore/lib/libmindspore_gpr.so.15 +0 -0
  36. mindspore/lib/libmindspore_grpc++.so.1 +0 -0
  37. mindspore/lib/libmindspore_grpc.so.15 +0 -0
  38. mindspore/lib/libmindspore_ops.so +0 -0
  39. mindspore/lib/libopencv_core.so.4.5 +0 -0
  40. mindspore/lib/libopencv_imgcodecs.so.4.5 +0 -0
  41. mindspore/lib/libopencv_imgproc.so.4.5 +0 -0
  42. mindspore/lib/libswresample.so.4 +0 -0
  43. mindspore/lib/libswscale.so.6 +0 -0
  44. mindspore/lib/plugin/ascend/custom_aicore_ops/op_proto/libop_proto.so +0 -0
  45. mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so +0 -0
  46. mindspore/lib/plugin/ascend/custom_aicpu_ops/op_proto/libcust_op_proto.so +0 -0
  47. mindspore/lib/plugin/ascend/custom_ascendc_910/framework/npu_supported_ops.json +10 -0
  48. mindspore/lib/plugin/ascend/custom_ascendc_910/op_api/lib/libcust_opapi.so +0 -0
  49. mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_impl/ai_core/tbe/config/ascend910/aic-ascend910-ops-info.json +0 -42
  50. 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
  51. 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
  52. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +158 -0
  53. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
  54. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +158 -0
  55. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
  56. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +158 -0
  57. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
  58. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +158 -0
  59. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
  60. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +158 -0
  61. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
  62. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +158 -0
  63. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
  64. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +158 -0
  65. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
  66. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +158 -0
  67. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
  68. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +167 -0
  69. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
  70. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +167 -0
  71. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
  72. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +167 -0
  73. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
  74. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +167 -0
  75. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
  76. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +167 -0
  77. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
  78. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +167 -0
  79. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
  80. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +167 -0
  81. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
  82. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +167 -0
  83. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/ascend910/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
  84. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/binary_info_config.json +302 -0
  85. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/decoder_kv_cache.json +892 -0
  86. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/kernel/config/ascend910/prompt_kv_cache.json +892 -0
  87. 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
  88. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
  89. mindspore/lib/plugin/ascend/custom_ascendc_910/op_proto/inc/op_proto.h +33 -0
  90. mindspore/lib/plugin/ascend/custom_ascendc_910/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
  91. mindspore/lib/plugin/ascend/custom_ascendc_910/version.info +1 -0
  92. mindspore/lib/plugin/ascend/custom_ascendc_910b/framework/npu_supported_ops.json +14 -0
  93. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/include/aclnn_decoder_kv_cache.h +59 -0
  94. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/include/aclnn_prompt_kv_cache.h +59 -0
  95. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/lib/libcust_opapi.so +0 -0
  96. 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
  97. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/decoder_kv_cache.cpp +192 -0
  98. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/decoder_kv_cache.py +215 -0
  99. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/prompt_kv_cache.cpp +274 -0
  100. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/prompt_kv_cache.py +215 -0
  101. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.json +80 -0
  102. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.o +0 -0
  103. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.json +80 -0
  104. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.o +0 -0
  105. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.json +80 -0
  106. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.o +0 -0
  107. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +158 -0
  108. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
  109. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +158 -0
  110. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
  111. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +158 -0
  112. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
  113. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +158 -0
  114. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
  115. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +158 -0
  116. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
  117. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +158 -0
  118. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
  119. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +158 -0
  120. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
  121. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +158 -0
  122. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
  123. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +167 -0
  124. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
  125. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +167 -0
  126. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
  127. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +167 -0
  128. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
  129. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +167 -0
  130. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
  131. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +167 -0
  132. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
  133. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +167 -0
  134. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
  135. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +167 -0
  136. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
  137. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +167 -0
  138. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend310p/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
  139. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.json +78 -0
  140. 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
  141. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.json +78 -0
  142. 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
  143. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.json +78 -0
  144. 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
  145. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +156 -0
  146. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
  147. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +156 -0
  148. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
  149. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +156 -0
  150. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
  151. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +156 -0
  152. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
  153. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +156 -0
  154. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
  155. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +156 -0
  156. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
  157. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +156 -0
  158. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
  159. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +156 -0
  160. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
  161. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +165 -0
  162. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
  163. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +165 -0
  164. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
  165. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +165 -0
  166. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
  167. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +165 -0
  168. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
  169. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +165 -0
  170. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
  171. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +165 -0
  172. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
  173. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +165 -0
  174. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
  175. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +165 -0
  176. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910b/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
  177. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/all_finite.json +139 -0
  178. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/binary_info_config.json +361 -0
  179. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/decoder_kv_cache.json +892 -0
  180. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend310p/prompt_kv_cache.json +892 -0
  181. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/all_finite.json +139 -0
  182. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/binary_info_config.json +361 -0
  183. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/decoder_kv_cache.json +892 -0
  184. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910b/prompt_kv_cache.json +892 -0
  185. 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
  186. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
  187. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
  188. mindspore/lib/plugin/ascend/custom_ascendc_910b/version.info +1 -0
  189. mindspore/lib/plugin/ascend/custom_compiler/setup.py +1 -1
  190. mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
  191. mindspore/lib/plugin/ascend/libhccl_plugin.so +0 -0
  192. mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
  193. mindspore/lib/plugin/ascend/libmindspore_internal_kernels.so +0 -0
  194. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/bin/PkgInspect +0 -0
  195. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/bin/op_man +0 -0
  196. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/host/libasdops_cann_host.so +0 -0
  197. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/host/libasdops_host.so +0 -0
  198. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/include/asdops/utils/rt/base/types.h +5 -5
  199. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/libasdops.so +0 -0
  200. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/libasdops_static.a +0 -0
  201. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/liblcal.so +0 -0
  202. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/lib/liblcal_static.a +0 -0
  203. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme_op.h +1 -0
  204. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/flash_attention_score_op.h +6 -1
  205. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/paged_attention_op.h +6 -1
  206. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/rms_norm_op.h +4 -3
  207. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_quant_acme_impl.so +0 -0
  208. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_310p_impl.so +0 -0
  209. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libms_kernels_internal.so +0 -0
  210. 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
  211. 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
  212. 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
  213. 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
  214. 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
  215. 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
  216. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bnsd_mix.o +0 -0
  217. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bsh_mix.o +0 -0
  218. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bnsd_mix.o +0 -0
  219. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bsh_mix.o +0 -0
  220. mindspore/lib/plugin/ascend/ms_kernels_internal/lccl/lib/liblcal.so +0 -0
  221. mindspore/lib/plugin/gpu/libcuda_ops.so.10 +0 -0
  222. mindspore/lib/plugin/gpu/libcuda_ops.so.11 +0 -0
  223. mindspore/lib/plugin/gpu10.1/libnccl.so.2 +0 -0
  224. mindspore/lib/plugin/gpu11.1/libnccl.so.2 +0 -0
  225. mindspore/lib/plugin/gpu11.6/libnccl.so.2 +0 -0
  226. mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
  227. mindspore/lib/plugin/libmindspore_gpu.so.10.1 +0 -0
  228. mindspore/lib/plugin/libmindspore_gpu.so.11.1 +0 -0
  229. mindspore/lib/plugin/libmindspore_gpu.so.11.6 +0 -0
  230. mindspore/mint/__init__.py +490 -2
  231. mindspore/mint/nn/__init__.py +2 -2
  232. mindspore/mint/optim/adamw.py +6 -14
  233. mindspore/nn/__init__.py +2 -0
  234. mindspore/nn/cell.py +16 -4
  235. mindspore/nn/layer/basic.py +24 -7
  236. mindspore/nn/layer/conv.py +3 -0
  237. mindspore/nn/layer/embedding.py +31 -14
  238. mindspore/nn/layer/pooling.py +8 -10
  239. mindspore/nn/optim/tft_wrapper.py +12 -15
  240. mindspore/nn/utils/__init__.py +22 -0
  241. mindspore/nn/utils/init.py +71 -0
  242. mindspore/ops/_grad_experimental/grad_array_ops.py +0 -11
  243. mindspore/ops/_grad_experimental/grad_comm_ops.py +45 -8
  244. mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +6 -0
  245. mindspore/ops/auto_generate/gen_extend_func.py +33 -0
  246. mindspore/ops/auto_generate/gen_ops_def.py +52 -3
  247. mindspore/ops/auto_generate/gen_ops_prim.py +158 -8
  248. mindspore/ops/function/array_func.py +2 -0
  249. mindspore/ops/function/math_func.py +12 -5
  250. mindspore/ops/function/random_func.py +221 -7
  251. mindspore/ops/operations/__init__.py +1 -1
  252. mindspore/ops/operations/array_ops.py +3 -1
  253. mindspore/ops/operations/comm_ops.py +25 -1
  254. mindspore/ops/operations/custom_ops.py +6 -4
  255. mindspore/ops/operations/manually_defined/ops_def.py +8 -10
  256. mindspore/ops/operations/nn_ops.py +7 -2
  257. mindspore/parallel/_auto_parallel_context.py +26 -5
  258. mindspore/parallel/_cell_wrapper.py +24 -3
  259. mindspore/parallel/_tensor.py +46 -2
  260. mindspore/parallel/_utils.py +39 -21
  261. mindspore/parallel/transform_safetensors.py +196 -43
  262. mindspore/profiler/profiling.py +5 -1
  263. mindspore/run_check/_check_version.py +20 -9
  264. mindspore/train/_utils.py +92 -32
  265. mindspore/train/callback/_checkpoint.py +12 -9
  266. mindspore/train/callback/_on_request_exit.py +12 -1
  267. mindspore/train/callback/_tft_register.py +33 -9
  268. mindspore/train/dataset_helper.py +10 -2
  269. mindspore/train/model.py +21 -0
  270. mindspore/train/serialization.py +12 -19
  271. mindspore/version.py +1 -1
  272. {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/METADATA +9 -7
  273. {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/RECORD +285 -158
  274. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_api/lib/libcust_opapi.so +0 -0
  275. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_576ceaeef5870c451cab59af55ea46ad.json +0 -58
  276. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_86a73ff6e28d734c96bb8d3054f7dd18.json +0 -58
  277. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/ascend910b/all_finite/AllFinite_f55e0ebaad1f2f572e43677336992fa0.json +0 -58
  278. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/config/ascend910b/all_finite.json +0 -109
  279. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/kernel/config/ascend910b/binary_info_config.json +0 -38
  280. 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
  281. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
  282. mindspore/lib/plugin/ascend/custom_ascendc_ops/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
  283. mindspore/lib/plugin/ascend/custom_ascendc_ops/version.info +0 -1
  284. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_api/include/aclnn_decoder_kv_cache.h +0 -0
  285. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910}/op_api/include/aclnn_prompt_kv_cache.h +0 -0
  286. /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
  287. /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
  288. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_api/include/aclnn_all_finite.h +0 -0
  289. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_impl/ai_core/tbe/config/ascend310p/aic-ascend310p-ops-info.json +0 -0
  290. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_impl/ai_core/tbe/config/ascend910b/aic-ascend910b-ops-info.json +0 -0
  291. /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
  292. /mindspore/lib/plugin/ascend/{custom_ascendc_ops → custom_ascendc_910b}/op_proto/inc/op_proto.h +0 -0
  293. {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/WHEEL +0 -0
  294. {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/entry_points.txt +0 -0
  295. {mindspore-2.4.0.dist-info → mindspore-2.4.10.dist-info}/top_level.txt +0 -0
@@ -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/Ascend310/Ascend910. This option is only valid for MindSpore Lite.
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, ///< Ascend310 Device.
112
- kAscend910B, ///< Ascend910B Device.
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_
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ {
2
+ "DecoderKvCache": {
3
+ "isGray": false,
4
+ "isHeavy": false
5
+ },
6
+ "PromptKvCache": {
7
+ "isGray": false,
8
+ "isHeavy": false
9
+ }
10
+ }
@@ -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 = x.get("param_name")[:-5].upper()
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 = x.get("param_name")[:-5].upper()
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
- print(error)
86
+ CommonUtility.print_compile_log("", error, AscendCLogLevel.LOG_ERROR)
78
87
  raise RuntimeError("cannot open %s" %(so_path))
79
88
  else:
80
- print("load so succ ", so_path)
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 = compile_option_list[shortsoc]
86
- elif '__ALLSOC__' in compile_option_list:
87
- compile_options = compile_option_list['__ALLSOC__']
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 = shutil.which("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 get_default_build_config("enable_deterministic_mode") == 1:
148
- options.append("-DDETEMINISTIC_MODE=1")
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
- print("start compile Ascend C operator DecoderKvCache. kernel name is " + kernel_name)
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 = x.get("param_name")[:-5].upper()
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 = x.get("param_name")[:-5].upper()
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
- print(error)
86
+ CommonUtility.print_compile_log("", error, AscendCLogLevel.LOG_ERROR)
78
87
  raise RuntimeError("cannot open %s" %(so_path))
79
88
  else:
80
- print("load so succ ", so_path)
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 = compile_option_list[shortsoc]
86
- elif '__ALLSOC__' in compile_option_list:
87
- compile_options = compile_option_list['__ALLSOC__']
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 = shutil.which("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 get_default_build_config("enable_deterministic_mode") == 1:
148
- options.append("-DDETEMINISTIC_MODE=1")
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
- print("start compile Ascend C operator PromptKvCache. kernel name is " + kernel_name)
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
+ }