mindspore 2.4.10__cp311-cp311-manylinux1_x86_64.whl → 2.5.0__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 (706) hide show
  1. mindspore/.commit_id +1 -1
  2. mindspore/Third_Party_Open_Source_Software_Notice +39 -0
  3. mindspore/__init__.py +8 -3
  4. mindspore/_akg/akg/composite/build_module.py +6 -2
  5. mindspore/_akg/akg/utils/kernel_exec.py +2 -2
  6. mindspore/_c_dataengine.cpython-311-x86_64-linux-gnu.so +0 -0
  7. mindspore/_c_expression.cpython-311-x86_64-linux-gnu.so +0 -0
  8. mindspore/_c_mindrecord.cpython-311-x86_64-linux-gnu.so +0 -0
  9. mindspore/_checkparam.py +0 -5
  10. mindspore/_extends/parallel_compile/akg_compiler/gen_custom_op_files.py +1 -1
  11. mindspore/_extends/parse/compile_config.py +64 -0
  12. mindspore/_extends/parse/deprecated/__init__.py +0 -0
  13. mindspore/_extends/parse/deprecated/deprecated_tensor_method.py +375 -0
  14. mindspore/_extends/parse/parser.py +23 -5
  15. mindspore/_extends/parse/standard_method.py +123 -27
  16. mindspore/_extends/pijit/pijit_func_white_list.py +1 -1
  17. mindspore/amp.py +7 -1
  18. mindspore/boost/boost_cell_wrapper.py +136 -41
  19. mindspore/common/__init__.py +3 -1
  20. mindspore/common/_register_for_tensor.py +0 -1
  21. mindspore/common/_stub_tensor.py +25 -4
  22. mindspore/common/_tensor_cpp_method.py +17 -0
  23. mindspore/common/_tensor_docs.py +6132 -0
  24. mindspore/common/api.py +98 -21
  25. mindspore/common/dtype.py +34 -34
  26. mindspore/common/dump.py +2 -1
  27. mindspore/common/file_system.py +8 -3
  28. mindspore/common/generator.py +2 -0
  29. mindspore/common/hook_handle.py +3 -1
  30. mindspore/common/initializer.py +3 -4
  31. mindspore/common/lazy_inline.py +8 -2
  32. mindspore/common/mindir_util.py +10 -2
  33. mindspore/common/parameter.py +31 -15
  34. mindspore/common/tensor.py +713 -1337
  35. mindspore/communication/__init__.py +1 -1
  36. mindspore/communication/_comm_helper.py +5 -0
  37. mindspore/communication/comm_func.py +215 -173
  38. mindspore/communication/management.py +23 -20
  39. mindspore/context.py +285 -191
  40. mindspore/dataset/__init__.py +23 -19
  41. mindspore/dataset/callback/ds_callback.py +2 -1
  42. mindspore/dataset/core/config.py +84 -3
  43. mindspore/dataset/engine/cache_admin.py +3 -3
  44. mindspore/dataset/engine/cache_client.py +5 -4
  45. mindspore/dataset/engine/datasets.py +192 -149
  46. mindspore/dataset/engine/datasets_audio.py +14 -0
  47. mindspore/dataset/engine/datasets_standard_format.py +11 -11
  48. mindspore/dataset/engine/datasets_text.py +38 -1
  49. mindspore/dataset/engine/datasets_user_defined.py +100 -66
  50. mindspore/dataset/engine/datasets_vision.py +81 -8
  51. mindspore/dataset/engine/iterators.py +281 -63
  52. mindspore/dataset/engine/obs/util.py +8 -0
  53. mindspore/dataset/engine/queue.py +40 -0
  54. mindspore/dataset/engine/samplers.py +26 -2
  55. mindspore/dataset/engine/serializer_deserializer.py +1 -1
  56. mindspore/dataset/engine/validators.py +43 -11
  57. mindspore/dataset/transforms/py_transforms_util.py +17 -0
  58. mindspore/dataset/transforms/transforms.py +29 -12
  59. mindspore/dataset/vision/validators.py +1 -2
  60. mindspore/device_context/__init__.py +21 -0
  61. mindspore/device_context/ascend/__init__.py +25 -0
  62. mindspore/device_context/ascend/device.py +72 -0
  63. mindspore/device_context/ascend/op_debug.py +94 -0
  64. mindspore/device_context/ascend/op_precision.py +193 -0
  65. mindspore/device_context/ascend/op_tuning.py +127 -0
  66. mindspore/device_context/cpu/__init__.py +25 -0
  67. mindspore/device_context/cpu/device.py +62 -0
  68. mindspore/device_context/cpu/op_tuning.py +43 -0
  69. mindspore/device_context/gpu/__init__.py +21 -0
  70. mindspore/device_context/gpu/device.py +70 -0
  71. mindspore/device_context/gpu/op_precision.py +67 -0
  72. mindspore/device_context/gpu/op_tuning.py +175 -0
  73. mindspore/device_manager.py +134 -0
  74. mindspore/experimental/llm_boost/__init__.py +1 -0
  75. mindspore/experimental/llm_boost/ascend_native/__init__.py +22 -0
  76. mindspore/experimental/llm_boost/ascend_native/llama_boost_ascend_native.py +211 -0
  77. mindspore/experimental/llm_boost/ascend_native/llm_boost.py +52 -0
  78. mindspore/experimental/llm_boost/atb/boost_base.py +2 -3
  79. mindspore/experimental/llm_boost/atb/llama_boost.py +6 -1
  80. mindspore/experimental/llm_boost/register.py +1 -0
  81. mindspore/experimental/optim/adadelta.py +26 -22
  82. mindspore/experimental/optim/adam.py +3 -0
  83. mindspore/experimental/optim/lr_scheduler.py +33 -24
  84. mindspore/experimental/optim/radam.py +33 -30
  85. mindspore/hal/device.py +28 -0
  86. mindspore/hal/event.py +17 -0
  87. mindspore/hal/memory.py +94 -3
  88. mindspore/hal/stream.py +91 -6
  89. mindspore/include/api/context.h +0 -1
  90. mindspore/lib/libavcodec.so.59 +0 -0
  91. mindspore/lib/libavdevice.so.59 +0 -0
  92. mindspore/lib/libavfilter.so.8 +0 -0
  93. mindspore/lib/libavformat.so.59 +0 -0
  94. mindspore/lib/libavutil.so.57 +0 -0
  95. mindspore/lib/libdnnl.so.2 +0 -0
  96. mindspore/lib/libicuuc.so.69 +0 -0
  97. mindspore/lib/libmindspore_backend.so +0 -0
  98. mindspore/lib/libmindspore_common.so +0 -0
  99. mindspore/lib/libmindspore_core.so +0 -0
  100. mindspore/lib/libmindspore_glog.so.0 +0 -0
  101. mindspore/lib/libmindspore_gpr.so.15 +0 -0
  102. mindspore/lib/libmindspore_grpc++.so.1 +0 -0
  103. mindspore/lib/libmindspore_grpc.so.15 +0 -0
  104. mindspore/lib/libmindspore_ops.so +0 -0
  105. mindspore/lib/libmpi_adapter.so +0 -0
  106. mindspore/lib/libmpi_collective.so +0 -0
  107. mindspore/lib/libnnacl.so +0 -0
  108. mindspore/lib/libopencv_core.so.4.5 +0 -0
  109. mindspore/lib/libopencv_imgproc.so.4.5 +0 -0
  110. mindspore/lib/libps_cache.so +0 -0
  111. mindspore/lib/libswresample.so.4 +0 -0
  112. mindspore/lib/libswscale.so.6 +0 -0
  113. mindspore/lib/plugin/ascend/custom_aicore_ops/op_impl/ai_core/tbe/config/ascend910_93/aic-ascend910_93-ops-info.json +2048 -0
  114. mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so +0 -0
  115. mindspore/lib/plugin/ascend/custom_aicpu_ops/op_proto/libcust_op_proto.so +0 -0
  116. mindspore/lib/plugin/ascend/custom_ascendc_910/op_api/lib/libcust_opapi.so +0 -0
  117. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl/dynamic/decoder_kv_cache.py +1 -1
  118. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/custom_ascendc_910_impl/dynamic/prompt_kv_cache.py +1 -1
  119. 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
  120. mindspore/lib/plugin/ascend/custom_ascendc_910/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
  121. mindspore/lib/plugin/ascend/custom_ascendc_910/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
  122. mindspore/lib/plugin/ascend/custom_ascendc_910/version.info +1 -1
  123. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_api/lib/libcust_opapi.so +0 -0
  124. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/config/ascend910_93/aic-ascend910_93-ops-info.json +224 -0
  125. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/all_finite.py +1 -1
  126. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/decoder_kv_cache.py +1 -1
  127. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/custom_ascendc_910b_impl/dynamic/prompt_kv_cache.py +1 -1
  128. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.json +78 -0
  129. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_52f59e2a65d9b1bb002de35c2819754a.o +0 -0
  130. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.json +78 -0
  131. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_6b5e50e30256d85838d6ce83514df20f.o +0 -0
  132. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.json +78 -0
  133. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/all_finite/AllFinite_74e4ac02880d452e3308c94af273562e.o +0 -0
  134. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.json +156 -0
  135. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_0d5520cc587ad44ce634bf3fbcffc272.o +0 -0
  136. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.json +156 -0
  137. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_20390d30b3c4c0d23167ccca6c030c2b.o +0 -0
  138. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.json +156 -0
  139. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_2d151f0b1d2db51faa2968d5b67544e2.o +0 -0
  140. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.json +156 -0
  141. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_561690ec17cc1def3d2fcf68c1b07b56.o +0 -0
  142. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.json +156 -0
  143. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_570f9aaa99e5e773b3dd0a33784363f4.o +0 -0
  144. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.json +156 -0
  145. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_59668a0f0764afb98fda8ab9e84126f1.o +0 -0
  146. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.json +156 -0
  147. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_91d9833e4792b70b670e4e2b916abd86.o +0 -0
  148. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.json +156 -0
  149. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/decoder_kv_cache/DecoderKvCache_c74cdc5fef094383401856f8519504af.o +0 -0
  150. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.json +165 -0
  151. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_0515c7b1a4cd614449e38c5e9a7e3f8d.o +0 -0
  152. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.json +165 -0
  153. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_09f22d898d6358c91e7c4fc48bac48e7.o +0 -0
  154. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.json +165 -0
  155. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_0cb9a6f894b925250227136e5aab7061.o +0 -0
  156. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.json +165 -0
  157. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_2fa8702ffd7ca85e9e194f62644415d5.o +0 -0
  158. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.json +165 -0
  159. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_570b62f187dfd439b64613d881deedb7.o +0 -0
  160. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.json +165 -0
  161. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_585218c11411ff84709b9e725b66c435.o +0 -0
  162. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.json +165 -0
  163. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_5c9365ccde170b358c5b126d69dae13e.o +0 -0
  164. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.json +165 -0
  165. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/ascend910_93/prompt_kv_cache/PromptKvCache_6d97c45b7c43bc16fcff8baa5dacac4e.o +0 -0
  166. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910_93/all_finite.json +139 -0
  167. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910_93/binary_info_config.json +361 -0
  168. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910_93/decoder_kv_cache.json +892 -0
  169. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/kernel/config/ascend910_93/prompt_kv_cache.json +892 -0
  170. 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
  171. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_impl/ai_core/tbe/op_tiling/liboptiling.so +0 -0
  172. mindspore/lib/plugin/ascend/custom_ascendc_910b/op_proto/lib/linux/x86_64/libcust_opsproto_rt2.0.so +0 -0
  173. mindspore/lib/plugin/ascend/custom_ascendc_910b/version.info +1 -1
  174. mindspore/lib/plugin/ascend/custom_compiler/setup.py +1 -1
  175. mindspore/lib/plugin/ascend/libascend_collective.so +0 -0
  176. mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
  177. mindspore/lib/plugin/ascend/liblowlatency_collective.so +0 -0
  178. mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
  179. mindspore/lib/plugin/ascend/libmindspore_internal_kernels.so +0 -0
  180. mindspore/lib/plugin/ascend/libms_ascend_native_boost.so +0 -0
  181. mindspore/lib/plugin/ascend/libms_atb_boost.so +0 -0
  182. mindspore/lib/plugin/ascend/ms_kernels_internal/asdops/device/ascend910b/bin/ascend910b.bin +960 -958
  183. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/{acme/include/base_type.h → base_type.h} +25 -20
  184. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/{cast/cast_tiling.h → internal.h} +6 -4
  185. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/internal_op.h +114 -0
  186. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/llm/boost_kernel.h +70 -0
  187. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/llm/llama_impl.h +85 -0
  188. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/llm/model_interface.h +52 -0
  189. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/llm/tensor.h +81 -0
  190. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/op_creator.h +123 -0
  191. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/op_param.h +155 -110
  192. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/{acme/include/tiling_info.h → tiling_info.h} +12 -9
  193. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/tiling_utils.h +178 -0
  194. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_layer_norm_op.so +0 -0
  195. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_op.so +0 -0
  196. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_quant_op.so +0 -0
  197. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_310p_op.so +0 -0
  198. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_op.so +0 -0
  199. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libcast_op.so +0 -0
  200. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libcompare_op.so +0 -0
  201. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libgelu_op.so +0 -0
  202. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libllama_op.so +0 -0
  203. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libmatmul_op.so +0 -0
  204. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libms_kernels_internal.so +0 -0
  205. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libms_optiling.so +0 -0
  206. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libmulti_weight_matmul_kernel_op.so +0 -0
  207. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_nz_op.so +0 -0
  208. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_op.so +0 -0
  209. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/librms_norm_op.so +0 -0
  210. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_f16_nz/internal_pp_matmul_f16_nz.o +0 -0
  211. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_f16_nz/internal_pp_matmul_f16_nz_0.o +0 -0
  212. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_i8_nz_compress/internal_pp_matmul_i8_nz_compress.o +0 -0
  213. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_i8_nz_compress/internal_pp_matmul_i8_nz_compress_0.o +0 -0
  214. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_int8_nz/internal_pp_matmul_int8_nz.o +0 -0
  215. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/object_kernels/internal_pp_matmul_int8_nz/internal_pp_matmul_int8_nz_0.o +0 -0
  216. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libadd_rms_norm_quant_ascend310p.so +0 -0
  217. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libapply_rotary_pos_emb_310p_impl.so → op_kernels/ascend310p/so_kernels/libapply_rotary_pos_emb_310p_ascend310p.so} +0 -0
  218. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libcast_ascend310p.so +0 -0
  219. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libcompare_ascend310p.so +0 -0
  220. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libgelu_ascend310p.so +0 -0
  221. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libmatmul_ascend310p.so +0 -0
  222. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend310p/so_kernels/libreshape_and_cache_nz_ascend310p.so +0 -0
  223. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/hphol_kernels/add_rms_norm_dynamic_quant/AddRmsNormDynamicQuant_4b60f88cdc28b25a36bad2d8b0a88092.json +163 -0
  224. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/hphol_kernels/add_rms_norm_dynamic_quant/AddRmsNormDynamicQuant_4b60f88cdc28b25a36bad2d8b0a88092.o +0 -0
  225. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/hphol_kernels/add_rms_norm_dynamic_quant/AddRmsNormDynamicQuant_cde61da2bd6fededcb1ba310a6ad16ee.json +163 -0
  226. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/hphol_kernels/add_rms_norm_dynamic_quant/AddRmsNormDynamicQuant_cde61da2bd6fededcb1ba310a6ad16ee.o +0 -0
  227. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_bf16_bnsd_full_mix.o +0 -0
  228. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_bf16_bnsd_tri_mix.o +0 -0
  229. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_bf16_bsh_full_mix.o +0 -0
  230. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_bf16_bsh_tri_mix.o +0 -0
  231. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_fp16_bnsd_full_mix.o +0 -0
  232. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_fp16_bnsd_tri_mix.o +0 -0
  233. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_fp16_bsh_full_mix.o +0 -0
  234. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/flash_attention_score/flash_attention_score_fp16_bsh_tri_mix.o +0 -0
  235. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_matmul_postfusion_mix/internal_matmul_postfusion_mix.o +0 -0
  236. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_matmul_postfusion_mix/internal_matmul_postfusion_mix_mix_aic_0.o +0 -0
  237. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_matmul_postfusion_mix/internal_matmul_postfusion_mix_mix_aiv_0.o +0 -0
  238. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_multi_weight_matmul_postfusion_mix/internal_multi_weight_matmul_postfusion_mix.o +0 -0
  239. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_multi_weight_matmul_postfusion_mix/internal_multi_weight_matmul_postfusion_mix_mix_aic_0.o +0 -0
  240. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/internal_multi_weight_matmul_postfusion_mix/internal_multi_weight_matmul_postfusion_mix_mix_aiv_0.o +0 -0
  241. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_bf16.o +0 -0
  242. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp16.o +0 -0
  243. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp32.o +0 -0
  244. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_bf16.o +0 -0
  245. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp16.o +0 -0
  246. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp32.o +0 -0
  247. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/paged_attention_v2/paged_attention_v2.o +0 -0
  248. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/paged_attention_v2/paged_attention_v2_mix_aic_0.o +0 -0
  249. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/object_kernels/paged_attention_v2/paged_attention_v2_mix_aiv_0.o +0 -0
  250. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/so_kernels/libadd_layer_norm_ascend910b.so +0 -0
  251. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libadd_rms_norm_impl.so → op_kernels/ascend910b/so_kernels/libadd_rms_norm_ascend910b.so} +0 -0
  252. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/so_kernels/libadd_rms_norm_quant_ascend910b.so +0 -0
  253. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libapply_rotary_pos_emb_impl.so → op_kernels/ascend910b/so_kernels/libapply_rotary_pos_emb_ascend910b.so} +0 -0
  254. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libcast_impl.so → op_kernels/ascend910b/so_kernels/libcast_ascend910b.so} +0 -0
  255. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libnot_equal_impl.so → op_kernels/ascend910b/so_kernels/libcompare_ascend910b.so} +0 -0
  256. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libgelu_impl.so → op_kernels/ascend910b/so_kernels/libgelu_ascend910b.so} +0 -0
  257. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/so_kernels/libllama_ascend910b.so +0 -0
  258. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libmatmul_impl.so → op_kernels/ascend910b/so_kernels/libmatmul_ascend910b.so} +0 -0
  259. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libmulti_weight_matmul_kernel_impl.so → op_kernels/ascend910b/so_kernels/libmulti_weight_matmul_kernel_ascend910b.so} +0 -0
  260. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/libreshape_and_cache_impl.so → op_kernels/ascend910b/so_kernels/libreshape_and_cache_ascend910b.so} +0 -0
  261. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/{lib/librms_norm_impl.so → op_kernels/ascend910b/so_kernels/librms_norm_ascend910b.so} +0 -0
  262. mindspore/lib/plugin/ascend/ms_kernels_internal/lccl/lib/liblccl_wrapper.so +0 -0
  263. mindspore/lib/plugin/gpu/libcuda_ops.so.10 +0 -0
  264. mindspore/lib/plugin/gpu/libcuda_ops.so.11 +0 -0
  265. mindspore/lib/plugin/gpu10.1/libnccl.so.2 +0 -0
  266. mindspore/lib/plugin/gpu10.1/libnvidia_collective.so +0 -0
  267. mindspore/lib/plugin/gpu11.1/libnccl.so.2 +0 -0
  268. mindspore/lib/plugin/gpu11.1/libnvidia_collective.so +0 -0
  269. mindspore/lib/plugin/gpu11.6/libnccl.so.2 +0 -0
  270. mindspore/lib/plugin/gpu11.6/libnvidia_collective.so +0 -0
  271. mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
  272. mindspore/lib/plugin/libmindspore_gpu.so.10.1 +0 -0
  273. mindspore/lib/plugin/libmindspore_gpu.so.11.1 +0 -0
  274. mindspore/lib/plugin/libmindspore_gpu.so.11.6 +0 -0
  275. mindspore/log.py +12 -0
  276. mindspore/mindrecord/__init__.py +1 -1
  277. mindspore/mindrecord/config.py +17 -316
  278. mindspore/mindrecord/filereader.py +1 -9
  279. mindspore/mindrecord/filewriter.py +5 -15
  280. mindspore/mindrecord/mindpage.py +1 -9
  281. mindspore/mint/__init__.py +824 -218
  282. mindspore/mint/distributed/__init__.py +66 -4
  283. mindspore/mint/distributed/distributed.py +2594 -44
  284. mindspore/mint/linalg/__init__.py +6 -0
  285. mindspore/mint/nn/__init__.py +473 -14
  286. mindspore/mint/nn/functional.py +486 -11
  287. mindspore/mint/nn/layer/__init__.py +17 -4
  288. mindspore/mint/nn/layer/_functions.py +330 -0
  289. mindspore/mint/nn/layer/activation.py +169 -1
  290. mindspore/mint/nn/layer/basic.py +123 -0
  291. mindspore/mint/nn/layer/conv.py +727 -0
  292. mindspore/mint/nn/layer/normalization.py +215 -19
  293. mindspore/mint/nn/layer/padding.py +797 -0
  294. mindspore/mint/nn/layer/pooling.py +170 -0
  295. mindspore/mint/optim/__init__.py +2 -1
  296. mindspore/mint/optim/adam.py +223 -0
  297. mindspore/mint/optim/adamw.py +26 -19
  298. mindspore/mint/special/__init__.py +2 -1
  299. mindspore/multiprocessing/__init__.py +5 -0
  300. mindspore/nn/cell.py +126 -19
  301. mindspore/nn/dynamic_lr.py +2 -1
  302. mindspore/nn/layer/activation.py +6 -6
  303. mindspore/nn/layer/basic.py +35 -25
  304. mindspore/nn/layer/channel_shuffle.py +3 -3
  305. mindspore/nn/layer/embedding.py +3 -3
  306. mindspore/nn/layer/normalization.py +8 -7
  307. mindspore/nn/layer/padding.py +4 -3
  308. mindspore/nn/layer/pooling.py +47 -13
  309. mindspore/nn/layer/rnn_cells.py +1 -1
  310. mindspore/nn/layer/rnns.py +2 -1
  311. mindspore/nn/layer/timedistributed.py +5 -5
  312. mindspore/nn/layer/transformer.py +48 -26
  313. mindspore/nn/learning_rate_schedule.py +5 -3
  314. mindspore/nn/loss/loss.py +31 -36
  315. mindspore/nn/optim/ada_grad.py +1 -0
  316. mindspore/nn/optim/adadelta.py +2 -2
  317. mindspore/nn/optim/adam.py +1 -1
  318. mindspore/nn/optim/lars.py +1 -4
  319. mindspore/nn/optim/optimizer.py +1 -1
  320. mindspore/nn/optim/rprop.py +2 -2
  321. mindspore/nn/optim/thor.py +2 -1
  322. mindspore/nn/utils/init.py +13 -11
  323. mindspore/nn/wrap/cell_wrapper.py +4 -6
  324. mindspore/nn/wrap/loss_scale.py +3 -4
  325. mindspore/numpy/array_creations.py +60 -62
  326. mindspore/numpy/array_ops.py +148 -143
  327. mindspore/numpy/logic_ops.py +41 -42
  328. mindspore/numpy/math_ops.py +361 -359
  329. mindspore/numpy/utils.py +16 -16
  330. mindspore/numpy/utils_const.py +4 -4
  331. mindspore/ops/__init__.py +2 -1
  332. mindspore/ops/_grad_experimental/grad_comm_ops.py +94 -13
  333. mindspore/ops/_grad_experimental/grad_debug_ops.py +6 -1
  334. mindspore/ops/_grad_experimental/grad_inner_ops.py +9 -0
  335. mindspore/ops/_grad_experimental/grad_math_ops.py +2 -1
  336. mindspore/ops/_op_impl/cpu/__init__.py +1 -0
  337. mindspore/ops/_op_impl/cpu/raise_op.py +28 -0
  338. mindspore/ops/_vmap/vmap_array_ops.py +20 -19
  339. mindspore/ops/_vmap/vmap_base.py +0 -2
  340. mindspore/ops/_vmap/vmap_grad_nn_ops.py +19 -13
  341. mindspore/ops/_vmap/vmap_math_ops.py +11 -9
  342. mindspore/ops/_vmap/vmap_nn_ops.py +20 -34
  343. mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +149 -12
  344. mindspore/ops/auto_generate/gen_arg_handler.py +0 -61
  345. mindspore/ops/auto_generate/gen_extend_func.py +554 -60
  346. mindspore/ops/auto_generate/gen_ops_def.py +1621 -115
  347. mindspore/ops/auto_generate/gen_ops_prim.py +8024 -3409
  348. mindspore/ops/auto_generate/pyboost_inner_prim.py +183 -79
  349. mindspore/ops/composite/base.py +1 -1
  350. mindspore/ops/composite/multitype_ops/_compile_utils.py +229 -30
  351. mindspore/ops/composite/multitype_ops/pow_impl.py +0 -29
  352. mindspore/ops/function/__init__.py +12 -0
  353. mindspore/ops/function/array_func.py +561 -159
  354. mindspore/ops/function/clip_func.py +64 -0
  355. mindspore/ops/function/debug_func.py +28 -20
  356. mindspore/ops/function/image_func.py +1 -1
  357. mindspore/ops/function/linalg_func.py +5 -4
  358. mindspore/ops/function/math_func.py +1659 -290
  359. mindspore/ops/function/nn_func.py +988 -317
  360. mindspore/ops/function/parameter_func.py +3 -56
  361. mindspore/ops/function/random_func.py +243 -33
  362. mindspore/ops/function/sparse_unary_func.py +1 -1
  363. mindspore/ops/functional.py +18 -5
  364. mindspore/ops/functional_overload.py +897 -0
  365. mindspore/ops/operations/__init__.py +3 -2
  366. mindspore/ops/operations/_embedding_cache_ops.py +4 -4
  367. mindspore/ops/operations/_grad_ops.py +2 -34
  368. mindspore/ops/operations/_infer_ops.py +2 -1
  369. mindspore/ops/operations/_inner_ops.py +38 -8
  370. mindspore/ops/operations/array_ops.py +45 -303
  371. mindspore/ops/operations/comm_ops.py +19 -16
  372. mindspore/ops/operations/custom_ops.py +11 -55
  373. mindspore/ops/operations/debug_ops.py +42 -47
  374. mindspore/ops/operations/inner_ops.py +6 -4
  375. mindspore/ops/operations/linalg_ops.py +3 -2
  376. mindspore/ops/operations/manually_defined/ops_def.py +185 -104
  377. mindspore/ops/operations/math_ops.py +11 -216
  378. mindspore/ops/operations/nn_ops.py +146 -308
  379. mindspore/ops/primitive.py +23 -21
  380. mindspore/ops/tensor_method.py +1669 -0
  381. mindspore/ops_generate/aclnn_kernel_register_auto_cc_generator.py +110 -0
  382. mindspore/ops_generate/add_tensor_docs_generator.py +54 -0
  383. mindspore/ops_generate/arg_handler.py +0 -61
  384. mindspore/ops_generate/auto_grad_impl_cc_generator.py +135 -0
  385. mindspore/ops_generate/auto_grad_reg_cc_generator.py +93 -0
  386. mindspore/ops_generate/base_generator.py +11 -0
  387. mindspore/ops_generate/cpp_create_prim_instance_helper_generator.py +108 -0
  388. mindspore/ops_generate/functional_map_cpp_generator.py +491 -0
  389. mindspore/ops_generate/functional_overload_py_generator.py +110 -0
  390. mindspore/ops_generate/functions_cc_generator.py +233 -0
  391. mindspore/ops_generate/gen_aclnn_implement.py +110 -114
  392. mindspore/ops_generate/gen_constants.py +157 -3
  393. mindspore/ops_generate/gen_ops.py +245 -990
  394. mindspore/ops_generate/gen_pyboost_func.py +97 -998
  395. mindspore/ops_generate/gen_utils.py +119 -33
  396. mindspore/ops_generate/lite_ops_cpp_generator.py +155 -0
  397. mindspore/ops_generate/op_api_proto.py +206 -0
  398. mindspore/ops_generate/op_def_py_generator.py +131 -0
  399. mindspore/ops_generate/op_prim_py_generator.py +480 -0
  400. mindspore/ops_generate/op_proto.py +373 -108
  401. mindspore/ops_generate/op_template_parser.py +436 -0
  402. mindspore/ops_generate/ops_def_cc_generator.py +288 -0
  403. mindspore/ops_generate/ops_def_h_generator.py +74 -0
  404. mindspore/ops_generate/ops_name_h_generator.py +68 -0
  405. mindspore/ops_generate/ops_primitive_h_generator.py +81 -0
  406. mindspore/ops_generate/pyboost_functions_cpp_generator.py +370 -0
  407. mindspore/ops_generate/pyboost_functions_h_generator.py +68 -0
  408. mindspore/ops_generate/pyboost_functions_py_generator.py +148 -0
  409. mindspore/ops_generate/pyboost_grad_function_cpp_generator.py +154 -0
  410. mindspore/ops_generate/pyboost_inner_prim_generator.py +131 -0
  411. mindspore/ops_generate/pyboost_native_grad_functions_generator.py +268 -0
  412. mindspore/ops_generate/pyboost_op_cpp_code_generator.py +851 -0
  413. mindspore/ops_generate/pyboost_overload_functions_cpp_generator.py +344 -0
  414. mindspore/ops_generate/pyboost_utils.py +92 -33
  415. mindspore/ops_generate/template.py +294 -44
  416. mindspore/ops_generate/tensor_func_reg_cpp_generator.py +422 -0
  417. mindspore/parallel/__init__.py +3 -3
  418. mindspore/parallel/_auto_parallel_context.py +24 -33
  419. mindspore/parallel/_parallel_serialization.py +13 -2
  420. mindspore/parallel/_utils.py +4 -1
  421. mindspore/parallel/algo_parameter_config.py +1 -1
  422. mindspore/parallel/checkpoint_transform.py +44 -0
  423. mindspore/parallel/cluster/process_entity/_api.py +131 -37
  424. mindspore/parallel/cluster/process_entity/_utils.py +41 -6
  425. mindspore/parallel/cluster/run.py +20 -3
  426. mindspore/parallel/parameter_broadcast.py +1 -1
  427. mindspore/parallel/shard.py +3 -0
  428. mindspore/parallel/transform_safetensors.py +119 -253
  429. mindspore/profiler/__init__.py +17 -4
  430. mindspore/profiler/analysis/__init__.py +0 -0
  431. mindspore/profiler/analysis/parser/__init__.py +0 -0
  432. mindspore/profiler/analysis/parser/ascend_cann_parser.py +166 -0
  433. mindspore/profiler/analysis/parser/base_parser.py +158 -0
  434. mindspore/profiler/analysis/parser/framework_cann_relation_parser.py +45 -0
  435. mindspore/profiler/analysis/parser/ms_framework_parser.py +142 -0
  436. mindspore/profiler/analysis/parser/ms_minddata_parser.py +145 -0
  437. mindspore/profiler/analysis/parser/timeline_assembly_factory/__init__.py +0 -0
  438. mindspore/profiler/analysis/parser/timeline_assembly_factory/ascend_timeline_assembler.py +261 -0
  439. mindspore/profiler/analysis/parser/timeline_assembly_factory/base_timeline_assembler.py +40 -0
  440. mindspore/profiler/analysis/parser/timeline_assembly_factory/trace_view_container.py +84 -0
  441. mindspore/profiler/analysis/parser/timeline_creator/__init__.py +0 -0
  442. mindspore/profiler/analysis/parser/timeline_creator/base_timeline_creator.py +44 -0
  443. mindspore/profiler/analysis/parser/timeline_creator/cpu_op_timeline_creator.py +90 -0
  444. mindspore/profiler/analysis/parser/timeline_creator/fwk_timeline_creator.py +76 -0
  445. mindspore/profiler/analysis/parser/timeline_creator/msprof_timeline_creator.py +103 -0
  446. mindspore/profiler/analysis/parser/timeline_creator/scope_layer_timeline_creator.py +134 -0
  447. mindspore/profiler/analysis/parser/timeline_event/__init__.py +0 -0
  448. mindspore/profiler/analysis/parser/timeline_event/base_event.py +233 -0
  449. mindspore/profiler/analysis/parser/timeline_event/cpu_op_event.py +47 -0
  450. mindspore/profiler/analysis/parser/timeline_event/flow_event.py +36 -0
  451. mindspore/profiler/analysis/parser/timeline_event/fwk_event.py +260 -0
  452. mindspore/profiler/analysis/parser/timeline_event/msprof_event.py +73 -0
  453. mindspore/profiler/analysis/parser/timeline_event/scope_layer_event.py +53 -0
  454. mindspore/profiler/analysis/parser/timeline_event/timeline_event_pool.py +146 -0
  455. mindspore/profiler/analysis/task_manager.py +131 -0
  456. mindspore/profiler/analysis/time_converter.py +84 -0
  457. mindspore/profiler/analysis/viewer/__init__.py +0 -0
  458. mindspore/profiler/analysis/viewer/ascend_communication_viewer.py +333 -0
  459. mindspore/profiler/analysis/viewer/ascend_integrate_viewer.py +87 -0
  460. mindspore/profiler/analysis/viewer/ascend_kernel_details_viewer.py +252 -0
  461. mindspore/profiler/analysis/viewer/ascend_memory_viewer.py +313 -0
  462. mindspore/profiler/analysis/viewer/ascend_op_memory_viewer.py +322 -0
  463. mindspore/profiler/analysis/viewer/ascend_step_trace_time_viewer.py +265 -0
  464. mindspore/profiler/analysis/viewer/ascend_timeline_viewer.py +58 -0
  465. mindspore/profiler/analysis/viewer/base_viewer.py +26 -0
  466. mindspore/profiler/analysis/viewer/ms_dataset_viewer.py +97 -0
  467. mindspore/profiler/analysis/viewer/ms_minddata_viewer.py +581 -0
  468. mindspore/profiler/analysis/work_flow.py +73 -0
  469. mindspore/profiler/common/ascend_msprof_exporter.py +138 -0
  470. mindspore/profiler/common/command_executor.py +90 -0
  471. mindspore/profiler/common/constant.py +174 -3
  472. mindspore/profiler/common/file_manager.py +208 -0
  473. mindspore/profiler/common/log.py +130 -0
  474. mindspore/profiler/common/msprof_cmd_tool.py +202 -0
  475. mindspore/profiler/common/path_manager.py +371 -0
  476. mindspore/profiler/common/process_bar.py +168 -0
  477. mindspore/profiler/common/process_pool.py +9 -3
  478. mindspore/profiler/common/profiler_context.py +476 -0
  479. mindspore/profiler/common/profiler_info.py +304 -0
  480. mindspore/profiler/common/profiler_output_path.py +284 -0
  481. mindspore/profiler/common/profiler_parameters.py +210 -0
  482. mindspore/profiler/common/profiler_path_manager.py +120 -0
  483. mindspore/profiler/common/record_function.py +76 -0
  484. mindspore/profiler/common/tlv_decoder.py +76 -0
  485. mindspore/profiler/common/util.py +75 -2
  486. mindspore/profiler/dynamic_profiler.py +270 -37
  487. mindspore/profiler/envprofiler.py +138 -0
  488. mindspore/profiler/mstx.py +199 -0
  489. mindspore/profiler/platform/__init__.py +21 -0
  490. mindspore/profiler/platform/base_profiler.py +40 -0
  491. mindspore/profiler/platform/cpu_profiler.py +124 -0
  492. mindspore/profiler/platform/gpu_profiler.py +74 -0
  493. mindspore/profiler/platform/npu_profiler.py +309 -0
  494. mindspore/profiler/profiler.py +580 -93
  495. mindspore/profiler/profiler_action_controller.py +187 -0
  496. mindspore/profiler/profiler_interface.py +114 -0
  497. mindspore/profiler/schedule.py +208 -0
  498. mindspore/rewrite/api/symbol_tree.py +1 -2
  499. mindspore/run_check/_check_version.py +2 -6
  500. mindspore/runtime/__init__.py +37 -0
  501. mindspore/runtime/device.py +27 -0
  502. mindspore/runtime/event.py +209 -0
  503. mindspore/runtime/executor.py +148 -0
  504. mindspore/runtime/memory.py +392 -0
  505. mindspore/runtime/stream.py +460 -0
  506. mindspore/runtime/thread_bind_core.py +401 -0
  507. mindspore/train/__init__.py +2 -2
  508. mindspore/train/_utils.py +53 -18
  509. mindspore/train/amp.py +8 -4
  510. mindspore/train/callback/_checkpoint.py +32 -18
  511. mindspore/train/callback/_early_stop.py +1 -1
  512. mindspore/train/callback/_flops_collector.py +105 -69
  513. mindspore/train/callback/_history.py +1 -1
  514. mindspore/train/callback/_summary_collector.py +44 -6
  515. mindspore/train/callback/_tft_register.py +31 -10
  516. mindspore/train/dataset_helper.py +11 -11
  517. mindspore/train/metrics/precision.py +4 -5
  518. mindspore/train/mind_ir_pb2.py +167 -46
  519. mindspore/train/model.py +13 -15
  520. mindspore/train/serialization.py +462 -76
  521. mindspore/train/summary/summary_record.py +1 -2
  522. mindspore/train/train_thor/model_thor.py +1 -1
  523. mindspore/utils/__init__.py +4 -2
  524. mindspore/utils/bin/dataset-cache +0 -0
  525. mindspore/utils/bin/dataset-cache-server +0 -0
  526. mindspore/utils/dryrun.py +138 -0
  527. mindspore/utils/runtime_execution_order_check.py +550 -0
  528. mindspore/version.py +1 -1
  529. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/METADATA +2 -3
  530. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/RECORD +533 -467
  531. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/entry_points.txt +1 -1
  532. mindspore/_data_dump.cpython-311-x86_64-linux-gnu.so +0 -0
  533. mindspore/bin/cache_admin +0 -0
  534. mindspore/bin/cache_server +0 -0
  535. mindspore/common/_tensor_overload.py +0 -139
  536. mindspore/lib/libmindspore_np_dtype.so +0 -0
  537. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme.h +0 -24
  538. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/acme_op.h +0 -82
  539. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/op_creator.h +0 -113
  540. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/include/op_param.h +0 -193
  541. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/dtype_registry.h +0 -90
  542. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/kernel_register.h +0 -46
  543. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/platform/platform_configs.h +0 -89
  544. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/core/platform/rt_funcs.h +0 -135
  545. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/add_layer_norm_op.h +0 -60
  546. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/add_rms_norm_op.h +0 -50
  547. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/add_rms_norm_quant_op.h +0 -50
  548. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/apply_rotary_pos_emb_nz_op.h +0 -42
  549. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/apply_rotary_pos_emb_op.h +0 -55
  550. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_elewise_op.h +0 -34
  551. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_only_ops.h +0 -94
  552. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/asd_op_base.h +0 -97
  553. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/cast_op.h +0 -52
  554. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/flash_attention_score_op.h +0 -97
  555. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/gelu_op.h +0 -44
  556. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/matmul_add_rmsnorm_op.h +0 -73
  557. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/matmul_op.h +0 -108
  558. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/multi_impls_op.h +0 -64
  559. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/multi_weight_matmul_op.h +0 -91
  560. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/paged_attention_op.h +0 -99
  561. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/reshape_and_cache_nz_op.h +0 -44
  562. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/reshape_and_cache_op.h +0 -44
  563. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/ops/host_src/rms_norm_op.h +0 -64
  564. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/utils/asd_utils.h +0 -179
  565. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/utils/comm_utils.h +0 -69
  566. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/acme/src/utils/profiling_util.h +0 -366
  567. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/add/add_impl.h +0 -56
  568. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/add/kernel/add.h +0 -21
  569. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/add/tiling/add_tiling.h +0 -43
  570. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/apply_rotary_pos_emb_impl.h +0 -46
  571. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb.h +0 -23
  572. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_base.h +0 -456
  573. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_bf16.h +0 -217
  574. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_fp.h +0 -391
  575. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_fp16.h +0 -126
  576. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_fp32.h +0 -230
  577. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_tiling.h +0 -43
  578. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb/kernel/apply_rotary_pos_emb_value.h +0 -27
  579. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/apply_rotary_pos_emb_nz_impl.h +0 -34
  580. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz.h +0 -23
  581. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz_base.h +0 -460
  582. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz_fp16.h +0 -116
  583. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz_fp32.h +0 -230
  584. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz_tiling.h +0 -43
  585. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/apply_rotary_pos_emb_nz/kernel/apply_rotary_pos_emb_nz_value.h +0 -27
  586. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/asdop/asd_op_impl.h +0 -74
  587. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/backend_param.h +0 -74
  588. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/cast/cast_impl.h +0 -48
  589. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/cast/kernel/cast_kernel.h +0 -21
  590. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/compare/compare_impl.h +0 -55
  591. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/compare/compare_tiling.h +0 -27
  592. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/compare/kernel/compare_kernel.h +0 -23
  593. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/and_impl.h +0 -29
  594. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/div_impl.h +0 -29
  595. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/elewise_binary_impl.h +0 -48
  596. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/elewise_binary_tiling.h +0 -25
  597. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/and_kernel.h +0 -46
  598. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/div_kernel.h +0 -46
  599. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/elewise_binary_base.h +0 -260
  600. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/elewise_binary_kernel.h +0 -35
  601. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/max_kernel.h +0 -66
  602. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/min_kernel.h +0 -66
  603. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/mul_kernel.h +0 -66
  604. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/kernel/or_kernel.h +0 -46
  605. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/max_impl.h +0 -29
  606. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/min_impl.h +0 -29
  607. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/mul_impl.h +0 -29
  608. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_binary/or_impl.h +0 -29
  609. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/abs_impl.h +0 -29
  610. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/elewise_unary_impl.h +0 -47
  611. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/elewise_unary_tiling.h +0 -24
  612. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/exp_impl.h +0 -29
  613. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/abs_kernel.h +0 -45
  614. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/elewise_unary_base.h +0 -148
  615. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/elewise_unary_kernel.h +0 -31
  616. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/exp_kernel.h +0 -45
  617. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/ln_kernel.h +0 -45
  618. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/not_kernel.h +0 -45
  619. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/reciprocal_kernel.h +0 -45
  620. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/relu_kernel.h +0 -55
  621. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/rsqrt_kernel.h +0 -45
  622. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/kernel/sqrt_kernel.h +0 -45
  623. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/ln_impl.h +0 -29
  624. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/not_impl.h +0 -29
  625. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/reciprocal_impl.h +0 -29
  626. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/relu_impl.h +0 -29
  627. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/rsqrt_impl.h +0 -29
  628. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/elewise_unary/sqrt_impl.h +0 -29
  629. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/flash_attention_score/flash_attention_score_impl.h +0 -68
  630. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/internal_kernel.h +0 -99
  631. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/internal_rtbackend.h +0 -21
  632. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/lccl/lccl_wrapper.h +0 -58
  633. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/ms_int_types.h +0 -91
  634. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/ms_int_utils.h +0 -108
  635. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/paged_attention/paged_attention_impl.h +0 -64
  636. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/add_param.h +0 -68
  637. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/attention_param.h +0 -40
  638. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/cast_param.h +0 -30
  639. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/compare_param.h +0 -31
  640. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/elewise_param.h +0 -41
  641. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/grouped_matmul_param.h +0 -40
  642. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/matmul_ext_param.h +0 -38
  643. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/matmul_qkv_param.h +0 -42
  644. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/param/sub_param.h +0 -33
  645. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/profiling_util.h +0 -377
  646. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/reshape_and_cache_nz/kernel/reshape_and_cache_nz.h +0 -24
  647. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/reshape_and_cache_nz/reshape_and_cache_nz_impl.h +0 -42
  648. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/reshape_and_cache_nz/reshape_and_cache_nz_tiling.h +0 -27
  649. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/rms_norm/rms_norm_impl.h +0 -46
  650. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/sub/kernel/sub_kernel.h +0 -20
  651. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/sub/sub_impl.h +0 -48
  652. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/sub/sub_tiling.h +0 -25
  653. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/tune_repo/matmul_table.h +0 -399
  654. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/tune_repo/utils.h +0 -41
  655. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/backend.h +0 -45
  656. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/elewise_tiling.h +0 -29
  657. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/elewise_utils.h +0 -30
  658. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log.h +0 -69
  659. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_core.h +0 -43
  660. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_entity.h +0 -38
  661. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_sink.h +0 -69
  662. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_stream.h +0 -41
  663. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_tiling.h +0 -71
  664. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/log/log_utils.h +0 -165
  665. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/math.h +0 -20
  666. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/register/kernel_creator.h +0 -39
  667. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/register/kernel_registry.h +0 -121
  668. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/include/utils/utils.h +0 -106
  669. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libAdd_impl.so +0 -0
  670. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libSub_impl.so +0 -0
  671. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_layer_norm_impl.so +0 -0
  672. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libadd_rms_norm_quant_acme_impl.so +0 -0
  673. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_310p_old_impl.so +0 -0
  674. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libapply_rotary_pos_emb_old_impl.so +0 -0
  675. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_nz_impl.so +0 -0
  676. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/lib/libreshape_and_cache_nz_old_impl.so +0 -0
  677. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMatMulPostFusionMixTactic/acme_matmul_postfusion_mix.json +0 -19
  678. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMatMulPostFusionMixTactic/acme_matmul_postfusion_mix.o +0 -0
  679. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMatMulPostFusionMixTactic/acme_matmul_postfusion_mix_mix_aic_0.o +0 -0
  680. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMatMulPostFusionMixTactic/acme_matmul_postfusion_mix_mix_aiv_0.o +0 -0
  681. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMultiWeightMatMulPostFusionMixTactic/acme_multi_weight_matmul_postfusion_mix.json +0 -19
  682. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMultiWeightMatMulPostFusionMixTactic/acme_multi_weight_matmul_postfusion_mix.o +0 -0
  683. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMultiWeightMatMulPostFusionMixTactic/acme_multi_weight_matmul_postfusion_mix_mix_aic_0.o +0 -0
  684. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/AcmeMultiWeightMatMulPostFusionMixTactic/acme_multi_weight_matmul_postfusion_mix_mix_aiv_0.o +0 -0
  685. 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
  686. 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
  687. 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
  688. 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
  689. 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
  690. 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
  691. 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
  692. 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
  693. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_bf16.o +0 -0
  694. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp16.o +0 -0
  695. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_bf16_fp32.o +0 -0
  696. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_bf16.o +0 -0
  697. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp16.o +0 -0
  698. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/matmul_add_rmsnorm/matmul_add_rmsnorm_fp16_fp32.o +0 -0
  699. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bnsd_mix.o +0 -0
  700. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_bf16_bsh_mix.o +0 -0
  701. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bnsd_mix.o +0 -0
  702. mindspore/lib/plugin/ascend/ms_kernels_internal/internal_kernel/op_kernels/ascend910b/paged_attention/paged_attention_fp16_bsh_mix.o +0 -0
  703. mindspore/profiler/envprofiling.py +0 -254
  704. mindspore/profiler/profiling.py +0 -1926
  705. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/WHEEL +0 -0
  706. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Huawei Technologies Co., Ltd
