mindspore 2.4.10__cp39-cp39-win_amd64.whl → 2.5.0__cp39-cp39-win_amd64.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 (389) hide show
  1. mindspore/.commit_id +1 -1
  2. mindspore/Microsoft.VisualStudio.Telemetry.dll +0 -0
  3. mindspore/Newtonsoft.Json.dll +0 -0
  4. mindspore/__init__.py +8 -3
  5. mindspore/_c_dataengine.cp39-win_amd64.pyd +0 -0
  6. mindspore/_c_expression.cp39-win_amd64.pyd +0 -0
  7. mindspore/_c_mindrecord.cp39-win_amd64.pyd +0 -0
  8. mindspore/_checkparam.py +0 -5
  9. mindspore/_extends/parallel_compile/akg_compiler/gen_custom_op_files.py +1 -1
  10. mindspore/_extends/parse/compile_config.py +64 -0
  11. mindspore/_extends/parse/deprecated/__init__.py +0 -0
  12. mindspore/_extends/parse/deprecated/deprecated_tensor_method.py +375 -0
  13. mindspore/_extends/parse/parser.py +23 -5
  14. mindspore/_extends/parse/standard_method.py +123 -27
  15. mindspore/_extends/pijit/pijit_func_white_list.py +1 -1
  16. mindspore/amp.py +7 -1
  17. mindspore/atlprov.dll +0 -0
  18. mindspore/avcodec-59.dll +0 -0
  19. mindspore/avdevice-59.dll +0 -0
  20. mindspore/avfilter-8.dll +0 -0
  21. mindspore/avformat-59.dll +0 -0
  22. mindspore/avutil-57.dll +0 -0
  23. mindspore/boost/boost_cell_wrapper.py +136 -41
  24. mindspore/c1.dll +0 -0
  25. mindspore/c1xx.dll +0 -0
  26. mindspore/c2.dll +0 -0
  27. mindspore/common/__init__.py +3 -1
  28. mindspore/common/_register_for_tensor.py +0 -1
  29. mindspore/common/_stub_tensor.py +25 -4
  30. mindspore/common/_tensor_cpp_method.py +17 -0
  31. mindspore/common/_tensor_docs.py +6132 -0
  32. mindspore/common/api.py +98 -21
  33. mindspore/common/dtype.py +34 -34
  34. mindspore/common/dump.py +2 -1
  35. mindspore/common/file_system.py +8 -3
  36. mindspore/common/generator.py +2 -0
  37. mindspore/common/hook_handle.py +3 -1
  38. mindspore/common/initializer.py +3 -4
  39. mindspore/common/lazy_inline.py +8 -2
  40. mindspore/common/mindir_util.py +10 -2
  41. mindspore/common/parameter.py +31 -15
  42. mindspore/common/tensor.py +713 -1337
  43. mindspore/communication/__init__.py +1 -1
  44. mindspore/communication/_comm_helper.py +5 -0
  45. mindspore/communication/comm_func.py +215 -173
  46. mindspore/communication/management.py +23 -20
  47. mindspore/context.py +285 -191
  48. mindspore/dataset/__init__.py +23 -19
  49. mindspore/dataset/callback/ds_callback.py +2 -1
  50. mindspore/dataset/core/config.py +84 -3
  51. mindspore/dataset/engine/cache_admin.py +3 -3
  52. mindspore/dataset/engine/cache_client.py +5 -4
  53. mindspore/dataset/engine/datasets.py +192 -149
  54. mindspore/dataset/engine/datasets_audio.py +14 -0
  55. mindspore/dataset/engine/datasets_standard_format.py +11 -11
  56. mindspore/dataset/engine/datasets_text.py +38 -1
  57. mindspore/dataset/engine/datasets_user_defined.py +100 -66
  58. mindspore/dataset/engine/datasets_vision.py +81 -8
  59. mindspore/dataset/engine/iterators.py +281 -63
  60. mindspore/dataset/engine/obs/util.py +8 -0
  61. mindspore/dataset/engine/queue.py +40 -0
  62. mindspore/dataset/engine/samplers.py +26 -2
  63. mindspore/dataset/engine/serializer_deserializer.py +1 -1
  64. mindspore/dataset/engine/validators.py +43 -11
  65. mindspore/dataset/transforms/py_transforms_util.py +17 -0
  66. mindspore/dataset/transforms/transforms.py +29 -12
  67. mindspore/dataset/vision/validators.py +1 -2
  68. mindspore/device_context/__init__.py +21 -0
  69. mindspore/device_context/ascend/__init__.py +25 -0
  70. mindspore/device_context/ascend/device.py +72 -0
  71. mindspore/device_context/ascend/op_debug.py +94 -0
  72. mindspore/device_context/ascend/op_precision.py +193 -0
  73. mindspore/device_context/ascend/op_tuning.py +127 -0
  74. mindspore/device_context/cpu/__init__.py +25 -0
  75. mindspore/device_context/cpu/device.py +62 -0
  76. mindspore/device_context/cpu/op_tuning.py +43 -0
  77. mindspore/device_context/gpu/__init__.py +21 -0
  78. mindspore/device_context/gpu/device.py +70 -0
  79. mindspore/device_context/gpu/op_precision.py +67 -0
  80. mindspore/device_context/gpu/op_tuning.py +175 -0
  81. mindspore/device_manager.py +134 -0
  82. mindspore/dnnl.dll +0 -0
  83. mindspore/dpcmi.dll +0 -0
  84. mindspore/experimental/llm_boost/__init__.py +1 -0
  85. mindspore/experimental/llm_boost/ascend_native/__init__.py +22 -0
  86. mindspore/experimental/llm_boost/ascend_native/llama_boost_ascend_native.py +211 -0
  87. mindspore/experimental/llm_boost/ascend_native/llm_boost.py +52 -0
  88. mindspore/experimental/llm_boost/atb/boost_base.py +2 -3
  89. mindspore/experimental/llm_boost/atb/llama_boost.py +6 -1
  90. mindspore/experimental/llm_boost/register.py +1 -0
  91. mindspore/experimental/optim/adadelta.py +26 -22
  92. mindspore/experimental/optim/adam.py +3 -0
  93. mindspore/experimental/optim/lr_scheduler.py +33 -24
  94. mindspore/experimental/optim/radam.py +33 -30
  95. mindspore/hal/device.py +28 -0
  96. mindspore/hal/event.py +17 -0
  97. mindspore/hal/memory.py +94 -3
  98. mindspore/hal/stream.py +91 -6
  99. mindspore/include/api/context.h +0 -1
  100. mindspore/jpeg62.dll +0 -0
  101. mindspore/log.py +12 -0
  102. mindspore/mindrecord/__init__.py +1 -1
  103. mindspore/mindrecord/config.py +17 -316
  104. mindspore/mindrecord/filereader.py +1 -9
  105. mindspore/mindrecord/filewriter.py +5 -15
  106. mindspore/mindrecord/mindpage.py +1 -9
  107. mindspore/mindspore_backend.dll +0 -0
  108. mindspore/mindspore_common.dll +0 -0
  109. mindspore/mindspore_core.dll +0 -0
  110. mindspore/mindspore_glog.dll +0 -0
  111. mindspore/mindspore_ops.dll +0 -0
  112. mindspore/mint/__init__.py +824 -218
  113. mindspore/mint/distributed/__init__.py +66 -4
  114. mindspore/mint/distributed/distributed.py +2594 -44
  115. mindspore/mint/linalg/__init__.py +6 -0
  116. mindspore/mint/nn/__init__.py +473 -14
  117. mindspore/mint/nn/functional.py +486 -11
  118. mindspore/mint/nn/layer/__init__.py +17 -4
  119. mindspore/mint/nn/layer/_functions.py +330 -0
  120. mindspore/mint/nn/layer/activation.py +169 -1
  121. mindspore/mint/nn/layer/basic.py +123 -0
  122. mindspore/mint/nn/layer/conv.py +727 -0
  123. mindspore/mint/nn/layer/normalization.py +215 -19
  124. mindspore/mint/nn/layer/padding.py +797 -0
  125. mindspore/mint/nn/layer/pooling.py +170 -0
  126. mindspore/mint/optim/__init__.py +2 -1
  127. mindspore/mint/optim/adam.py +223 -0
  128. mindspore/mint/optim/adamw.py +26 -19
  129. mindspore/mint/special/__init__.py +2 -1
  130. mindspore/msobj140.dll +0 -0
  131. mindspore/mspdb140.dll +0 -0
  132. mindspore/mspdbcore.dll +0 -0
  133. mindspore/mspdbst.dll +0 -0
  134. mindspore/mspft140.dll +0 -0
  135. mindspore/msvcdis140.dll +0 -0
  136. mindspore/msvcp140_1.dll +0 -0
  137. mindspore/msvcp140_2.dll +0 -0
  138. mindspore/msvcp140_atomic_wait.dll +0 -0
  139. mindspore/msvcp140_codecvt_ids.dll +0 -0
  140. mindspore/multiprocessing/__init__.py +5 -0
  141. mindspore/nn/cell.py +126 -19
  142. mindspore/nn/dynamic_lr.py +2 -1
  143. mindspore/nn/layer/activation.py +6 -6
  144. mindspore/nn/layer/basic.py +35 -25
  145. mindspore/nn/layer/channel_shuffle.py +3 -3
  146. mindspore/nn/layer/embedding.py +3 -3
  147. mindspore/nn/layer/normalization.py +8 -7
  148. mindspore/nn/layer/padding.py +4 -3
  149. mindspore/nn/layer/pooling.py +47 -13
  150. mindspore/nn/layer/rnn_cells.py +1 -1
  151. mindspore/nn/layer/rnns.py +2 -1
  152. mindspore/nn/layer/timedistributed.py +5 -5
  153. mindspore/nn/layer/transformer.py +48 -26
  154. mindspore/nn/learning_rate_schedule.py +5 -3
  155. mindspore/nn/loss/loss.py +31 -36
  156. mindspore/nn/optim/ada_grad.py +1 -0
  157. mindspore/nn/optim/adadelta.py +2 -2
  158. mindspore/nn/optim/adam.py +1 -1
  159. mindspore/nn/optim/lars.py +1 -4
  160. mindspore/nn/optim/optimizer.py +1 -1
  161. mindspore/nn/optim/rprop.py +2 -2
  162. mindspore/nn/optim/thor.py +2 -1
  163. mindspore/nn/utils/init.py +13 -11
  164. mindspore/nn/wrap/cell_wrapper.py +4 -6
  165. mindspore/nn/wrap/loss_scale.py +3 -4
  166. mindspore/numpy/array_creations.py +60 -62
  167. mindspore/numpy/array_ops.py +148 -143
  168. mindspore/numpy/logic_ops.py +41 -42
  169. mindspore/numpy/math_ops.py +361 -359
  170. mindspore/numpy/utils.py +16 -16
  171. mindspore/numpy/utils_const.py +4 -4
  172. mindspore/opencv_core452.dll +0 -0
  173. mindspore/opencv_imgcodecs452.dll +0 -0
  174. mindspore/opencv_imgproc452.dll +0 -0
  175. mindspore/ops/__init__.py +2 -1
  176. mindspore/ops/_grad_experimental/grad_comm_ops.py +94 -13
  177. mindspore/ops/_grad_experimental/grad_debug_ops.py +6 -1
  178. mindspore/ops/_grad_experimental/grad_inner_ops.py +9 -0
  179. mindspore/ops/_grad_experimental/grad_math_ops.py +2 -1
  180. mindspore/ops/_op_impl/cpu/__init__.py +1 -0
  181. mindspore/ops/_op_impl/cpu/raise_op.py +28 -0
  182. mindspore/ops/_vmap/vmap_array_ops.py +20 -19
  183. mindspore/ops/_vmap/vmap_base.py +0 -2
  184. mindspore/ops/_vmap/vmap_grad_nn_ops.py +19 -13
  185. mindspore/ops/_vmap/vmap_math_ops.py +11 -9
  186. mindspore/ops/_vmap/vmap_nn_ops.py +20 -34
  187. mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +149 -12
  188. mindspore/ops/auto_generate/gen_arg_handler.py +0 -61
  189. mindspore/ops/auto_generate/gen_extend_func.py +554 -60
  190. mindspore/ops/auto_generate/gen_ops_def.py +1621 -115
  191. mindspore/ops/auto_generate/gen_ops_prim.py +8024 -3409
  192. mindspore/ops/auto_generate/pyboost_inner_prim.py +183 -79
  193. mindspore/ops/composite/base.py +1 -1
  194. mindspore/ops/composite/multitype_ops/_compile_utils.py +229 -30
  195. mindspore/ops/composite/multitype_ops/pow_impl.py +0 -29
  196. mindspore/ops/function/__init__.py +12 -0
  197. mindspore/ops/function/array_func.py +561 -159
  198. mindspore/ops/function/clip_func.py +64 -0
  199. mindspore/ops/function/debug_func.py +28 -20
  200. mindspore/ops/function/image_func.py +1 -1
  201. mindspore/ops/function/linalg_func.py +5 -4
  202. mindspore/ops/function/math_func.py +1659 -290
  203. mindspore/ops/function/nn_func.py +988 -317
  204. mindspore/ops/function/parameter_func.py +3 -56
  205. mindspore/ops/function/random_func.py +243 -33
  206. mindspore/ops/function/sparse_unary_func.py +1 -1
  207. mindspore/ops/functional.py +18 -5
  208. mindspore/ops/functional_overload.py +897 -0
  209. mindspore/ops/operations/__init__.py +3 -2
  210. mindspore/ops/operations/_embedding_cache_ops.py +4 -4
  211. mindspore/ops/operations/_grad_ops.py +2 -34
  212. mindspore/ops/operations/_infer_ops.py +2 -1
  213. mindspore/ops/operations/_inner_ops.py +38 -8
  214. mindspore/ops/operations/array_ops.py +45 -303
  215. mindspore/ops/operations/comm_ops.py +19 -16
  216. mindspore/ops/operations/custom_ops.py +11 -55
  217. mindspore/ops/operations/debug_ops.py +42 -47
  218. mindspore/ops/operations/inner_ops.py +6 -4
  219. mindspore/ops/operations/linalg_ops.py +3 -2
  220. mindspore/ops/operations/manually_defined/ops_def.py +185 -104
  221. mindspore/ops/operations/math_ops.py +11 -216
  222. mindspore/ops/operations/nn_ops.py +146 -308
  223. mindspore/ops/primitive.py +23 -21
  224. mindspore/ops/tensor_method.py +1669 -0
  225. mindspore/ops_generate/aclnn_kernel_register_auto_cc_generator.py +110 -0
  226. mindspore/ops_generate/add_tensor_docs_generator.py +54 -0
  227. mindspore/ops_generate/arg_handler.py +0 -61
  228. mindspore/ops_generate/auto_grad_impl_cc_generator.py +135 -0
  229. mindspore/ops_generate/auto_grad_reg_cc_generator.py +93 -0
  230. mindspore/ops_generate/base_generator.py +11 -0
  231. mindspore/ops_generate/cpp_create_prim_instance_helper_generator.py +108 -0
  232. mindspore/ops_generate/functional_map_cpp_generator.py +491 -0
  233. mindspore/ops_generate/functional_overload_py_generator.py +110 -0
  234. mindspore/ops_generate/functions_cc_generator.py +233 -0
  235. mindspore/ops_generate/gen_aclnn_implement.py +110 -114
  236. mindspore/ops_generate/gen_constants.py +157 -3
  237. mindspore/ops_generate/gen_ops.py +245 -990
  238. mindspore/ops_generate/gen_pyboost_func.py +97 -998
  239. mindspore/ops_generate/gen_utils.py +119 -33
  240. mindspore/ops_generate/lite_ops_cpp_generator.py +155 -0
  241. mindspore/ops_generate/op_api_proto.py +206 -0
  242. mindspore/ops_generate/op_def_py_generator.py +131 -0
  243. mindspore/ops_generate/op_prim_py_generator.py +480 -0
  244. mindspore/ops_generate/op_proto.py +373 -108
  245. mindspore/ops_generate/op_template_parser.py +436 -0
  246. mindspore/ops_generate/ops_def_cc_generator.py +288 -0
  247. mindspore/ops_generate/ops_def_h_generator.py +74 -0
  248. mindspore/ops_generate/ops_name_h_generator.py +68 -0
  249. mindspore/ops_generate/ops_primitive_h_generator.py +81 -0
  250. mindspore/ops_generate/pyboost_functions_cpp_generator.py +370 -0
  251. mindspore/ops_generate/pyboost_functions_h_generator.py +68 -0
  252. mindspore/ops_generate/pyboost_functions_py_generator.py +148 -0
  253. mindspore/ops_generate/pyboost_grad_function_cpp_generator.py +154 -0
  254. mindspore/ops_generate/pyboost_inner_prim_generator.py +131 -0
  255. mindspore/ops_generate/pyboost_native_grad_functions_generator.py +268 -0
  256. mindspore/ops_generate/pyboost_op_cpp_code_generator.py +851 -0
  257. mindspore/ops_generate/pyboost_overload_functions_cpp_generator.py +344 -0
  258. mindspore/ops_generate/pyboost_utils.py +92 -33
  259. mindspore/ops_generate/template.py +294 -44
  260. mindspore/ops_generate/tensor_func_reg_cpp_generator.py +422 -0
  261. mindspore/parallel/__init__.py +3 -3
  262. mindspore/parallel/_auto_parallel_context.py +24 -33
  263. mindspore/parallel/_parallel_serialization.py +13 -2
  264. mindspore/parallel/_utils.py +4 -1
  265. mindspore/parallel/algo_parameter_config.py +1 -1
  266. mindspore/parallel/checkpoint_transform.py +44 -0
  267. mindspore/parallel/cluster/process_entity/_api.py +131 -37
  268. mindspore/parallel/cluster/process_entity/_utils.py +41 -6
  269. mindspore/parallel/cluster/run.py +20 -3
  270. mindspore/parallel/parameter_broadcast.py +1 -1
  271. mindspore/parallel/shard.py +3 -0
  272. mindspore/parallel/transform_safetensors.py +119 -253
  273. mindspore/pgodb140.dll +0 -0
  274. mindspore/pgort140.dll +0 -0
  275. mindspore/profiler/__init__.py +17 -4
  276. mindspore/profiler/analysis/__init__.py +0 -0
  277. mindspore/profiler/analysis/parser/__init__.py +0 -0
  278. mindspore/profiler/analysis/parser/ascend_cann_parser.py +166 -0
  279. mindspore/profiler/analysis/parser/base_parser.py +158 -0
  280. mindspore/profiler/analysis/parser/framework_cann_relation_parser.py +45 -0
  281. mindspore/profiler/analysis/parser/ms_framework_parser.py +142 -0
  282. mindspore/profiler/analysis/parser/ms_minddata_parser.py +145 -0
  283. mindspore/profiler/analysis/parser/timeline_assembly_factory/__init__.py +0 -0
  284. mindspore/profiler/analysis/parser/timeline_assembly_factory/ascend_timeline_assembler.py +261 -0
  285. mindspore/profiler/analysis/parser/timeline_assembly_factory/base_timeline_assembler.py +40 -0
  286. mindspore/profiler/analysis/parser/timeline_assembly_factory/trace_view_container.py +84 -0
  287. mindspore/profiler/analysis/parser/timeline_creator/__init__.py +0 -0
  288. mindspore/profiler/analysis/parser/timeline_creator/base_timeline_creator.py +44 -0
  289. mindspore/profiler/analysis/parser/timeline_creator/cpu_op_timeline_creator.py +90 -0
  290. mindspore/profiler/analysis/parser/timeline_creator/fwk_timeline_creator.py +76 -0
  291. mindspore/profiler/analysis/parser/timeline_creator/msprof_timeline_creator.py +103 -0
  292. mindspore/profiler/analysis/parser/timeline_creator/scope_layer_timeline_creator.py +134 -0
  293. mindspore/profiler/analysis/parser/timeline_event/__init__.py +0 -0
  294. mindspore/profiler/analysis/parser/timeline_event/base_event.py +233 -0
  295. mindspore/profiler/analysis/parser/timeline_event/cpu_op_event.py +47 -0
  296. mindspore/profiler/analysis/parser/timeline_event/flow_event.py +36 -0
  297. mindspore/profiler/analysis/parser/timeline_event/fwk_event.py +260 -0
  298. mindspore/profiler/analysis/parser/timeline_event/msprof_event.py +73 -0
  299. mindspore/profiler/analysis/parser/timeline_event/scope_layer_event.py +53 -0
  300. mindspore/profiler/analysis/parser/timeline_event/timeline_event_pool.py +146 -0
  301. mindspore/profiler/analysis/task_manager.py +131 -0
  302. mindspore/profiler/analysis/time_converter.py +84 -0
  303. mindspore/profiler/analysis/viewer/__init__.py +0 -0
  304. mindspore/profiler/analysis/viewer/ascend_communication_viewer.py +333 -0
  305. mindspore/profiler/analysis/viewer/ascend_integrate_viewer.py +87 -0
  306. mindspore/profiler/analysis/viewer/ascend_kernel_details_viewer.py +252 -0
  307. mindspore/profiler/analysis/viewer/ascend_memory_viewer.py +313 -0
  308. mindspore/profiler/analysis/viewer/ascend_op_memory_viewer.py +322 -0
  309. mindspore/profiler/analysis/viewer/ascend_step_trace_time_viewer.py +265 -0
  310. mindspore/profiler/analysis/viewer/ascend_timeline_viewer.py +58 -0
  311. mindspore/profiler/analysis/viewer/base_viewer.py +26 -0
  312. mindspore/profiler/analysis/viewer/ms_dataset_viewer.py +97 -0
  313. mindspore/profiler/analysis/viewer/ms_minddata_viewer.py +581 -0
  314. mindspore/profiler/analysis/work_flow.py +73 -0
  315. mindspore/profiler/common/ascend_msprof_exporter.py +138 -0
  316. mindspore/profiler/common/command_executor.py +90 -0
  317. mindspore/profiler/common/constant.py +174 -3
  318. mindspore/profiler/common/file_manager.py +208 -0
  319. mindspore/profiler/common/log.py +130 -0
  320. mindspore/profiler/common/msprof_cmd_tool.py +202 -0
  321. mindspore/profiler/common/path_manager.py +371 -0
  322. mindspore/profiler/common/process_bar.py +168 -0
  323. mindspore/profiler/common/process_pool.py +9 -3
  324. mindspore/profiler/common/profiler_context.py +476 -0
  325. mindspore/profiler/common/profiler_info.py +304 -0
  326. mindspore/profiler/common/profiler_output_path.py +284 -0
  327. mindspore/profiler/common/profiler_parameters.py +210 -0
  328. mindspore/profiler/common/profiler_path_manager.py +120 -0
  329. mindspore/profiler/common/record_function.py +76 -0
  330. mindspore/profiler/common/tlv_decoder.py +76 -0
  331. mindspore/profiler/common/util.py +75 -2
  332. mindspore/profiler/dynamic_profiler.py +270 -37
  333. mindspore/profiler/envprofiler.py +138 -0
  334. mindspore/profiler/mstx.py +199 -0
  335. mindspore/profiler/platform/__init__.py +21 -0
  336. mindspore/profiler/platform/base_profiler.py +40 -0
  337. mindspore/profiler/platform/cpu_profiler.py +124 -0
  338. mindspore/profiler/platform/gpu_profiler.py +74 -0
  339. mindspore/profiler/platform/npu_profiler.py +309 -0
  340. mindspore/profiler/profiler.py +580 -93
  341. mindspore/profiler/profiler_action_controller.py +187 -0
  342. mindspore/profiler/profiler_interface.py +114 -0
  343. mindspore/profiler/schedule.py +208 -0
  344. mindspore/rewrite/api/symbol_tree.py +1 -2
  345. mindspore/run_check/_check_version.py +2 -6
  346. mindspore/runtime/__init__.py +37 -0
  347. mindspore/runtime/device.py +27 -0
  348. mindspore/runtime/event.py +209 -0
  349. mindspore/runtime/executor.py +148 -0
  350. mindspore/runtime/memory.py +392 -0
  351. mindspore/runtime/stream.py +460 -0
  352. mindspore/runtime/thread_bind_core.py +401 -0
  353. mindspore/swresample-4.dll +0 -0
  354. mindspore/swscale-6.dll +0 -0
  355. mindspore/tbbmalloc.dll +0 -0
  356. mindspore/tinyxml2.dll +0 -0
  357. mindspore/train/__init__.py +2 -2
  358. mindspore/train/_utils.py +53 -18
  359. mindspore/train/amp.py +8 -4
  360. mindspore/train/callback/_checkpoint.py +32 -18
  361. mindspore/train/callback/_early_stop.py +1 -1
  362. mindspore/train/callback/_flops_collector.py +105 -69
  363. mindspore/train/callback/_history.py +1 -1
  364. mindspore/train/callback/_summary_collector.py +44 -6
  365. mindspore/train/callback/_tft_register.py +31 -10
  366. mindspore/train/dataset_helper.py +11 -11
  367. mindspore/train/metrics/precision.py +4 -5
  368. mindspore/train/mind_ir_pb2.py +167 -46
  369. mindspore/train/model.py +13 -15
  370. mindspore/train/serialization.py +462 -76
  371. mindspore/train/summary/summary_record.py +1 -2
  372. mindspore/train/train_thor/model_thor.py +1 -1
  373. mindspore/turbojpeg.dll +0 -0
  374. mindspore/utils/__init__.py +4 -2
  375. mindspore/utils/dryrun.py +138 -0
  376. mindspore/utils/runtime_execution_order_check.py +550 -0
  377. mindspore/vcmeta.dll +0 -0
  378. mindspore/vcruntime140.dll +0 -0
  379. mindspore/vcruntime140_1.dll +0 -0
  380. mindspore/version.py +1 -1
  381. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/METADATA +2 -3
  382. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/RECORD +385 -261
  383. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/entry_points.txt +1 -1
  384. mindspore/common/_tensor_overload.py +0 -139
  385. mindspore/mindspore_np_dtype.dll +0 -0
  386. mindspore/profiler/envprofiling.py +0 -254
  387. mindspore/profiler/profiling.py +0 -1926
  388. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/WHEEL +0 -0
  389. {mindspore-2.4.10.dist-info → mindspore-2.5.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- # Copyright 2023 Huawei Technologies Co., Ltd
1
+ # Copyright 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.
@@ -24,14 +24,14 @@ from mindspore._c_expression import BinaryCrossEntropyPrim_
24
24
  from mindspore._c_expression import BCEWithLogitsLossPrim_
25
25
  from mindspore._c_expression import BroadcastToPrim_
26
26
  from mindspore._c_expression import ConcatPrim_
27
- from mindspore._c_expression import ConvolutionGradPrim_
28
- from mindspore._c_expression import ConvolutionPrim_
29
27
  from mindspore._c_expression import CrossPrim_
30
28
  from mindspore._c_expression import CummaxPrim_
31
29
  from mindspore._c_expression import EluExtPrim_
32
30
  from mindspore._c_expression import FFNExtPrim_
33
31
  from mindspore._c_expression import FlashAttentionScoreGradPrim_
34
32
  from mindspore._c_expression import FlashAttentionScorePrim_
33
+ from mindspore._c_expression import GluGradPrim_
34
+ from mindspore._c_expression import GLUPrim_
35
35
  from mindspore._c_expression import GridSampler2DGradPrim_
36
36
  from mindspore._c_expression import GridSampler2DPrim_
37
37
  from mindspore._c_expression import GridSampler3DGradPrim_
@@ -47,20 +47,31 @@ from mindspore._c_expression import MaxPoolGradWithIndicesPrim_
47
47
  from mindspore._c_expression import MaxPoolGradWithMaskPrim_
48
48
  from mindspore._c_expression import MaxPoolWithIndicesPrim_
49
49
  from mindspore._c_expression import MaxPoolWithMaskPrim_
50
+ from mindspore._c_expression import MeshgridPrim_
50
51
  from mindspore._c_expression import NanToNumPrim_
52
+ from mindspore._c_expression import NLLLossGradPrim_
53
+ from mindspore._c_expression import NLLLossPrim_
51
54
  from mindspore._c_expression import OneHotExtPrim_
55
+ from mindspore._c_expression import PromptFlashAttentionPrim_
52
56
  from mindspore._c_expression import ReduceAllPrim_
53
57
  from mindspore._c_expression import ReduceAnyPrim_
58
+ from mindspore._c_expression import ReduceMaxPrim_
59
+ from mindspore._c_expression import ReduceMinPrim_
54
60
  from mindspore._c_expression import ReverseV2Prim_
55
61
  from mindspore._c_expression import RmsNormPrim_
56
62
  from mindspore._c_expression import RollPrim_
57
63
  from mindspore._c_expression import SearchSortedPrim_
64
+ from mindspore._c_expression import SmoothL1LossGradPrim_
65
+ from mindspore._c_expression import SmoothL1LossPrim_
58
66
  from mindspore._c_expression import SoftmaxPrim_
59
67
  from mindspore._c_expression import SoftShrinkGradPrim_
60
68
  from mindspore._c_expression import SoftShrinkPrim_
69
+ from mindspore._c_expression import SplitPrim_
70
+ from mindspore._c_expression import SqueezePrim_
61
71
  from mindspore._c_expression import StackExtPrim_
62
72
  from mindspore._c_expression import TrilExtPrim_
63
73
  from mindspore._c_expression import TriuPrim_
74
+ from mindspore._c_expression import UniqueConsecutivePrim_
64
75
  from mindspore._c_expression import UpsampleTrilinear3DGradPrim_
65
76
  from mindspore._c_expression import UpsampleTrilinear3DPrim_
66
77
  from mindspore._c_expression import GroupedMatmulPrim_
@@ -71,7 +82,7 @@ from mindspore._c_expression import WeightQuantBatchMatmulPrim_
71
82
  class _PyboostArgMaxWithValuePrim(ArgMaxWithValuePrim_):
72
83
  def __call__(self, input, axis, keep_dims):
73
84
 
74
- return _convert_stub(super().__call__(input, axis, keep_dims))
85
+ return _convert_stub(super().__call__([input, axis, keep_dims]))
75
86
 
76
87
 
77
88
  argmax_with_value_impl = _PyboostArgMaxWithValuePrim()
@@ -80,7 +91,7 @@ argmax_with_value_impl = _PyboostArgMaxWithValuePrim()
80
91
  class _PyboostArgMinWithValuePrim(ArgMinWithValuePrim_):
81
92
  def __call__(self, input, axis, keep_dims):
82
93
 
83
- return _convert_stub(super().__call__(input, axis, keep_dims))
94
+ return _convert_stub(super().__call__([input, axis, keep_dims]))
84
95
 
85
96
 
86
97
  argmin_with_value_impl = _PyboostArgMinWithValuePrim()
@@ -89,16 +100,16 @@ argmin_with_value_impl = _PyboostArgMinWithValuePrim()
89
100
  class _PyboostBatchMatMulPrim(BatchMatMulPrim_):
90
101
  def __call__(self, x, y, transpose_a, transpose_b):
91
102
 
92
- return _convert_stub(super().__call__(x, y, transpose_a, transpose_b))
103
+ return _convert_stub(super().__call__([x, y, transpose_a, transpose_b]))
93
104
 
94
105
 
95
106
  batch_mat_mul_impl = _PyboostBatchMatMulPrim()
96
107
 
97
108
 
98
109
  class _PyboostBatchNormGradExtPrim(BatchNormGradExtPrim_):
99
- def __call__(self, dout, input, weight, running_mean, running_var, saved_mean, saved_rstd, training, eps):
110
+ def __call__(self, dout, input, weight, running_mean, running_var, saved_mean, saved_rstd, training, eps, output_mask):
100
111
 
101
- return _convert_stub(super().__call__(dout, input, weight, running_mean, running_var, saved_mean, saved_rstd, training, eps))
112
+ return _convert_stub(super().__call__([dout, input, weight, running_mean, running_var, saved_mean, saved_rstd, training, eps, output_mask]))
102
113
 
103
114
 
104
115
  batch_norm_grad_ext_impl = _PyboostBatchNormGradExtPrim()
@@ -107,7 +118,7 @@ batch_norm_grad_ext_impl = _PyboostBatchNormGradExtPrim()
107
118
  class _PyboostBinaryCrossEntropyGradPrim(BinaryCrossEntropyGradPrim_):
108
119
  def __call__(self, input, target, grad_output, weight, reduction):
109
120
  converted_reduction = str_to_enum('binary_cross_entropy_grad', 'reduction', reduction)
110
- return _convert_stub(super().__call__(input, target, grad_output, weight, converted_reduction))
121
+ return _convert_stub(super().__call__([input, target, grad_output, weight, converted_reduction]))
111
122
 
112
123
 
113
124
  binary_cross_entropy_grad_impl = _PyboostBinaryCrossEntropyGradPrim()
@@ -116,7 +127,7 @@ binary_cross_entropy_grad_impl = _PyboostBinaryCrossEntropyGradPrim()
116
127
  class _PyboostBinaryCrossEntropyPrim(BinaryCrossEntropyPrim_):
117
128
  def __call__(self, input, target, weight, reduction):
118
129
  converted_reduction = str_to_enum('binary_cross_entropy', 'reduction', reduction)
119
- return _convert_stub(super().__call__(input, target, weight, converted_reduction))
130
+ return _convert_stub(super().__call__([input, target, weight, converted_reduction]))
120
131
 
121
132
 
122
133
  binary_cross_entropy_impl = _PyboostBinaryCrossEntropyPrim()
@@ -125,7 +136,7 @@ binary_cross_entropy_impl = _PyboostBinaryCrossEntropyPrim()
125
136
  class _PyboostBCEWithLogitsLossPrim(BCEWithLogitsLossPrim_):
126
137
  def __call__(self, input, target, weight, posWeight, reduction):
127
138
  converted_reduction = str_to_enum('binary_cross_entropy_with_logits', 'reduction', reduction)
128
- return _convert_stub(super().__call__(input, target, weight, posWeight, converted_reduction))
139
+ return _convert_stub(super().__call__([input, target, weight, posWeight, converted_reduction]))
129
140
 
130
141
 
131
142
  binary_cross_entropy_with_logits_impl = _PyboostBCEWithLogitsLossPrim()
@@ -134,7 +145,7 @@ binary_cross_entropy_with_logits_impl = _PyboostBCEWithLogitsLossPrim()
134
145
  class _PyboostBroadcastToPrim(BroadcastToPrim_):
135
146
  def __call__(self, input, shape):
136
147
 
137
- return _convert_stub(super().__call__(input, shape))
148
+ return _convert_stub(super().__call__([input, shape]))
138
149
 
139
150
 
140
151
  broadcast_to_impl = _PyboostBroadcastToPrim()
@@ -143,40 +154,16 @@ broadcast_to_impl = _PyboostBroadcastToPrim()
143
154
  class _PyboostConcatPrim(ConcatPrim_):
144
155
  def __call__(self, tensors, axis):
145
156
 
146
- return _convert_stub(super().__call__(tensors, axis))
157
+ return _convert_stub(super().__call__([tensors, axis]))
147
158
 
148
159
 
149
160
  concat_impl = _PyboostConcatPrim()
150
161
 
151
162
 
152
- class _PyboostConvolutionGradPrim(ConvolutionGradPrim_):
153
- def __call__(self, dout, input, weight, bias, stride, padding, dilation, transposed, output_padding, groups, output_mask):
154
- converted_stride = to_strides('convolution_grad', 'stride', stride)
155
- converted_padding = to_2d_paddings('convolution_grad', 'padding', padding)
156
- converted_dilation = to_dilations('convolution_grad', 'dilation', dilation)
157
- converted_output_padding = to_output_padding('convolution_grad', 'output_padding', output_padding)
158
- return _convert_stub(super().__call__(dout, input, weight, bias, converted_stride, converted_padding, converted_dilation, transposed, converted_output_padding, groups, output_mask))
159
-
160
-
161
- convolution_grad_impl = _PyboostConvolutionGradPrim()
162
-
163
-
164
- class _PyboostConvolutionPrim(ConvolutionPrim_):
165
- def __call__(self, input, weight, bias, stride, padding, dilation, transposed, output_padding, groups):
166
- converted_stride = to_strides('convolution', 'stride', stride)
167
- converted_padding = to_2d_paddings('convolution', 'padding', padding)
168
- converted_dilation = to_dilations('convolution', 'dilation', dilation)
169
- converted_output_padding = to_output_padding('convolution', 'output_padding', output_padding)
170
- return _convert_stub(super().__call__(input, weight, bias, converted_stride, converted_padding, converted_dilation, transposed, converted_output_padding, groups))
171
-
172
-
173
- convolution_impl = _PyboostConvolutionPrim()
174
-
175
-
176
163
  class _PyboostCrossPrim(CrossPrim_):
177
164
  def __call__(self, input, other, dim):
178
165
 
179
- return _convert_stub(super().__call__(input, other, dim))
166
+ return _convert_stub(super().__call__([input, other, dim]))
180
167
 
181
168
 
182
169
  cross_impl = _PyboostCrossPrim()
@@ -185,7 +172,7 @@ cross_impl = _PyboostCrossPrim()
185
172
  class _PyboostCummaxPrim(CummaxPrim_):
186
173
  def __call__(self, input, axis):
187
174
 
188
- return _convert_stub(super().__call__(input, axis))
175
+ return _convert_stub(super().__call__([input, axis]))
189
176
 
190
177
 
191
178
  cummax_impl = _PyboostCummaxPrim()
@@ -194,7 +181,7 @@ cummax_impl = _PyboostCummaxPrim()
194
181
  class _PyboostEluExtPrim(EluExtPrim_):
195
182
  def __call__(self, input, alpha):
196
183
 
197
- return _convert_stub(super().__call__(input, alpha))
184
+ return _convert_stub(super().__call__([input, alpha]))
198
185
 
199
186
 
200
187
  elu_ext_impl = _PyboostEluExtPrim()
@@ -203,7 +190,7 @@ elu_ext_impl = _PyboostEluExtPrim()
203
190
  class _PyboostFFNExtPrim(FFNExtPrim_):
204
191
  def __call__(self, x, weight1, weight2, expertTokens, bias1, bias2, scale, offset, deqScale1, deqScale2, antiquant_scale1, antiquant_scale2, antiquant_offset1, antiquant_offset2, activation, inner_precise):
205
192
  converted_activation = str_to_enum('ffn_ext', 'activation', activation)
206
- return _convert_stub(super().__call__(x, weight1, weight2, expertTokens, bias1, bias2, scale, offset, deqScale1, deqScale2, antiquant_scale1, antiquant_scale2, antiquant_offset1, antiquant_offset2, converted_activation, inner_precise))
193
+ return _convert_stub(super().__call__([x, weight1, weight2, expertTokens, bias1, bias2, scale, offset, deqScale1, deqScale2, antiquant_scale1, antiquant_scale2, antiquant_offset1, antiquant_offset2, converted_activation, inner_precise]))
207
194
 
208
195
 
209
196
  ffn_ext_impl = _PyboostFFNExtPrim()
@@ -212,7 +199,7 @@ ffn_ext_impl = _PyboostFFNExtPrim()
212
199
  class _PyboostFlashAttentionScoreGradPrim(FlashAttentionScoreGradPrim_):
213
200
  def __call__(self, query, key, value, dy, pse_shift, drop_mask, padding_mask, atten_mask, softmax_max, softmax_sum, softmax_in, attention_in, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, input_layout, sparse_mode):
214
201
  converted_input_layout = str_to_enum('flash_attention_score_grad', 'input_layout', input_layout)
215
- return _convert_stub(super().__call__(query, key, value, dy, pse_shift, drop_mask, padding_mask, atten_mask, softmax_max, softmax_sum, softmax_in, attention_in, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, converted_input_layout, sparse_mode))
202
+ return _convert_stub(super().__call__([query, key, value, dy, pse_shift, drop_mask, padding_mask, atten_mask, softmax_max, softmax_sum, softmax_in, attention_in, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, converted_input_layout, sparse_mode]))
216
203
 
217
204
 
218
205
  flash_attention_score_grad_impl = _PyboostFlashAttentionScoreGradPrim()
@@ -221,17 +208,35 @@ flash_attention_score_grad_impl = _PyboostFlashAttentionScoreGradPrim()
221
208
  class _PyboostFlashAttentionScorePrim(FlashAttentionScorePrim_):
222
209
  def __call__(self, query, key, value, real_shift, drop_mask, padding_mask, attn_mask, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, input_layout, sparse_mode):
223
210
  converted_input_layout = str_to_enum('flash_attention_score', 'input_layout', input_layout)
224
- return _convert_stub(super().__call__(query, key, value, real_shift, drop_mask, padding_mask, attn_mask, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, converted_input_layout, sparse_mode))
211
+ return _convert_stub(super().__call__([query, key, value, real_shift, drop_mask, padding_mask, attn_mask, prefix, actual_seq_qlen, actual_seq_kvlen, head_num, keep_prob, scale_value, pre_tokens, next_tokens, inner_precise, converted_input_layout, sparse_mode]))
225
212
 
226
213
 
227
214
  flash_attention_score_impl = _PyboostFlashAttentionScorePrim()
228
215
 
229
216
 
217
+ class _PyboostGluGradPrim(GluGradPrim_):
218
+ def __call__(self, grads, x, axis):
219
+
220
+ return _convert_stub(super().__call__([grads, x, axis]))
221
+
222
+
223
+ glu_grad_impl = _PyboostGluGradPrim()
224
+
225
+
226
+ class _PyboostGLUPrim(GLUPrim_):
227
+ def __call__(self, x, axis):
228
+
229
+ return _convert_stub(super().__call__([x, axis]))
230
+
231
+
232
+ glu_impl = _PyboostGLUPrim()
233
+
234
+
230
235
  class _PyboostGridSampler2DGradPrim(GridSampler2DGradPrim_):
231
- def __call__(self, grad, input_x, grid, interpolation_mode, padding_mode, align_corners):
236
+ def __call__(self, grad, input_x, grid, interpolation_mode, padding_mode, align_corners, output_mask):
232
237
  converted_interpolation_mode = str_to_enum('grid_sampler_2d_grad', 'interpolation_mode', interpolation_mode)
233
238
  converted_padding_mode = str_to_enum('grid_sampler_2d_grad', 'padding_mode', padding_mode)
234
- return _convert_stub(super().__call__(grad, input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners))
239
+ return _convert_stub(super().__call__([grad, input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners, output_mask]))
235
240
 
236
241
 
237
242
  grid_sampler_2d_grad_impl = _PyboostGridSampler2DGradPrim()
@@ -241,17 +246,17 @@ class _PyboostGridSampler2DPrim(GridSampler2DPrim_):
241
246
  def __call__(self, input_x, grid, interpolation_mode, padding_mode, align_corners):
242
247
  converted_interpolation_mode = str_to_enum('grid_sampler_2d', 'interpolation_mode', interpolation_mode)
243
248
  converted_padding_mode = str_to_enum('grid_sampler_2d', 'padding_mode', padding_mode)
244
- return _convert_stub(super().__call__(input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners))
249
+ return _convert_stub(super().__call__([input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners]))
245
250
 
246
251
 
247
252
  grid_sampler_2d_impl = _PyboostGridSampler2DPrim()
248
253
 
249
254
 
250
255
  class _PyboostGridSampler3DGradPrim(GridSampler3DGradPrim_):
251
- def __call__(self, grad, input_x, grid, interpolation_mode, padding_mode, align_corners):
256
+ def __call__(self, grad, input_x, grid, interpolation_mode, padding_mode, align_corners, output_mask):
252
257
  converted_interpolation_mode = str_to_enum('grid_sampler_3d_grad', 'interpolation_mode', interpolation_mode)
253
258
  converted_padding_mode = str_to_enum('grid_sampler_3d_grad', 'padding_mode', padding_mode)
254
- return _convert_stub(super().__call__(grad, input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners))
259
+ return _convert_stub(super().__call__([grad, input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners, output_mask]))
255
260
 
256
261
 
257
262
  grid_sampler_3d_grad_impl = _PyboostGridSampler3DGradPrim()
@@ -261,7 +266,7 @@ class _PyboostGridSampler3DPrim(GridSampler3DPrim_):
261
266
  def __call__(self, input_x, grid, interpolation_mode, padding_mode, align_corners):
262
267
  converted_interpolation_mode = str_to_enum('grid_sampler_3d', 'interpolation_mode', interpolation_mode)
263
268
  converted_padding_mode = str_to_enum('grid_sampler_3d', 'padding_mode', padding_mode)
264
- return _convert_stub(super().__call__(input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners))
269
+ return _convert_stub(super().__call__([input_x, grid, converted_interpolation_mode, converted_padding_mode, align_corners]))
265
270
 
266
271
 
267
272
  grid_sampler_3d_impl = _PyboostGridSampler3DPrim()
@@ -270,7 +275,7 @@ grid_sampler_3d_impl = _PyboostGridSampler3DPrim()
270
275
  class _PyboostHShrinkGradPrim(HShrinkGradPrim_):
271
276
  def __call__(self, gradients, features, lambd):
272
277
 
273
- return _convert_stub(super().__call__(gradients, features, lambd))
278
+ return _convert_stub(super().__call__([gradients, features, lambd]))
274
279
 
275
280
 
276
281
  hshrink_grad_impl = _PyboostHShrinkGradPrim()
@@ -279,7 +284,7 @@ hshrink_grad_impl = _PyboostHShrinkGradPrim()
279
284
  class _PyboostHShrinkPrim(HShrinkPrim_):
280
285
  def __call__(self, input, lambd):
281
286
 
282
- return _convert_stub(super().__call__(input, lambd))
287
+ return _convert_stub(super().__call__([input, lambd]))
283
288
 
284
289
 
285
290
  hshrink_impl = _PyboostHShrinkPrim()
@@ -288,7 +293,7 @@ hshrink_impl = _PyboostHShrinkPrim()
288
293
  class _PyboostIncreFlashAttentionPrim(IncreFlashAttentionPrim_):
289
294
  def __call__(self, query, key, value, attn_mask, actual_seq_lengths, pse_shift, dequant_scale1, quant_scale1, dequant_scale2, quant_scale2, quant_offset2, antiquant_scale, antiquant_offset, block_table, kv_padding_size, num_heads, input_layout, scale_value, num_key_value_heads, block_size, inner_precise):
290
295
  converted_input_layout = str_to_enum('incre_flash_attention', 'input_layout', input_layout)
291
- return _convert_stub(super().__call__(query, key, value, attn_mask, actual_seq_lengths, pse_shift, dequant_scale1, quant_scale1, dequant_scale2, quant_scale2, quant_offset2, antiquant_scale, antiquant_offset, block_table, kv_padding_size, num_heads, converted_input_layout, scale_value, num_key_value_heads, block_size, inner_precise))
296
+ return _convert_stub(super().__call__([query, key, value, attn_mask, actual_seq_lengths, pse_shift, dequant_scale1, quant_scale1, dequant_scale2, quant_scale2, quant_offset2, antiquant_scale, antiquant_offset, block_table, kv_padding_size, num_heads, converted_input_layout, scale_value, num_key_value_heads, block_size, inner_precise]))
292
297
 
293
298
 
294
299
  incre_flash_attention_impl = _PyboostIncreFlashAttentionPrim()
@@ -297,7 +302,7 @@ incre_flash_attention_impl = _PyboostIncreFlashAttentionPrim()
297
302
  class _PyboostIsClosePrim(IsClosePrim_):
298
303
  def __call__(self, input, other, rtol, atol, equal_nan):
299
304
 
300
- return _convert_stub(super().__call__(input, other, rtol, atol, equal_nan))
305
+ return _convert_stub(super().__call__([input, other, rtol, atol, equal_nan]))
301
306
 
302
307
 
303
308
  isclose_impl = _PyboostIsClosePrim()
@@ -306,7 +311,7 @@ isclose_impl = _PyboostIsClosePrim()
306
311
  class _PyboostLogSoftmaxGradPrim(LogSoftmaxGradPrim_):
307
312
  def __call__(self, logits, grad, axis):
308
313
 
309
- return _convert_stub(super().__call__(logits, grad, axis))
314
+ return _convert_stub(super().__call__([logits, grad, axis]))
310
315
 
311
316
 
312
317
  log_softmax_grad_impl = _PyboostLogSoftmaxGradPrim()
@@ -315,7 +320,7 @@ log_softmax_grad_impl = _PyboostLogSoftmaxGradPrim()
315
320
  class _PyboostLogSoftmaxPrim(LogSoftmaxPrim_):
316
321
  def __call__(self, logits, axis):
317
322
 
318
- return _convert_stub(super().__call__(logits, axis))
323
+ return _convert_stub(super().__call__([logits, axis]))
319
324
 
320
325
 
321
326
  log_softmax_impl = _PyboostLogSoftmaxPrim()
@@ -324,7 +329,7 @@ log_softmax_impl = _PyboostLogSoftmaxPrim()
324
329
  class _PyboostMatMulPrim(MatMulPrim_):
325
330
  def __call__(self, input, mat2, transpose_a, transpose_b):
326
331
 
327
- return _convert_stub(super().__call__(input, mat2, transpose_a, transpose_b))
332
+ return _convert_stub(super().__call__([input, mat2, transpose_a, transpose_b]))
328
333
 
329
334
 
330
335
  matmul_impl = _PyboostMatMulPrim()
@@ -336,7 +341,7 @@ class _PyboostMaxPoolGradWithIndicesPrim(MaxPoolGradWithIndicesPrim_):
336
341
  converted_strides = to_strides('max_pool_grad_with_indices', 'strides', strides)
337
342
  converted_pads = to_output_padding('max_pool_grad_with_indices', 'pads', pads)
338
343
  converted_dilation = to_dilations('max_pool_grad_with_indices', 'dilation', dilation)
339
- return _convert_stub(super().__call__(x, grad, argmax, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type))
344
+ return _convert_stub(super().__call__([x, grad, argmax, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type]))
340
345
 
341
346
 
342
347
  max_pool_grad_with_indices_impl = _PyboostMaxPoolGradWithIndicesPrim()
@@ -348,7 +353,7 @@ class _PyboostMaxPoolGradWithMaskPrim(MaxPoolGradWithMaskPrim_):
348
353
  converted_strides = to_strides('max_pool_grad_with_mask', 'strides', strides)
349
354
  converted_pads = to_output_padding('max_pool_grad_with_mask', 'pads', pads)
350
355
  converted_dilation = to_dilations('max_pool_grad_with_mask', 'dilation', dilation)
351
- return _convert_stub(super().__call__(x, grad, mask, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type))
356
+ return _convert_stub(super().__call__([x, grad, mask, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type]))
352
357
 
353
358
 
354
359
  max_pool_grad_with_mask_impl = _PyboostMaxPoolGradWithMaskPrim()
@@ -360,7 +365,7 @@ class _PyboostMaxPoolWithIndicesPrim(MaxPoolWithIndicesPrim_):
360
365
  converted_strides = to_strides('max_pool_with_indices', 'strides', strides)
361
366
  converted_pads = to_output_padding('max_pool_with_indices', 'pads', pads)
362
367
  converted_dilation = to_dilations('max_pool_with_indices', 'dilation', dilation)
363
- return _convert_stub(super().__call__(x, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type))
368
+ return _convert_stub(super().__call__([x, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type]))
364
369
 
365
370
 
366
371
  max_pool_with_indices_impl = _PyboostMaxPoolWithIndicesPrim()
@@ -372,34 +377,70 @@ class _PyboostMaxPoolWithMaskPrim(MaxPoolWithMaskPrim_):
372
377
  converted_strides = to_strides('max_pool_with_mask', 'strides', strides)
373
378
  converted_pads = to_output_padding('max_pool_with_mask', 'pads', pads)
374
379
  converted_dilation = to_dilations('max_pool_with_mask', 'dilation', dilation)
375
- return _convert_stub(super().__call__(x, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type))
380
+ return _convert_stub(super().__call__([x, converted_kernel_size, converted_strides, converted_pads, converted_dilation, ceil_mode, argmax_type]))
376
381
 
377
382
 
378
383
  max_pool_with_mask_impl = _PyboostMaxPoolWithMaskPrim()
379
384
 
380
385
 
386
+ class _PyboostMeshgridPrim(MeshgridPrim_):
387
+ def __call__(self, inputs, indexing):
388
+ converted_indexing = str_to_enum('meshgrid', 'indexing', indexing)
389
+ return _convert_stub(super().__call__([inputs, converted_indexing]))
390
+
391
+
392
+ meshgrid_impl = _PyboostMeshgridPrim()
393
+
394
+
381
395
  class _PyboostNanToNumPrim(NanToNumPrim_):
382
396
  def __call__(self, input, nan, posinf, neginf):
383
397
 
384
- return _convert_stub(super().__call__(input, nan, posinf, neginf))
398
+ return _convert_stub(super().__call__([input, nan, posinf, neginf]))
385
399
 
386
400
 
387
401
  nan_to_num_impl = _PyboostNanToNumPrim()
388
402
 
389
403
 
404
+ class _PyboostNLLLossGradPrim(NLLLossGradPrim_):
405
+ def __call__(self, logits, loss_grad, labels, weight, total_weight, reduction, ignore_index):
406
+ converted_reduction = str_to_enum('nllloss_grad', 'reduction', reduction)
407
+ return _convert_stub(super().__call__([logits, loss_grad, labels, weight, total_weight, converted_reduction, ignore_index]))
408
+
409
+
410
+ nllloss_grad_impl = _PyboostNLLLossGradPrim()
411
+
412
+
413
+ class _PyboostNLLLossPrim(NLLLossPrim_):
414
+ def __call__(self, logits, labels, weight, reduction, ignore_index):
415
+ converted_reduction = str_to_enum('nllloss', 'reduction', reduction)
416
+ return _convert_stub(super().__call__([logits, labels, weight, converted_reduction, ignore_index]))
417
+
418
+
419
+ nllloss_impl = _PyboostNLLLossPrim()
420
+
421
+
390
422
  class _PyboostOneHotExtPrim(OneHotExtPrim_):
391
423
  def __call__(self, tensor, num_classes, on_value, off_value, axis):
392
424
 
393
- return _convert_stub(super().__call__(tensor, num_classes, on_value, off_value, axis))
425
+ return _convert_stub(super().__call__([tensor, num_classes, on_value, off_value, axis]))
394
426
 
395
427
 
396
428
  one_hot_ext_impl = _PyboostOneHotExtPrim()
397
429
 
398
430
 
431
+ class _PyboostPromptFlashAttentionPrim(PromptFlashAttentionPrim_):
432
+ def __call__(self, query, key, value, attn_mask, actual_seq_lengths, actual_seq_lengths_kv, pse_shift, deq_scale1, quant_scale1, deq_scale2, quant_scale2, quant_offset2, num_heads, scale_value, pre_tokens, next_tokens, input_layout, num_key_value_heads, sparse_mode, inner_precise):
433
+ converted_input_layout = str_to_enum('prompt_flash_attention', 'input_layout', input_layout)
434
+ return _convert_stub(super().__call__([query, key, value, attn_mask, actual_seq_lengths, actual_seq_lengths_kv, pse_shift, deq_scale1, quant_scale1, deq_scale2, quant_scale2, quant_offset2, num_heads, scale_value, pre_tokens, next_tokens, converted_input_layout, num_key_value_heads, sparse_mode, inner_precise]))
435
+
436
+
437
+ prompt_flash_attention_impl = _PyboostPromptFlashAttentionPrim()
438
+
439
+
399
440
  class _PyboostReduceAllPrim(ReduceAllPrim_):
400
441
  def __call__(self, input, axis, keep_dims):
401
442
 
402
- return _convert_stub(super().__call__(input, axis, keep_dims))
443
+ return _convert_stub(super().__call__([input, axis, keep_dims]))
403
444
 
404
445
 
405
446
  reduce_all_impl = _PyboostReduceAllPrim()
@@ -408,16 +449,34 @@ reduce_all_impl = _PyboostReduceAllPrim()
408
449
  class _PyboostReduceAnyPrim(ReduceAnyPrim_):
409
450
  def __call__(self, x, axis, keep_dims):
410
451
 
411
- return _convert_stub(super().__call__(x, axis, keep_dims))
452
+ return _convert_stub(super().__call__([x, axis, keep_dims]))
412
453
 
413
454
 
414
455
  reduce_any_impl = _PyboostReduceAnyPrim()
415
456
 
416
457
 
458
+ class _PyboostReduceMaxPrim(ReduceMaxPrim_):
459
+ def __call__(self, x, axis, keep_dims):
460
+
461
+ return _convert_stub(super().__call__([x, axis, keep_dims]))
462
+
463
+
464
+ reduce_max_impl = _PyboostReduceMaxPrim()
465
+
466
+
467
+ class _PyboostReduceMinPrim(ReduceMinPrim_):
468
+ def __call__(self, x, axis, keep_dims):
469
+
470
+ return _convert_stub(super().__call__([x, axis, keep_dims]))
471
+
472
+
473
+ reduce_min_impl = _PyboostReduceMinPrim()
474
+
475
+
417
476
  class _PyboostReverseV2Prim(ReverseV2Prim_):
418
477
  def __call__(self, input, axis):
419
478
 
420
- return _convert_stub(super().__call__(input, axis))
479
+ return _convert_stub(super().__call__([input, axis]))
421
480
 
422
481
 
423
482
  reverse_v2_impl = _PyboostReverseV2Prim()
@@ -426,7 +485,7 @@ reverse_v2_impl = _PyboostReverseV2Prim()
426
485
  class _PyboostRmsNormPrim(RmsNormPrim_):
427
486
  def __call__(self, x, gamma, epsilon):
428
487
 
429
- return _convert_stub(super().__call__(x, gamma, epsilon))
488
+ return _convert_stub(super().__call__([x, gamma, epsilon]))
430
489
 
431
490
 
432
491
  rms_norm_impl = _PyboostRmsNormPrim()
@@ -435,7 +494,7 @@ rms_norm_impl = _PyboostRmsNormPrim()
435
494
  class _PyboostRollPrim(RollPrim_):
436
495
  def __call__(self, input, shift, axis):
437
496
 
438
- return _convert_stub(super().__call__(input, shift, axis))
497
+ return _convert_stub(super().__call__([input, shift, axis]))
439
498
 
440
499
 
441
500
  roll_impl = _PyboostRollPrim()
@@ -444,16 +503,34 @@ roll_impl = _PyboostRollPrim()
444
503
  class _PyboostSearchSortedPrim(SearchSortedPrim_):
445
504
  def __call__(self, sorted_sequence, values, sorter, dtype, right):
446
505
 
447
- return _convert_stub(super().__call__(sorted_sequence, values, sorter, dtype, right))
506
+ return _convert_stub(super().__call__([sorted_sequence, values, sorter, dtype, right]))
448
507
 
449
508
 
450
509
  searchsorted_impl = _PyboostSearchSortedPrim()
451
510
 
452
511
 
512
+ class _PyboostSmoothL1LossGradPrim(SmoothL1LossGradPrim_):
513
+ def __call__(self, prediction, target, dout, beta, reduction):
514
+ converted_reduction = str_to_enum('smooth_l1_loss_grad', 'reduction', reduction)
515
+ return _convert_stub(super().__call__([prediction, target, dout, beta, converted_reduction]))
516
+
517
+
518
+ smooth_l1_loss_grad_impl = _PyboostSmoothL1LossGradPrim()
519
+
520
+
521
+ class _PyboostSmoothL1LossPrim(SmoothL1LossPrim_):
522
+ def __call__(self, prediction, target, beta, reduction):
523
+ converted_reduction = str_to_enum('smooth_l1_loss', 'reduction', reduction)
524
+ return _convert_stub(super().__call__([prediction, target, beta, converted_reduction]))
525
+
526
+
527
+ smooth_l1_loss_impl = _PyboostSmoothL1LossPrim()
528
+
529
+
453
530
  class _PyboostSoftmaxPrim(SoftmaxPrim_):
454
531
  def __call__(self, input, axis):
455
532
 
456
- return _convert_stub(super().__call__(input, axis))
533
+ return _convert_stub(super().__call__([input, axis]))
457
534
 
458
535
 
459
536
  softmax_impl = _PyboostSoftmaxPrim()
@@ -462,7 +539,7 @@ softmax_impl = _PyboostSoftmaxPrim()
462
539
  class _PyboostSoftShrinkGradPrim(SoftShrinkGradPrim_):
463
540
  def __call__(self, input_grad, input_x, lambd):
464
541
 
465
- return _convert_stub(super().__call__(input_grad, input_x, lambd))
542
+ return _convert_stub(super().__call__([input_grad, input_x, lambd]))
466
543
 
467
544
 
468
545
  softshrink_grad_impl = _PyboostSoftShrinkGradPrim()
@@ -471,16 +548,34 @@ softshrink_grad_impl = _PyboostSoftShrinkGradPrim()
471
548
  class _PyboostSoftShrinkPrim(SoftShrinkPrim_):
472
549
  def __call__(self, input, lambd):
473
550
 
474
- return _convert_stub(super().__call__(input, lambd))
551
+ return _convert_stub(super().__call__([input, lambd]))
475
552
 
476
553
 
477
554
  softshrink_impl = _PyboostSoftShrinkPrim()
478
555
 
479
556
 
557
+ class _PyboostSplitPrim(SplitPrim_):
558
+ def __call__(self, input_x, axis, output_num):
559
+
560
+ return _convert_stub(super().__call__([input_x, axis, output_num]))
561
+
562
+
563
+ split_impl = _PyboostSplitPrim()
564
+
565
+
566
+ class _PyboostSqueezePrim(SqueezePrim_):
567
+ def __call__(self, input, axis):
568
+
569
+ return _convert_stub(super().__call__([input, axis]))
570
+
571
+
572
+ squeeze_impl = _PyboostSqueezePrim()
573
+
574
+
480
575
  class _PyboostStackExtPrim(StackExtPrim_):
481
576
  def __call__(self, tensors, dim):
482
577
 
483
- return _convert_stub(super().__call__(tensors, dim))
578
+ return _convert_stub(super().__call__([tensors, dim]))
484
579
 
485
580
 
486
581
  stack_ext_impl = _PyboostStackExtPrim()
@@ -489,7 +584,7 @@ stack_ext_impl = _PyboostStackExtPrim()
489
584
  class _PyboostTrilExtPrim(TrilExtPrim_):
490
585
  def __call__(self, input, diagonal):
491
586
 
492
- return _convert_stub(super().__call__(input, diagonal))
587
+ return _convert_stub(super().__call__([input, diagonal]))
493
588
 
494
589
 
495
590
  tril_ext_impl = _PyboostTrilExtPrim()
@@ -498,16 +593,25 @@ tril_ext_impl = _PyboostTrilExtPrim()
498
593
  class _PyboostTriuPrim(TriuPrim_):
499
594
  def __call__(self, input, diagonal):
500
595
 
501
- return _convert_stub(super().__call__(input, diagonal))
596
+ return _convert_stub(super().__call__([input, diagonal]))
502
597
 
503
598
 
504
599
  triu_impl = _PyboostTriuPrim()
505
600
 
506
601
 
602
+ class _PyboostUniqueConsecutivePrim(UniqueConsecutivePrim_):
603
+ def __call__(self, input, return_idx, return_counts, axis):
604
+
605
+ return _convert_stub(super().__call__([input, return_idx, return_counts, axis]))
606
+
607
+
608
+ unique_consecutive_impl = _PyboostUniqueConsecutivePrim()
609
+
610
+
507
611
  class _PyboostUpsampleTrilinear3DGradPrim(UpsampleTrilinear3DGradPrim_):
508
612
  def __call__(self, dy, input_size, output_size, scales, align_corners):
509
613
 
510
- return _convert_stub(super().__call__(dy, input_size, output_size, scales, align_corners))
614
+ return _convert_stub(super().__call__([dy, input_size, output_size, scales, align_corners]))
511
615
 
512
616
 
513
617
  upsample_trilinear3d_grad_impl = _PyboostUpsampleTrilinear3DGradPrim()
@@ -516,7 +620,7 @@ upsample_trilinear3d_grad_impl = _PyboostUpsampleTrilinear3DGradPrim()
516
620
  class _PyboostUpsampleTrilinear3DPrim(UpsampleTrilinear3DPrim_):
517
621
  def __call__(self, x, output_size, scales, align_corners):
518
622
 
519
- return _convert_stub(super().__call__(x, output_size, scales, align_corners))
623
+ return _convert_stub(super().__call__([x, output_size, scales, align_corners]))
520
624
 
521
625
 
522
626
  upsample_trilinear3d_impl = _PyboostUpsampleTrilinear3DPrim()
@@ -525,7 +629,7 @@ upsample_trilinear3d_impl = _PyboostUpsampleTrilinear3DPrim()
525
629
  class _PyboostGroupedMatmulPrim(GroupedMatmulPrim_):
526
630
  def __call__(self, x, weight, bias, scale, offset, antiquant_scale, antiquant_offset, group_list, split_item, group_type):
527
631
 
528
- return _convert_stub(super().__call__(x, weight, bias, scale, offset, antiquant_scale, antiquant_offset, group_list, split_item, group_type))
632
+ return _convert_stub(super().__call__([x, weight, bias, scale, offset, antiquant_scale, antiquant_offset, group_list, split_item, group_type]))
529
633
 
530
634
 
531
635
  grouped_matmul_impl = _PyboostGroupedMatmulPrim()
@@ -534,7 +638,7 @@ grouped_matmul_impl = _PyboostGroupedMatmulPrim()
534
638
  class _PyboostQuantBatchMatmulPrim(QuantBatchMatmulPrim_):
535
639
  def __call__(self, x1, x2, scale, offset, bias, pertokenScaleOptional, transpose_x1, transpose_x2, dtype):
536
640
 
537
- return _convert_stub(super().__call__(x1, x2, scale, offset, bias, pertokenScaleOptional, transpose_x1, transpose_x2, dtype))
641
+ return _convert_stub(super().__call__([x1, x2, scale, offset, bias, pertokenScaleOptional, transpose_x1, transpose_x2, dtype]))
538
642
 
539
643
 
540
644
  quant_batch_matmul_impl = _PyboostQuantBatchMatmulPrim()
@@ -543,7 +647,7 @@ quant_batch_matmul_impl = _PyboostQuantBatchMatmulPrim()
543
647
  class _PyboostWeightQuantBatchMatmulPrim(WeightQuantBatchMatmulPrim_):
544
648
  def __call__(self, x, weight, antiquant_scale, antiquant_offset, quant_scale, quant_offset, bias, transpose_x, transpose_weight, antiquant_group_size):
545
649
 
546
- return _convert_stub(super().__call__(x, weight, antiquant_scale, antiquant_offset, quant_scale, quant_offset, bias, transpose_x, transpose_weight, antiquant_group_size))
650
+ return _convert_stub(super().__call__([x, weight, antiquant_scale, antiquant_offset, quant_scale, quant_offset, bias, transpose_x, transpose_weight, antiquant_group_size]))
547
651
 
548
652
 
549
653
  weight_quant_batch_matmul_impl = _PyboostWeightQuantBatchMatmulPrim()
@@ -843,7 +843,7 @@ class HyperMap(HyperMap_):
843
843
  HyperMap will apply the set operation to input sequences.
844
844
 
845
845
  Apply the operations to every element of the sequence or nested sequence. Different
846
- from `mindspore.ops.Map`, the `HyperMap` supports to apply on nested structure. The
846
+ from :class:`mindspore.ops.Map`, the `HyperMap` supports to apply on nested structure. The
847
847
  `HyperMap` also supports dynamic sequences as input, but it does not extend this
848
848
  support to nested dynamic sequences.
849
849