1
+ # Copyright 2020-2024 Huawei Technologies Co., Ltd
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -31,15 +31,18 @@ from mindspore.ops.primitive import PrimitiveWithInfer
31
31
  from mindspore.ops.primitive import PrimitiveWithCheck
32
32
  from mindspore.ops.primitive import prim_attr_register
33
33
  from mindspore.run_check._check_version import AscendEnvChecker
34
- from ..auto_generate import (CeLU, Flatten, LogSoftmax, LogSoftmaxExt, ReLU, ReLU6, Dense, Tanh,
34
+ from mindspore._c_expression import pyboost_all_finite
35
+ from mindspore.common._stub_tensor import _convert_stub
36
+ from ..auto_generate import (CeLU, Flatten, LogSoftmax, LogSoftmaxExt, GLU, ReLU, ReLU6, Dense, Tanh,
35
37
  Elu, Sigmoid, Softmax, SoftplusExt, HSwish, HSigmoid, AvgPool, BiasAdd,
36
38
  NLLLoss, OneHot, GeLU, FastGeLU, PReLU, RmsNorm, IncreFlashAttention, MSELossExt,
37
39
  GridSampler3D, GridSampler2D, LayerNorm, LayerNormExt, HShrink, AdamWeightDecay, Dropout,
38
40
  ApplyRotaryPosEmb, PagedAttention, PagedAttentionMask, ReshapeAndCache,
39
- FlashAttentionScore, Embedding, UpsampleNearest1D, UpsampleNearest2D,
41
+ FlashAttentionScore, PromptFlashAttention, Embedding, UpsampleNearest1D, UpsampleNearest2D,
40
42
  UpsampleNearest3D, UpsampleTrilinear3D,
41
43
  UpsampleBilinear2D, UpsampleLinear1D,
42
- BinaryCrossEntropy, BCEWithLogitsLoss, SoftShrink)
44
+ BinaryCrossEntropy, BCEWithLogitsLoss, SoftShrink,
45
+ SmoothL1Loss)
43
46
  from .manually_defined import BatchNorm
44
47
 
45
48
 
@@ -612,12 +615,12 @@ class InstanceNorm(PrimitiveWithInfer):
612
615
  Inputs:
613
616
  - **input_x** (Tensor) - The input of InstanceNorm, Tensor of shape :math:`(N, C)`,
614
617
  data type: float16 or float32.
615
- - **gamma** (Parameter) - Scale, Tensor of shape :math:`(C,)`,
618
+ - **gamma** (Union[Parameter, Tensor])) - Scale, Tensor of shape :math:`(C,)`,
616
619
  data type: float32.
617
- - **beta** (Parameter) - Bias, Tensor of shape :math:`(C,)`,
620
+ - **beta** (Union[Parameter, Tensor])) - Bias, Tensor of shape :math:`(C,)`,
618
621
  data type: float32.
619
- - **mean** (Parameter) - Mean value, Tensor of shape :math:`(C,)`, data type: float32.
620
- - **variance** (Parameter) - Variance value, Tensor of shape :math:`(C,)`, data type: float32.
622
+ - **mean** (Union[Parameter, Tensor])) - Mean value, Tensor of shape :math:`(C,)`, data type: float32.
623
+ - **variance** (Union[Parameter, Tensor])) - Variance value, Tensor of shape :math:`(C,)`, data type: float32.
621
624
 
622
625
  Outputs:
623
626
  Tuple of 3 Tensors, the normalized input, the updated parameters.
@@ -2287,9 +2290,9 @@ class ApplyMomentum(Primitive):
2287
2290
  gradient_scale (float): The scale of the gradient. Default: ``1.0`` .
2288
2291
 
2289
2292
  Inputs:
2290
- - **variable** (Parameter) - Weights to be updated. Data type must be float64, int64, float, float16,
2291
- int16, int32, int8, uint16, uint32, uint64, uint8, complex64, complex128.
2292
- - **accumulation** (Parameter) - Accumulated gradient value by moment weight,
2293
+ - **variable** (Union[Parameter, Tensor]) - Weights to be updated. Data type must be float64, int64, float,
2294
+ float16, int16, int32, int8, uint16, uint32, uint64, uint8, complex64, complex128.
2295
+ - **accumulation** (Union[Parameter, Tensor]) - Accumulated gradient value by moment weight,
2293
2296
  has the same data type with `variable`.
2294
2297
  - **learning_rate** (Union[Number, Tensor]) - The learning rate value, must be a float64, int64, float,
2295
2298
  float16, int16, int32, int8, uint16, uint32, uint64, uint8, complex64, complex128 number or
@@ -2306,7 +2309,7 @@ class ApplyMomentum(Primitive):
2306
2309
 
2307
2310
  Raises:
2308
2311
  TypeError: If the `use_locking` or `use_nesterov` is not a bool or `gradient_scale` is not a float.
2309
- TypeError: If the data type of `var`, `accum` and `grad` conversion of Parameter is not supported.
2312
+ TypeError: If the data type of `var`, `accum` and `grad` conversion is not supported.
2310
2313
 
2311
2314
  Supported Platforms:
2312
2315
  ``Ascend`` ``GPU`` ``CPU``
@@ -2354,55 +2357,6 @@ class ApplyMomentum(Primitive):
2354
2357
  self.add_prim_attr('side_effect_mem', True)
2355
2358
 
2356
2359
 
2357
- class SmoothL1Loss(Primitive):
2358
- r"""
2359
- Calculate the smooth L1 loss, and the L1 loss function has robustness.
2360
-
2361
- Refer to :func:`mindspore.ops.smooth_l1_loss` for more details.
2362
-
2363
- Args:
2364
- beta (float, optional): A parameter used to control the point where the function will change between
2365
- L1 to L2 loss. The value should be greater than zero. Default: ``1.0`` .
2366
- reduction (str, optional): Apply specific reduction method to the output: ``'none'`` , ``'mean'`` ,
2367
- ``'sum'`` . Default: ``'none'`` .
2368
-
2369
- - ``'none'``: no reduction will be applied.
2370
- - ``'mean'``: compute and return the mean of elements in the output.
2371
- - ``'sum'``: the output elements will be summed.
2372
-
2373
- Inputs:
2374
- - **logits** (Tensor) - Input Tensor of any dimension. Data type must be float16, float32 or float64.
2375
- - **labels** (Tensor) - Ground truth data, has the same shape and dtype as the `logits`.
2376
-
2377
- Outputs:
2378
- Tensor, loss float tensor, same shape and dtype as the `logits`.
2379
-
2380
- Supported Platforms:
2381
- ``Ascend`` ``GPU`` ``CPU``
2382
-
2383
- Examples:
2384
- >>> import mindspore
2385
- >>> import numpy as np
2386
- >>> from mindspore import Tensor, ops
2387
- >>> loss = ops.SmoothL1Loss()
2388
- >>> logits = Tensor(np.array([1, 2, 3]), mindspore.float32)
2389
- >>> labels = Tensor(np.array([1, 2, 2]), mindspore.float32)
2390
- >>> output = loss(logits, labels)
2391
- >>> print(output)
2392
- [0. 0. 0.5]
2393
- """
2394
-
2395
- @prim_attr_register
2396
- def __init__(self, beta=1.0, reduction='none'):
2397
- """Initialize SmoothL1Loss."""
2398
- validator.check_value_type('beta', beta, [float], self.name)
2399
- validator.check('beta', beta, '', 0, validator.GT, self.name)
2400
- validator.check_string(
2401
- reduction, ['none', 'sum', 'mean'], 'reduction', self.name)
2402
- self.add_prim_attr('sigma', self.beta)
2403
- self.init_prim_io_names(inputs=['prediction', 'target'], outputs=['output'])
2404
-
2405
-
2406
2360
  class MultiMarginLoss(Primitive):
2407
2361
  r"""
2408
2362
  Creates a loss function that minimizes the hinge loss
@@ -3610,11 +3564,11 @@ class Adam(Primitive):
3610
3564
  If ``False`` , update the gradients without using NAG. Default: ``False`` .
3611
3565
 
3612
3566
  Inputs:
3613
- - **var** (Parameter) - Weights to be updated. The shape is :math:`(N, *)` where :math:`*` means,
3567
+ - **var** (Union[Parameter, Tensor]) - Weights to be updated. The shape is :math:`(N, *)` where :math:`*` means,
3614
3568
  any number of additional dimensions. The data type can be float16 or float32.
3615
- - **m** (Parameter) - The 1st moment vector in the updating formula,
3569
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula,
3616
3570
  the shape should be the same as `var`.
3617
- - **v** (Parameter) - the 2nd moment vector in the updating formula,
3571
+ - **v** (Union[Parameter, Tensor]) - the 2nd moment vector in the updating formula,
3618
3572
  the shape should be the same as `var`.
3619
3573
  - **beta1_power** (float) - :math:`beta_1^t(\beta_1^{t})` in the updating formula.
3620
3574
  - **beta2_power** (float) - :math:`beta_2^t(\beta_2^{t})` in the updating formula.
@@ -3785,8 +3739,8 @@ class AdamNoUpdateParam(Primitive):
3785
3739
 
3786
3740
  class FusedSparseAdam(Primitive):
3787
3741
  r"""
3788
- Merges the duplicate value of the gradient and then updates parameters by the Adaptive Moment Estimation (Adam)
3789
- algorithm. This operator is used when the gradient is sparse.
3742
+ Merges the duplicate value of the gradient and then updates parameters or tensors by the Adaptive Moment Estimation
3743
+ (Adam) algorithm. This operator is used when the gradient is sparse.
3790
3744
 
3791
3745
  The Adam algorithm is proposed in `Adam: A Method for Stochastic Optimization <https://arxiv.org/abs/1412.6980>`_.
3792
3746
 
@@ -3819,11 +3773,12 @@ class FusedSparseAdam(Primitive):
3819
3773
  If ``False`` , update the gradients without using NAG. Default: ``False`` .
3820
3774
 
3821
3775
  Inputs:
3822
- - **var** (Parameter) - Parameters to be updated with float32 data type. The shape is :math:`(N, *)`
3823
- where :math:`*` means, any number of additional dimensions.
3824
- - **m** (Parameter) - The 1st moment vector in the updating formula, has the same shape and data type as `var`.
3825
- - **v** (Parameter) - The 2nd moment vector in the updating formula, has the same shape and data type as `var`.
3826
- Mean square gradients, has the same type as `var` with float32 data type.
3776
+ - **var** (Union[Parameter, Tensor]) - Parameters or tensors to be updated with float32 data type. The shape is:
3777
+ math:`(N, *)` where :math:`*` means, any number of additional dimensions.
3778
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula, has the same shape and data
3779
+ type as `var`.
3780
+ - **v** (Union[Parameter, Tensor]) - The 2nd moment vector in the updating formula, has the same shape and data
3781
+ type as `var`. Mean square gradients, has the same type as `var` with float32 data type.
3827
3782
  - **beta1_power** (Tensor) - :math:`beta_1^t` in the updating formula with float32 data type.
3828
3783
  The shape is :math:`(1, )`.
3829
3784
  - **beta2_power** (Tensor) - :math:`beta_2^t` in the updating formula with float32 data type.
@@ -3841,7 +3796,7 @@ class FusedSparseAdam(Primitive):
3841
3796
  - **indices** (Tensor) - Gradient indices with int32 data type and indices.shape[0] = gradient.shape[0].
3842
3797
 
3843
3798
  Outputs:
3844
- Tuple of 3 Tensors, this operator will update the input parameters directly, the outputs are useless.
3799
+ Tuple of 3 Tensors, this operator will update the input parameters or tensors directly, the outputs are useless.
3845
3800
 
3846
3801
  - **var** (Tensor) - A Tensor with shape :math:`(N, *)`.
3847
3802
  - **m** (Tensor) - A Tensor with shape :math:`(1, )`.
@@ -3911,8 +3866,8 @@ class FusedSparseAdam(Primitive):
3911
3866
 
3912
3867
  class FusedSparseLazyAdam(Primitive):
3913
3868
  r"""
3914
- Merges the duplicate value of the gradient and then updates parameters by the Adaptive Moment Estimation (Adam)
3915
- algorithm. This operator is used when the gradient is sparse. The behavior is not equivalent to the
3869
+ Merges the duplicate value of the gradient and then updates parameters or tensors by the Adaptive Moment Estimation
3870
+ (Adam) algorithm. This operator is used when the gradient is sparse. The behavior is not equivalent to the
3916
3871
  original Adam algorithm, as only the current indices parameters will be updated.
3917
3872
 
3918
3873
  The Adam algorithm is proposed in `Adam: A Method for Stochastic Optimization <https://arxiv.org/abs/1412.6980>`_.
@@ -3946,11 +3901,12 @@ class FusedSparseLazyAdam(Primitive):
3946
3901
  If ``False`` , update the gradients without using NAG. Default: ``False`` .
3947
3902
 
3948
3903
  Inputs:
3949
- - **var** (Parameter) - Parameters to be updated with float32 data type. The shape is :math:`(N, *)`
3950
- where :math:`*` means, any number of additional dimensions.
3951
- - **m** (Parameter) - The 1st moment vector in the updating formula, has the same shape and data type as `var`.
3952
- - **v** (Parameter) - The 2nd moment vector in the updating formula, has the same shape and data type as `var`.
3953
- Mean square gradients, has the same type as `var` with float32 data type.
3904
+ - **var** (Union[Parameter, Tensor]) - Parameters or tensors to be updated with float32 data type. The shape is:
3905
+ math:`(N, *)` where :math:`*` means, any number of additional dimensions.
3906
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula, has the same shape and data
3907
+ type as `var`.
3908
+ - **v** (Union[Parameter, Tensor]) - The 2nd moment vector in the updating formula, has the same shape and data
3909
+ type as `var`. Mean square gradients, has the same type as `var` with float32 data type.
3954
3910
  - **beta1_power** (Tensor) - :math:`beta_1^t` in the updating formula with float32 data type.
3955
3911
  The shape is :math:`(1, )`.
3956
3912
  - **beta2_power** (Tensor) - :math:`beta_2^t` in the updating formula with float32 data type.
@@ -3968,7 +3924,7 @@ class FusedSparseLazyAdam(Primitive):
3968
3924
  - **indices** (Tensor) - Gradient indices with int32 data type and indices.shape[0] = gradient.shape[0].
3969
3925
 
3970
3926
  Outputs:
3971
- Tuple of 3 Tensors, this operator will update the input parameters directly, the outputs are useless.
3927
+ Tuple of 3 Tensors, this operator will update the input parameters or tensors directly, the outputs are useless.
3972
3928
 
3973
3929
  - **var** (Tensor) - A Tensor with shape :math:`(N, *)`.
3974
3930
  - **m** (Tensor) - A Tensor with shape :math:`(1, )`.
@@ -4054,17 +4010,18 @@ class FusedSparseFtrl(Primitive):
4054
4010
  use_locking (bool): Use locks for updating operation if True . Default: ``False`` .
4055
4011
 
4056
4012
  Inputs:
4057
- - **var** (Parameter) - The variable to be updated. The data type must be float32. The shape is :math:`(N, *)`
4058
- where :math:`*` means, any number of additional dimensions.
4059
- - **accum** (Parameter) - The accumulation to be updated, must be same type and shape as `var`.
4060
- - **linear** (Parameter) - the linear coefficient to be updated, must be same type and shape as `var`.
4013
+ - **var** (Union[Parameter, Tensor]) - The variable to be updated. The data type must be float32. The shape is:
4014
+ math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4015
+ - **accum** (Union[Parameter, Tensor]) - The accumulation to be updated, must be same type and shape as `var`.
4016
+ - **linear** (Union[Parameter, Tensor]) - the linear coefficient to be updated, must be same type and shape as
4017
+ `var`.
4061
4018
  - **grad** (Tensor) - A tensor of the same type as `var` and
4062
4019
  grad.shape[1:] = var.shape[1:] if var.shape > 1.
4063
4020
  - **indices** (Tensor) - A vector of indices into the first dimension of `var` and `accum`.
4064
4021
  The type must be int32 and indices.shape[0] = grad.shape[0].
4065
4022
 
4066
4023
  Outputs:
4067
- Tuple of 3 Tensor, this operator will update the input parameters directly, the outputs are useless.
4024
+ Tuple of 3 Tensor, this operator will update the input parameters or tensors directly, the outputs are useless.
4068
4025
 
4069
4026
  - **var** (Tensor) - A Tensor with shape :math:`(N, *)`.
4070
4027
  - **accum** (Tensor) - A Tensor with shape :math:`(1, )`.
@@ -4151,9 +4108,10 @@ class FusedSparseProximalAdagrad(Primitive):
4151
4108
  Default: ``False`` .
4152
4109
 
4153
4110
  Inputs:
4154
- - **var** (Parameter) - Variable tensor to be updated. The data type must be float32.
4111
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. The data type must be float32.
4155
4112
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4156
- - **accum** (Parameter) - Variable tensor to be updated, has the same shape and data type as `var`.
4113
+ - **accum** (Union[Parameter, Tensor]) - Variable tensor to be updated, has the same shape and data type as
4114
+ `var`.
4157
4115
  - **lr** (Tensor) - The learning rate value. The data type must be float32. The shape is :math:`(1, )`.
4158
4116
  - **l1** (Tensor) - l1 regularization strength. The data type must be float32. The shape is :math:`(1, )`.
4159
4117
  - **l2** (Tensor) - l2 regularization strength. The data type must be float32. The shape is :math:`(1, )`.
@@ -4163,7 +4121,7 @@ class FusedSparseProximalAdagrad(Primitive):
4163
4121
  The type must be int32 and indices.shape[0] = grad.shape[0].
4164
4122
 
4165
4123
  Outputs:
4166
- Tuple of 2 Tensors, this operator will update the input parameters directly, the outputs are useless.
4124
+ Tuple of 2 Tensors, this operator will update the input parameters or tensors directly, the outputs are useless.
4167
4125
 
4168
4126
  - **var** (Tensor) - A Tensor with shape :math:`(N, *)`.
4169
4127
  - **accum** (Tensor) - A Tensor with shape :math:`(1, )`.
@@ -4342,11 +4300,11 @@ class ApplyAdaMax(Primitive):
4342
4300
  the relatively highest priority data type.
4343
4301
 
4344
4302
  Inputs:
4345
- - **var** (Parameter) - Variable to be updated. With float32 or float16 data type.
4303
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. With float32 or float16 data type.
4346
4304
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4347
- - **m** (Parameter) - The 1st moment vector in the updating formula, has the same shape as `var`.
4305
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula, has the same shape as `var`.
4348
4306
  With float32 or float16 data type.
4349
- - **v** (Parameter) - The 2nd moment vector in the updating formula. Mean square gradients
4307
+ - **v** (Union[Parameter, Tensor]) - The 2nd moment vector in the updating formula. Mean square gradients
4350
4308
  with the same shape as `var`. With float32 or float16 data type.
4351
4309
  - **beta1_power** (Union[Number, Tensor]) - :math:`beta_1^t` in the updating formula, must be a scalar.
4352
4310
  With float32 or float16 data type.
@@ -4362,7 +4320,7 @@ class ApplyAdaMax(Primitive):
4362
4320
  With float32 or float16 data type.
4363
4321
 
4364
4322
  Outputs:
4365
- Tuple of 3 Tensor, the updated parameters.
4323
+ Tuple of 3 Tensor, the updated parameters or tensors.
4366
4324
 
4367
4325
  - **var** (Tensor) - The same shape and data type as `var`.
4368
4326
  - **m** (Tensor) - The same shape and data type as `m`.
@@ -4456,10 +4414,11 @@ class ApplyAdadelta(Primitive):
4456
4414
  the relatively highest priority data type.
4457
4415
 
4458
4416
  Inputs:
4459
- - **var** (Parameter) - Weights to be updated. With float32 or float16 data type.
4417
+ - **var** (Union[Parameter, Tensor]) - Weights to be updated. With float32 or float16 data type.
4460
4418
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4461
- - **accum** (Parameter) - Accumulation to be updated, has the same shape and data type as `var`.
4462
- - **accum_update** (Parameter) - Accum_update to be updated, has the same shape and data type as `var`.
4419
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated, has the same shape and data type as `var`.
4420
+ - **accum_update** (Union[Parameter, Tensor]) - Accum_update to be updated, has the same shape and data type as
4421
+ `var`.
4463
4422
  - **lr** (Union[Number, Tensor]) - Learning rate, must be a scalar. With float32 or float16 data type.
4464
4423
  - **rho** (Union[Number, Tensor]) - Decay rate, must be a scalar. With float32 or float16 data type.
4465
4424
  - **epsilon** (Union[Number, Tensor]) - A small value added for numerical stability, must be a scalar.
@@ -4467,7 +4426,7 @@ class ApplyAdadelta(Primitive):
4467
4426
  - **grad** (Tensor) - Gradients, has the same shape and data type as `var`.
4468
4427
 
4469
4428
  Outputs:
4470
- Tuple of 3 Tensor, the updated parameters.
4429
+ Tuple of 3 Tensor, the updated parameters or tensors.
4471
4430
 
4472
4431
  - **var** (Tensor) - The same shape and data type as `var`.
4473
4432
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -4558,14 +4517,14 @@ class ApplyAdagrad(Primitive):
4558
4517
  update_slots (bool): If ``True`` , `accum` will be updated. Default: ``True`` .
4559
4518
 
4560
4519
  Inputs:
4561
- - **var** (Parameter) - Variable to be updated. With float or complex data type.
4520
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. With float or complex data type.
4562
4521
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4563
- - **accum** (Parameter) - Accumulation to be updated. The shape must be the same as `var`.
4522
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated. The shape must be the same as `var`.
4564
4523
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be a scalar. With float or complex data type.
4565
4524
  - **grad** (Tensor) - A tensor for gradient. The shape must be the same as `var`.
4566
4525
 
4567
4526
  Outputs:
4568
- Tuple of 2 Tensors, the updated parameters.
4527
+ Tuple of 2 Tensors, the updated parameters or tensors.
4569
4528
 
4570
4529
  - **var** (Tensor) - The same shape and data type as `var`.
4571
4530
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -4645,15 +4604,15 @@ class ApplyAdagradV2(Primitive):
4645
4604
  update_slots (bool): If ``True`` , `accum` will be updated. Default: ``True`` .
4646
4605
 
4647
4606
  Inputs:
4648
- - **var** (Parameter) - Variable to be updated. With float16 or float32 data type.
4607
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. With float16 or float32 data type.
4649
4608
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4650
- - **accum** (Parameter) - Accumulation to be updated. The shape must be the same as `var`.
4609
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated. The shape must be the same as `var`.
4651
4610
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be a float number or
4652
4611
  a scalar tensor with float16 or float32 data type.
4653
4612
  - **grad** (Tensor) - A tensor for gradient. The shape must be the same as `var`.
4654
4613
 
4655
4614
  Outputs:
4656
- Tuple of 2 Tensors, the updated parameters.
4615
+ Tuple of 2 Tensors, the updated parameters or tensors.
4657
4616
 
4658
4617
  - **var** (Tensor) - The same shape and data type as `var`.
4659
4618
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -4756,9 +4715,9 @@ class SparseApplyAdagradV2(Primitive):
4756
4715
  update_slots (bool): If ``True`` , the computation logic will be different to `False`. Default: ``True`` .
4757
4716
 
4758
4717
  Inputs:
4759
- - **var** (Parameter) - Variable to be updated. The data type must be float16 or float32.
4718
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type must be float16 or float32.
4760
4719
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4761
- - **accum** (Parameter) - Accumulation to be updated. The shape must be the same as `var`.
4720
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated. The shape must be the same as `var`.
4762
4721
  - **grad** (Tensor) - Gradients has the same shape as `var` and
4763
4722
  :math:`grad.shape[1:] = var.shape[1:]` if var.shape > 1.
4764
4723
  - **indices** (Tensor) - A vector of indices into the first dimension of `var` and `accum`.
@@ -4766,7 +4725,7 @@ class SparseApplyAdagradV2(Primitive):
4766
4725
  must be unique. Otherwise, the result is unpredictable.
4767
4726
 
4768
4727
  Outputs:
4769
- Tuple of 2 tensors, the updated parameters.
4728
+ Tuple of 2 tensors, the updated parameters or tensors.
4770
4729
 
4771
4730
  - **var** (Tensor) - The same shape and data type as `var`.
4772
4731
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -4846,9 +4805,10 @@ class ApplyProximalAdagrad(Primitive):
4846
4805
  Default: ``False`` .
4847
4806
 
4848
4807
  Inputs:
4849
- - **var** (Parameter) - Variable to be updated. The data type must be float16 or float32.
4808
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type must be float16 or float32.
4850
4809
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4851
- - **accum** (Parameter) - Accumulation to be updated, must have the same shape and dtype as `var`.
4810
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated, must have the same shape and dtype as
4811
+ `var`.
4852
4812
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be a scalar. The data type must be
4853
4813
  float16 or float32.
4854
4814
  - **l1** (Union[Number, Tensor]) - l1 regularization strength, must be a scalar. The data type must be
@@ -4858,7 +4818,7 @@ class ApplyProximalAdagrad(Primitive):
4858
4818
  - **grad** (Tensor) - Gradient with the same shape and dtype as `var`.
4859
4819
 
4860
4820
  Outputs:
4861
- Tuple of 2 Tensors, the updated parameters.
4821
+ Tuple of 2 Tensors, the updated parameters or tensors.
4862
4822
 
4863
4823
  - **var** (Tensor) - The same shape and data type as `var`.
4864
4824
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -4943,9 +4903,9 @@ class SparseApplyProximalAdagrad(Primitive):
4943
4903
  Default: ``False`` .
4944
4904
 
4945
4905
  Inputs:
4946
- - **var** (Parameter) - Variable tensor to be updated. The data type must be float16 or float32.
4906
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. The data type must be float16 or float32.
4947
4907
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
4948
- - **accum** (Parameter) - Variable tensor to be updated, has the same shape as `var`.
4908
+ - **accum** (Parameterv) - Variable tensor to be updated, has the same shape as `var`.
4949
4909
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be a float number or
4950
4910
  a scalar tensor with float16 or float32 data type. It must be positive.
4951
4911
  - **l1** (Union[Number, Tensor]) - l1 regularization strength, must be a float number or
@@ -4959,7 +4919,7 @@ class SparseApplyProximalAdagrad(Primitive):
4959
4919
  following types: int32, int64 and :math:`indices.shape[0] = grad.shape[0]`.
4960
4920
 
4961
4921
  Outputs:
4962
- Tuple of 2 tensors, the updated parameters.
4922
+ Tuple of 2 tensors, the updated parameters or tensors.
4963
4923
 
4964
4924
  - **var** (Tensor) - The same shape and data type as `var`.
4965
4925
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -5045,9 +5005,9 @@ class ApplyAddSign(Primitive):
5045
5005
  the relatively highest priority data type.
5046
5006
 
5047
5007
  Inputs:
5048
- - **var** (Parameter) - Variable tensor to be updated.
5008
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated.
5049
5009
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5050
- - **m** (Parameter) - Variable tensor to be updated, has the same data type as `var`.
5010
+ - **m** (Union[Parameter, Tensor]) - Variable tensor to be updated, has the same data type as `var`.
5051
5011
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be a scalar.
5052
5012
  - **alpha** (Union[Number, Tensor]) - Must be a scalar.
5053
5013
  - **sign_decay** (Union[Number, Tensor]) - Must be a scalar.
@@ -5055,7 +5015,7 @@ class ApplyAddSign(Primitive):
5055
5015
  - **grad** (Tensor) - A tensor of the same shape as `var`, for the gradient.
5056
5016
 
5057
5017
  Outputs:
5058
- Tuple of 2 Tensors, the updated parameters.
5018
+ Tuple of 2 Tensors, the updated parameters or tensors.
5059
5019
 
5060
5020
  - **var** (Tensor) - The same shape and data type as `var`.
5061
5021
  - **m** (Tensor) - The same shape and data type as `m`.
@@ -5144,10 +5104,10 @@ class ApplyPowerSign(Primitive):
5144
5104
  On Ascend, input data type of float64 is currently not supported.
5145
5105
 
5146
5106
  Inputs:
5147
- - **var** (Parameter) - Variable tensor to be updated. With float64, float32 or float16 data type.
5148
- If data type of `var` is float16, all inputs must have the same data type as `var`.
5107
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. With float64, float32 or float16 data
5108
+ type. If data type of `var` is float16, all inputs must have the same data type as `var`.
5149
5109
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5150
- - **m** (Parameter) - Variable tensor to be updated, has the same shape as `var`.
5110
+ - **m** (Union[Parameter, Tensor]) - Variable tensor to be updated, has the same shape as `var`.
5151
5111
  - **lr** (Union[Number, Tensor]) - The learning rate value, should be a scalar or Tensor
5152
5112
  with float64, float32 or float16 data type.
5153
5113
  - **logbase** (Union[Number, Tensor]) - Should be a scalar or Tensor with float64, float32 or float16 data type.
@@ -5158,7 +5118,7 @@ class ApplyPowerSign(Primitive):
5158
5118
  - **grad** (Tensor) - A tensor of the same shape as `var`, for the gradient.
5159
5119
 
5160
5120
  Outputs:
5161
- Tuple of 2 Tensors, the updated parameters.
5121
+ Tuple of 2 Tensors, the updated parameters or tensors.
5162
5122
 
5163
5123
  - **var** (Tensor) - The same shape and data type as `var`.
5164
5124
  - **m** (Tensor) - The same shape and data type as `m`.
@@ -5235,7 +5195,7 @@ class ApplyGradientDescent(Primitive):
5235
5195
  the relatively highest priority data type.
5236
5196
 
5237
5197
  Inputs:
5238
- - **var** (Parameter) - Variable tensor to be updated. With float32 or float16 data type.
5198
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. With float32 or float16 data type.
5239
5199
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5240
5200
  - **alpha** (Union[Number, Tensor]) - Scaling factor, must be a scalar. With float32 or float16 data type.
5241
5201
  - **delta** (Tensor) - A tensor for the change, has the same shape as `var`.
@@ -5304,7 +5264,7 @@ class ApplyProximalGradientDescent(Primitive):
5304
5264
  the relatively highest priority data type.
5305
5265
 
5306
5266
  Inputs:
5307
- - **var** (Parameter) - Variable tensor to be updated. With float32 or float16 data type.
5267
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. With float32 or float16 data type.
5308
5268
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5309
5269
  - **alpha** (Union[Number, Tensor]) - Scaling factor, must be a scalar. With float32 or float16 data type.
5310
5270
  - **l1** (Union[Number, Tensor]) - l1 regularization strength, must be a scalar.
@@ -5448,10 +5408,10 @@ class ApplyFtrl(Primitive):
5448
5408
  use_locking (bool): Use locks for updating operation if ``True`` . Default: ``False`` .
5449
5409
 
5450
5410
  Inputs:
5451
- - **var** (Parameter) - The variable to be updated. The data type must be float16 or float32.
5411
+ - **var** (Union[Parameter, Tensor]) - The variable to be updated. The data type must be float16 or float32.
5452
5412
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5453
- - **accum** (Parameter) - The accumulation to be updated, must be same shape as `var`.
5454
- - **linear** (Parameter) - The linear coefficient to be updated, must be same shape as `var`.
5413
+ - **accum** (Union[Parameter, Tensor]) - The accumulation to be updated, must be same shape as `var`.
5414
+ - **linear** (Union[Parameter, Tensor]) - The linear coefficient to be updated, must be same shape as `var`.
5455
5415
  - **grad** (Tensor) - Gradient. The data type must be float16 or float32.
5456
5416
  - **lr** (Union[Number, Tensor]) - The learning rate value, must be positive. Default: ``0.001`` .
5457
5417
  It must be a float number or a scalar tensor with float16 or float32 data type.
@@ -5464,16 +5424,16 @@ class ApplyFtrl(Primitive):
5464
5424
  Default: ``-0.5`` . It must be a float number or a scalar tensor with float16 or float32 data type.
5465
5425
 
5466
5426
  Outputs:
5467
- - **var** (Tensor) - Represents the updated `var`. As the input parameters has been updated in-place, this
5468
- value is always zero when the platform is GPU.
5427
+ - **var** (Tensor) - Represents the updated `var`. As the input parameters or tensors has been updated in-place,
5428
+ this value is always zero when the platform is GPU.
5469
5429
 
5470
5430
  Raises:
5471
5431
  TypeError: If `use_locking` is not a bool.
5472
5432
  TypeError: If dtype of `var`, `grad`, `lr`, `l1`, `l2` or `lr_power` is neither float16 nor float32.
5473
5433
  TypeError: If `lr`, `l1`, `l2` or `lr_power` is neither a Number nor a Tensor.
5474
5434
  TypeError: If `grad` is not a Tensor.
5475
- TypeError: If the parameter types of `var`, `accum` and `linear` are inconsistent.
5476
- TypeError: If the parameter types of `grad`, `lr`, `l1`, `l2`, `lr_power` are inconsistent with `var`
5435
+ TypeError: If the parameter or tensor types of `var`, `accum` and `linear` are inconsistent.
5436
+ TypeError: If the parameter or tensor types of `grad`, `lr`, `l1`, `l2`, `lr_power` are inconsistent with `var`
5477
5437
  and the precision is greater than `var`.
5478
5438
 
5479
5439
  Supported Platforms:
@@ -5548,10 +5508,10 @@ class SparseApplyFtrl(Primitive):
5548
5508
  use_locking (bool, optional): Use locks for updating operation if ``True`` . Default: ``False`` .
5549
5509
 
5550
5510
  Inputs:
5551
- - **var** (Parameter) - The variable to be updated. The data type must be float16 or float32.
5511
+ - **var** (Union[Parameter, Tensor]) - The variable to be updated. The data type must be float16 or float32.
5552
5512
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
5553
- - **accum** (Parameter) - The accumulation to be updated, must be same shape as `var`.
5554
- - **linear** (Parameter) - The linear coefficient to be updated, must be the same shape as `var`.
5513
+ - **accum** (Union[Parameter, Tensor]) - The accumulation to be updated, must be same shape as `var`.
5514
+ - **linear** (Union[Parameter, Tensor]) - The linear coefficient to be updated, must be the same shape as `var`.
5555
5515
  - **grad** (Tensor) - A tensor must meet with :math:`grad.shape[1:] = var.shape[1:]`
5556
5516
  if var.shape > 1.
5557
5517
  - **indices** (Tensor) - A tensor of indices in the first dimension of `var` and `accum`.
@@ -6908,7 +6868,7 @@ class SparseApplyAdadelta(Primitive):
6908
6868
  to make the data types consistent. Besides, inputs of 'lr' and 'rho' also support implicit type conversion.
6909
6869
  If they have different data types, the lower priority data type will be converted to
6910
6870
  relatively highest priority data type.
6911
- RuntimeError exception will be thrown when the data type conversion of Parameter is required.
6871
+ RuntimeError exception will be thrown when the data type conversion of Parameter or Tensor is required.
6912
6872
 
6913
6873
  Note:
6914
6874
  If there are negative values or values greater than or equal to var.shape[0] in `indices`,
@@ -6920,11 +6880,11 @@ class SparseApplyAdadelta(Primitive):
6920
6880
  Default: ``False`` .
6921
6881
 
6922
6882
  Inputs:
6923
- - **var** (Parameter) - Weights to be updated. With float32 or float16 data type.
6924
- - **accum** (Parameter) - Accumulation to be updated. Mush have the same shape and dtype as `var`.
6925
- With float32 or float16 data type.
6926
- - **accum_update** (Parameter) - Accum_update to be updated. Must have the same shape and dtype as `var`.
6927
- With float32 or float16 data type.
6883
+ - **var** (Union[Parameter, Tensor]) - Weights to be updated. With float32 or float16 data type.
6884
+ - **accum** (Union[Parameter, Tensor]) - Accumulation to be updated. Mush have the same shape and dtype as
6885
+ `var`. With float32 or float16 data type.
6886
+ - **accum_update** (Union[Parameter, Tensor]) - Accum_update to be updated. Must have the same shape and dtype
6887
+ as `var`. With float32 or float16 data type.
6928
6888
  - **lr** (Union[float, Tensor]) - Learning rate, must be a scalar. With float32 or float16 data type.
6929
6889
  - **rho** (Union[float, Tensor]) - Decay rate, must be a scalar. With float32 or float16 data type.
6930
6890
  - **grad** (Tensor) - A tensor for gradient. Must have the same shape and dtype as `var`.
@@ -6932,7 +6892,7 @@ class SparseApplyAdadelta(Primitive):
6932
6892
  Must be one of the following types: int32, int64 and indices.shape[0] = grad.shape[0].
6933
6893
 
6934
6894
  Outputs:
6935
- Tuple of 3 Tensor, the updated parameters.
6895
+ Tuple of 3 Tensor, the updated parameters or tensors.
6936
6896
 
6937
6897
  - **var** (Tensor) - The same shape and data type as `var`.
6938
6898
  - **accum** (Tensor) - The same shape and data type as `accum`.
@@ -7209,12 +7169,15 @@ class Conv3DTranspose(Primitive):
7209
7169
  Inputs:
7210
7170
  - **dout** (Tensor) - The gradients with respect to the output of the convolution.
7211
7171
  The shape conforms to the default.
7212
- data_format :math:`(N, C_{in}, D_{out}, H_{out}, W_{out})`. Currently dout data type only supports float16
7213
- and float32.
7172
+ data_format :math:`(N, C_{in}, D_{out}, H_{out}, W_{out})`.
7173
+ Supported dtypes:
7174
+
7175
+ - Ascend: float16.
7176
+ - GPU/CPU: float16, float32.
7214
7177
  - **weight** (Tensor) - Set size of kernel is :math:`(K_d, K_h, K_w)`, then the shape is
7215
7178
  :math:`(C_{in}, C_{out}//group, K_d, K_h, K_w)`. Where :math:`group` is the Args parameter,
7216
7179
  :math:`//` is the symbol for integer division.
7217
- Currently weight data type only supports float16 and float32.
7180
+ It has the same dtype as `dout`.
7218
7181
  - **bias** (Tensor) - Tensor of shape :math:`C_{out}`. Currently, only support none. Default: ``None`` .
7219
7182
 
7220
7183
  Outputs:
@@ -7500,12 +7463,12 @@ class ApplyAdagradDA(Primitive):
7500
7463
  Otherwise the behavior is undefined, but may exhibit less contention. Default: ``False`` .
7501
7464
 
7502
7465
  Inputs:
7503
- - **var** (Parameter) - Variable to be updated. The data type must be float16 or float32.
7466
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type must be float16 or float32.
7504
7467
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
7505
- - **gradient_accumulator** (Parameter) - The dict of mutable tensor :math:`grad\_accum`. Must have the same
7506
- shape as `var`.
7507
- - **gradient_squared_accumulator** (Parameter) - The dict of mutable tensor :math:`grad\_squared\_accum`.
7468
+ - **gradient_accumulator** (Union[Parameter, Tensor]) - The dict of mutable tensor :math:`grad\_accum`.
7508
7469
  Must have the same shape as `var`.
7470
+ - **gradient_squared_accumulator** (Union[Parameter, Tensor]) - The dict of mutable tensor
7471
+ :math:`grad\_squared\_accum`. Must have the same shape as `var`.
7509
7472
  - **grad** (Tensor) - A tensor for gradient. Must have the same shape as `var`.
7510
7473
  - **lr** ([Number, Tensor]) - Scaling factor. Must be a scalar. With float32 or float16 data type.
7511
7474
  - **l1** ([Number, Tensor]) - L1 regularization. Must be a scalar. With float32 or float16 data type.
@@ -7513,12 +7476,12 @@ class ApplyAdagradDA(Primitive):
7513
7476
  - **global_step** ([Number, Tensor]) - Training step number. Must be a scalar. With int32 or int64 data type.
7514
7477
 
7515
7478
  Outputs:
7516
- Tuple of 1 Tensors, the updated parameters.
7479
+ Tuple of 1 Tensors, the updated parameters or tensors.
7517
7480
 
7518
7481
  - **var** (Tensor) - The same shape and data type as `var`.
7519
7482
 
7520
7483
  Raises:
7521
- TypeError: If `var`, `gradient_accumulator` or `gradient_squared_accumulator` is not a Parameter.
7484
+ TypeError: If `var`, `gradient_accumulator` or `gradient_squared_accumulator` neither a Parameter nor a Tensor.
7522
7485
  TypeError: If `grad` is not a Tensor.
7523
7486
  TypeError: If `lr`, `l1`, `l2` or `global_step` is neither a Number nor a Tensor.
7524
7487
  TypeError: If use_locking is not a bool.
@@ -7612,10 +7575,12 @@ class SparseApplyRMSProp(Primitive):
7612
7575
  otherwise the behavior is undefined, but may exhibit less contention. Default: ``False`` .
7613
7576
 
7614
7577
  Inputs:
7615
- - **var** (Parameter) - Variable to be updated. The data type must be float16 or float32.
7578
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type must be float16 or float32.
7616
7579
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
7617
- - **ms** (Parameter) - The dict of mutable tensor ms. Must have the same shape and dtype as `var`.
7618
- - **mom** (Parameter) - The dict of mutable tensor mom. Must have the same shape and dtype as `var`.
7580
+ - **ms** (Union[Parameter, Tensor]) - The dict of mutable tensor ms. Must have the same shape and dtype as
7581
+ `var`.
7582
+ - **mom** (Union[Parameter, Tensor]) - The dict of mutable tensor mom. Must have the same shape and dtype as
7583
+ `var`.
7619
7584
  - **lr** ([Number, Tensor]) - Learning rate. Must be a scalar. With float16 or float32 data type.
7620
7585
  - **grad** (Tensor) - A tensor for gradient. Must have the same shape and dtype as `var`.
7621
7586
  - **indices** (Tensor) - A tensor of indices in the first dimension of `var`, `ms` and `mom`.
@@ -7623,7 +7588,7 @@ class SparseApplyRMSProp(Primitive):
7623
7588
  following types: int32, int64 and indices.shape[0] = var.shape[0].
7624
7589
 
7625
7590
  Outputs:
7626
- Tuple of 3 Tensors, the updated parameters.
7591
+ Tuple of 3 Tensors, the updated parameters or tensors.
7627
7592
 
7628
7593
  - **var** (Tensor) - The same shape and data type as `var`.
7629
7594
  - **ms** (Tensor) - The same shape and data type as `ms`.
@@ -7729,12 +7694,12 @@ class SparseApplyCenteredRMSProp(Primitive):
7729
7694
  Default: ``False`` .
7730
7695
 
7731
7696
  Inputs:
7732
- - **var** (Parameter) - Variable tensor to be updated. The data type must be int8, int16, int32, int64,
7733
- uint8, uint16, uint32, uint64, float16, float32 or float64.
7697
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. The data type must be int8, int16, int32,
7698
+ int64, uint8, uint16, uint32, uint64, float16, float32 or float64.
7734
7699
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
7735
- - **mg** (Parameter) - Mean gradients. Must have the same shape and dtype as `var`.
7736
- - **ms** (Parameter) - Mean square gradients. Must have the same shape and dtype as `var`.
7737
- - **mom** (Parameter) - Delta of `var`. Must have the same shape and dtype as `var`.
7700
+ - **mg** (Union[Parameter, Tensor]) - Mean gradients. Must have the same shape and dtype as `var`.
7701
+ - **ms** (Union[Parameter, Tensor]) - Mean square gradients. Must have the same shape and dtype as `var`.
7702
+ - **mom** (Union[Parameter, Tensor]) - Delta of `var`. Must have the same shape and dtype as `var`.
7738
7703
  - **lr** (Union[Number, Tensor]) - Learning rate. Must be a float number or a scalar tensor.
7739
7704
  Must have the same type as `var`.
7740
7705
  - **rho** (Union[Number, Tensor]) - Decay rate. Must be a float number or a scalar tensor.
@@ -7837,8 +7802,9 @@ class ApplyKerasMomentum(Primitive):
7837
7802
  so in the end, the var you get is actually var + momentum * accum. Default: ``False`` .
7838
7803
 
7839
7804
  Inputs:
7840
- - **var** (Parameter) - Variable to be updated. With float16 or float32 data type.
7841
- - **accum** (Parameter) - Must have the same shape and type as `var`. With float16 or float32 data type.
7805
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. With float16 or float32 data type.
7806
+ - **accum** (Union[Parameter, Tensor]) - Must have the same shape and type as `var`. With float16 or float32
7807
+ data type.
7842
7808
  - **lr** (Union[Number, Tensor]) - Scaling factor. Must be a scalar. With float16 or float32 data type.
7843
7809
  - **grad** (Tensor) - The gradient. Must have the same shape and type as `var`.
7844
7810
  With float16 or float32 data type.
@@ -7989,12 +7955,12 @@ class ApplyAdamWithAmsgrad(Primitive):
7989
7955
  Default: ``False`` .
7990
7956
 
7991
7957
  Inputs:
7992
- - **var** (Parameter) - Variable to be updated. The data type can be float16 or float32.
7993
- - **m** (Parameter) - The 1st moment vector in the updating formula,
7958
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type can be float16 or float32.
7959
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula,
7994
7960
  the shape and data type value should be the same as `var`.
7995
- - **v** (Parameter) - the 2nd moment vector in the updating formula,
7961
+ - **v** (Union[Parameter, Tensor]) - the 2nd moment vector in the updating formula,
7996
7962
  the shape and data type value should be the same as `var`.
7997
- - **vhat** (Parameter) - :math:`\hat v_t` in the updating formula,
7963
+ - **vhat** (Union[Parameter, Tensor]) - :math:`\hat v_t` in the updating formula,
7998
7964
  the shape and data type value should be the same as `var`.
7999
7965
  - **beta1_power** (Union[float, Tensor]) - :math:`beta_1^t(\beta_1^{t})` in the updating formula,
8000
7966
  a scalar tensor with float16 or float32 data type.
@@ -8004,7 +7970,7 @@ class ApplyAdamWithAmsgrad(Primitive):
8004
7970
  - **grad** (Tensor) - The gradient, has the same shape and data type as `var`.
8005
7971
 
8006
7972
  Outputs:
8007
- Tuple of 4 Tensors, the updated parameters.
7973
+ Tuple of 4 Tensors, the updated parameters or tensors.
8008
7974
 
8009
7975
  - **var** (Tensor) - The same shape and data type as `var`.
8010
7976
  - **m** (Tensor) - The same shape and data type as `m`.
@@ -8012,7 +7978,7 @@ class ApplyAdamWithAmsgrad(Primitive):
8012
7978
  - **vhat** (Tensor) - The same shape and data type as `vhat`.
8013
7979
 
8014
7980
  Raises:
8015
- TypeError: If `var`, `m`, `v`, `vhat` is not a Parameter.
7981
+ TypeError: If `var`, `m`, `v`, `vhat` neither a Parameter nor a Tensor.
8016
7982
  TypeError: If `beta1_power`, `beta2_power`, `lr` is neither a Number nor a Tensor.
8017
7983
  TypeError: If `grad` is not a Tensor.
8018
7984
  TypeError: If dtype of `var`, `m`, `v`, `vhat`, `beta1_power`, `beta2_power`,
@@ -8096,12 +8062,12 @@ class ApplyAdamWithAmsgradV2(Primitive):
8096
8062
  Default: ``False`` .
8097
8063
 
8098
8064
  Inputs:
8099
- - **var** (Parameter) - Variable to be updated. The data type can be float16, float32 or float64.
8100
- - **m** (Parameter) - The 1st moment vector in the updating formula,
8065
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated. The data type can be float16, float32 or float64.
8066
+ - **m** (Union[Parameter, Tensor]) - The 1st moment vector in the updating formula,
8101
8067
  the shape should be the same as `var`.
8102
- - **v** (Parameter) - The 2nd moment vector in the updating formula,
8068
+ - **v** (Union[Parameter, Tensor]) - The 2nd moment vector in the updating formula,
8103
8069
  the shape should be the same as `var`.
8104
- - **vhat** (Parameter) - :math:`\hat v_t` in the updating formula,
8070
+ - **vhat** (Union[Parameter, Tensor]) - :math:`\hat v_t` in the updating formula,
8105
8071
  the shape and data type value should be the same as `var`.
8106
8072
  - **beta1_power** (Union[float, Tensor]) - :math:`beta_1^t(\beta_1^{t})` in the updating formula,
8107
8073
  with float16, float32 or float64 data type.
@@ -8117,7 +8083,7 @@ class ApplyAdamWithAmsgradV2(Primitive):
8117
8083
  - **grad** (Tensor) - The gradient, has the same shape as `var`.
8118
8084
 
8119
8085
  Outputs:
8120
- Tuple of 4 Tensors, the updated parameters.
8086
+ Tuple of 4 Tensors, the updated parameters or tensors.
8121
8087
 
8122
8088
  - **var** (Tensor) - The same shape and data type as `var`.
8123
8089
  - **m** (Tensor) - The same shape and data type as `m`.
@@ -8125,7 +8091,7 @@ class ApplyAdamWithAmsgradV2(Primitive):
8125
8091
  - **vhat** (Tensor) - The same shape and data type as `vhat`.
8126
8092
 
8127
8093
  Raises:
8128
- TypeError: If `var`, `m`, `v`, `vhat` is not a Parameter.
8094
+ TypeError: If `var`, `m`, `v`, `vhat` neither a Parameter nor a Tensor.
8129
8095
  TypeError: If dtype of `var`, `m`, `v`, `vhat`, `beta1_power`, `beta2_power`,
8130
8096
  `lr`, `beta1` , `beta2` , `epsilon` or `grad` is not float64, float32 or float16.
8131
8097
  RuntimeError: If the data type of `var`, `m`, `v` , `vhat` and `grad` conversion of Parameter is not supported.
@@ -8805,11 +8771,11 @@ class SparseApplyAdagradDA(Primitive):
8805
8771
  Otherwise the behavior is undefined, but may exhibit less contention. Default: ``False`` .
8806
8772
 
8807
8773
  Inputs:
8808
- - **var** (Parameter) - Variable to be updated.
8774
+ - **var** (Union[Parameter, Tensor]) - Variable to be updated.
8809
8775
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
8810
- - **grad_accum** (Parameter) - The dict of mutable tensor grad_accum. Must have the same
8776
+ - **grad_accum** (Union[Parameter, Tensor]) - The dict of mutable tensor grad_accum. Must have the same
8811
8777
  shape and dtype as `var`.
8812
- - **grad_square_accum** (Parameter) - The dict of mutable tensor grad_square_accum.
8778
+ - **grad_square_accum** (Union[Parameter, Tensor]) - The dict of mutable tensor grad_square_accum.
8813
8779
  Must have the same shape and dtype as `var`.
8814
8780
  - **grad** (Tensor) - A tensor of the same type as `var` and grad.shape[1:] = var.shape[1:] if rank(var) > 1.
8815
8781
  - **indices** (Tensor) - A tensor of indices in the first dimension of `var` and `accum`.
@@ -8987,8 +8953,8 @@ class SparseApplyProximalGradientDescent(Primitive):
8987
8953
  Default: ``False`` .
8988
8954
 
8989
8955
  Inputs:
8990
- - **var** (Parameter) - Variable tensor to be updated. The data type must be int8, int16, int32, int64,
8991
- uint8, uint16, uint32, uint64, float16, float32 or float64.
8956
+ - **var** (Union[Parameter, Tensor]) - Variable tensor to be updated. The data type must be int8, int16, int32,
8957
+ int64, uint8, uint16, uint32, uint64, float16, float32 or float64.
8992
8958
  The shape is :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
8993
8959
  - **alpha** (Union[Number, Tensor]) - Scaling factor. Must be a scalar with same type as `var`.
8994
8960
  - **l1** (Union[Number, Tensor]) - L1 regularization. Must be a scalar with same type as `var`.
@@ -9003,7 +8969,7 @@ class SparseApplyProximalGradientDescent(Primitive):
9003
8969
  - **var** (Tensor) - Tensor, has the same shape and type as 'var'.
9004
8970
 
9005
8971
  Raises:
9006
- TypeError: If `var`, `grad` or `indices` is not a Parameter..
8972
+ TypeError: If `var` neither a Parameter nor a Tensor.
9007
8973
  TypeError: If `alpha`, `l1`, `l2` is neither a Number nor a Tensor.
9008
8974
  TypeError: If `use_locking` is not a bool.
9009
8975
  TypeError: If dtype of `var`, `alpha`, `l1`, `l2` or `grad` is not one of int8, int16,
@@ -9139,51 +9105,6 @@ class NuclearNorm(Primitive):
9139
9105
  validator.check_value_type("keepdim", keepdim, [bool], self.name)
9140
9106
 
9141
9107
 
9142
- class GLU(Primitive):
9143
- r"""
9144
- Computes GLU (Gated Linear Unit activation function) of input tensors.
9145
-
9146
- .. warning::
9147
- This is an experimental API that is subject to change or deletion.
9148
-
9149
- Refer to :func:`mindspore.ops.glu` for more details.
9150
-
9151
- Args:
9152
- axis (int, optional): Axis on which to split the input.
9153
- The value of `axis` must be an int within range [-rank(`x`), rank(`x`)).
9154
- Default: ``-1`` , specifying the last dimension.
9155
-
9156
- Inputs:
9157
- - **x** (Tensor) - Input tensor. `x.shape[axis]` must be even.
9158
-
9159
- Outputs:
9160
- Tensor, has the same data type with `x`.
9161
-
9162
- Supported Platforms:
9163
- ``Ascend`` ``CPU``
9164
-
9165
- Examples:
9166
- >>> from mindspore import ops, Tensor
9167
- >>> from mindspore import dtype as mstype
9168
- >>> import numpy as np
9169
- >>> axis = 0
9170
- >>> x = Tensor(np.array([0.3220, 0.9545, 0.7879, 0.0975, 0.3698,
9171
- ... 0.5135, 0.5740, 0.3435, 0.1895, 0.8764,
9172
- ... 0.4980, 0.9673, 0.9879, 0.6988, 0.9022,
9173
- ... 0.9304, 0.1558, 0.0153, 0.1559, 0.9852]).reshape([2, 2, 5]), mstype.float32)
9174
- >>> glu = ops.GLU(axis=axis)
9175
- >>> y = glu(x)
9176
- >>> print(y)
9177
- [[[0.20028052 0.6916126 0.57412136 0.06512236 0.26307625]
9178
- [0.3682598 0.3093122 0.17306386 0.10212085 0.63814086]]]
9179
- """
9180
-
9181
- @prim_attr_register
9182
- def __init__(self, axis=-1):
9183
- """Initialize GLU"""
9184
- validator.check_value_type("axis", axis, [int], self.name)
9185
-
9186
-
9187
9108
  class FractionalMaxPoolWithFixedKsize(Primitive):
9188
9109
  r"""
9189
9110
  Applies a 2D fractional max pooling to an input signal composed of multiple input planes.
@@ -9267,7 +9188,8 @@ class FractionalMaxPoolWithFixedKsize(Primitive):
9267
9188
  class ChannelShuffle(Primitive):
9268
9189
  r"""
9269
9190
  Divide the channels in a tensor of shape :math:`(*, C, H, W)` into :math:`g` group and
9270
- rearrange them as :math:`(*, \frac C g, g, H*W)`, while keeping the original tensor shapes.
9191
+ rearrange them as :math:`(*, \frac{C}{g}, g, H*W)`, while retaining the original tensor
9192
+ shape in the final output.
9271
9193
 
9272
9194
  .. warning::
9273
9195
  This is an experimental API that is subject to change or deletion.
@@ -9475,93 +9397,6 @@ class WKV(Primitive):
9475
9397
  outputs=["output", "out_sp", "out_sq", "out_sm"])
9476
9398
 
9477
9399
 
9478
- class PromptFlashAttention(Primitive):
9479
- r"""
9480
- The interface for fully inference.
9481
- B -- Batch size
9482
- S -- Sequence length
9483
- H -- Hidden size
9484
-
9485
- Note:
9486
- experiment ops
9487
-
9488
- .. warning::
9489
- This is an experimental API that is subject to change or deletion.
9490
-
9491
- Args:
9492
- num_heads (int): The number of heads.
9493
- scale_value (float): The scale value indicating the scale coefficient, which is used as the scalar of
9494
- Muls in the calculation. Default: 1.0.
9495
- pre_tokens (int): Previous tokens. Default: 2147483547.
9496
- next_tokens (int): next tokens. Default: 0.
9497
- indicate the upper triangle, Indicate the number of data blocks involved in the calculation. The value 0
9498
- indicates that the data blocks in the upper triangle are not involved in the calculation
9499
- input_layout (str): the data layout of the input qkv, support `(BSH)` and `(BNSD)`, Default `BSH`.
9500
- num_key_value_heads (int): head numbers of key/value which are used in GQA algorithm.
9501
- The value o indicates if the key and value have the same head nums, use numHeads. Default: 0.
9502
- sparse_mode (int): Default: 0
9503
- inner_precise (int): 0, float16 high precision. 1, high performance. default 1
9504
-
9505
- Inputs:
9506
- - **query** (Tensor) - The query tensor with data type of float16 or float32.
9507
- Input tensor of shape :math:`(B, S, H)` / `(B, N, S, D)`.
9508
- - **key** (Tensor) - The key tensor with data type of float16 or float32.
9509
- Input tensor of shape :math:`(B, S, H)` / `(B, N, S, D)`.
9510
- - **value** (Tensor) - The value tensor with data type of float16 or float32.
9511
- Input tensor of shape :math:`(B, S, H)` / `(B, N, S, D)`.
9512
- - **attn_mask** (Tensor) - The attention mask tensor with data type of float16 or float32.
9513
- For each element, 0 indicates retention and 1 indicates discard. Input tensor of shape :math:`(B, 1, S, S)`.
9514
- - **actual_seq_lengths** (Tensor): Describe actual sequence length of each input with data type of int64.
9515
- - **actual_seq_lengths_kv** (Tensor): Describe actual sequence length of each input with data type of int64.
9516
- - **pse_shift** (Tensor) - The position encoding tensor with data type of float16 or float32.
9517
- - **dep_scale1** (Tensor)
9518
- - **quant_scale1** (Tensor)
9519
- - **deq_scale2** (Tensor)
9520
- - **quant_scale2** (Tensor)
9521
- - **quant_offset2** (Tensor)
9522
-
9523
- Outputs:
9524
- - **attention_out** (Tensor) - Input tensor of shape :math:`(B, S, H)` / `(B, N, S, D)`.
9525
-
9526
- Supported Platforms:
9527
- ``Ascend``
9528
-
9529
- Examples:
9530
- >>> import mindspore.ops.operations.nn_ops as P
9531
- >>> from mindspore import Tensor
9532
- >>> import numpy as np
9533
- >>> B = 1
9534
- >>> N = 16
9535
- >>> S = 256
9536
- >>> D = 16
9537
- >>> query = Tensor(np.ones((B, N, S, D), dtype=np.float16))
9538
- >>> key = Tensor(np.ones((B, N, S, D), dtype=np.float16))
9539
- >>> value = Tensor(np.ones((B, N, S, D), dtype=np.float16))
9540
- >>> attn_mask = Tensor(np.ones((B, 1, S, S), dtype=np.float16))
9541
- >>> pfa = P.PromptFlashAttention(N, input_layout='BNSD')
9542
- >>> out = pfa(query, key, value, attn_mask, None, None, None, None, None, None, None, None)
9543
- >>> print(out.shape)
9544
- (1, 16, 256, 16)
9545
- """
9546
-
9547
- @prim_attr_register
9548
- def __init__(self, num_heads, scale_value=1.0, pre_tokens=214748647, next_tokens=0, input_layout='BSH',
9549
- num_key_value_heads=0, sparse_mode=0, inner_precise=1):
9550
- """Initialize PromptFlashAttention."""
9551
- validator.check_value_type('num_heads', num_heads, [int], self.name)
9552
- validator.check_value_type('scale_value', scale_value, [float], self.name)
9553
- validator.check_value_type('pre_tokens', pre_tokens, [int], self.name)
9554
- validator.check_value_type('next_tokens', next_tokens, [int], self.name)
9555
- validator.check_value_type('input_layout', input_layout, [str], self.name)
9556
- validator.check_value_type('num_key_value_heads', num_key_value_heads, [int], self.name)
9557
- validator.check_value_type('sparse_mode', sparse_mode, [int], self.name)
9558
- validator.check_value_type('inner_precise', inner_precise, [int], self.name)
9559
- self.init_prim_io_names(inputs=["query", "key", "value", "attn_mask", "actual_seq_lengths",
9560
- "actual_seq_lengths_kv", "pse_shift", "deq_scale1", "quant_scale1",
9561
- "deq_scale2", "quant_scale2", "quant_offset2"],
9562
- outputs=["attention_out"])
9563
-
9564
-
9565
9400
  class AllFinite(Primitive):
9566
9401
  r"""
9567
9402
  Check all gradients is finite.
@@ -9578,3 +9413,6 @@ class AllFinite(Primitive):
9578
9413
  raise RuntimeError(
9579
9414
  "The version of Ascend AI software package installed "
9580
9415
  "in the current environment does not support AllFinite.")
9416
+
9417
+ def __call__(self, *args):
9418
+ return _convert_stub(pyboost_all_finite(self, args))