mindspore 2.3.0__cp310-cp310-win_amd64.whl → 2.4.0__cp310-cp310-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 (308) 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 +3 -1
  5. mindspore/_c_dataengine.cp310-win_amd64.pyd +0 -0
  6. mindspore/_c_expression.cp310-win_amd64.pyd +0 -0
  7. mindspore/_c_mindrecord.cp310-win_amd64.pyd +0 -0
  8. mindspore/_checkparam.py +50 -9
  9. mindspore/_extends/parse/compile_config.py +41 -0
  10. mindspore/_extends/parse/parser.py +9 -7
  11. mindspore/_extends/parse/standard_method.py +52 -14
  12. mindspore/_extends/pijit/pijit_func_white_list.py +350 -24
  13. mindspore/amp.py +24 -10
  14. mindspore/atlprov.dll +0 -0
  15. mindspore/avcodec-59.dll +0 -0
  16. mindspore/avdevice-59.dll +0 -0
  17. mindspore/avfilter-8.dll +0 -0
  18. mindspore/avformat-59.dll +0 -0
  19. mindspore/avutil-57.dll +0 -0
  20. mindspore/c1.dll +0 -0
  21. mindspore/c1xx.dll +0 -0
  22. mindspore/c2.dll +0 -0
  23. mindspore/common/__init__.py +6 -4
  24. mindspore/common/_pijit_context.py +190 -0
  25. mindspore/common/_register_for_tensor.py +2 -1
  26. mindspore/common/_tensor_overload.py +139 -0
  27. mindspore/common/api.py +102 -87
  28. mindspore/common/dump.py +5 -6
  29. mindspore/common/generator.py +1 -7
  30. mindspore/common/hook_handle.py +14 -26
  31. mindspore/common/mindir_util.py +2 -2
  32. mindspore/common/parameter.py +46 -13
  33. mindspore/common/recompute.py +39 -9
  34. mindspore/common/sparse_tensor.py +7 -3
  35. mindspore/common/tensor.py +209 -29
  36. mindspore/communication/__init__.py +1 -1
  37. mindspore/communication/_comm_helper.py +38 -3
  38. mindspore/communication/comm_func.py +310 -55
  39. mindspore/communication/management.py +14 -14
  40. mindspore/context.py +123 -22
  41. mindspore/dataset/__init__.py +1 -1
  42. mindspore/dataset/audio/__init__.py +1 -1
  43. mindspore/dataset/core/config.py +7 -0
  44. mindspore/dataset/core/validator_helpers.py +7 -0
  45. mindspore/dataset/engine/cache_client.py +1 -1
  46. mindspore/dataset/engine/datasets.py +72 -44
  47. mindspore/dataset/engine/datasets_audio.py +7 -7
  48. mindspore/dataset/engine/datasets_standard_format.py +53 -3
  49. mindspore/dataset/engine/datasets_text.py +20 -20
  50. mindspore/dataset/engine/datasets_user_defined.py +174 -104
  51. mindspore/dataset/engine/datasets_vision.py +33 -33
  52. mindspore/dataset/engine/iterators.py +29 -0
  53. mindspore/dataset/engine/obs/util.py +7 -0
  54. mindspore/dataset/engine/queue.py +114 -60
  55. mindspore/dataset/engine/serializer_deserializer.py +2 -2
  56. mindspore/dataset/engine/validators.py +34 -14
  57. mindspore/dataset/text/__init__.py +1 -4
  58. mindspore/dataset/transforms/__init__.py +0 -3
  59. mindspore/dataset/utils/line_reader.py +2 -0
  60. mindspore/dataset/vision/__init__.py +1 -4
  61. mindspore/dataset/vision/utils.py +1 -1
  62. mindspore/dataset/vision/validators.py +2 -1
  63. mindspore/dnnl.dll +0 -0
  64. mindspore/dpcmi.dll +0 -0
  65. mindspore/{nn/extend → experimental/es}/__init__.py +4 -11
  66. mindspore/experimental/es/embedding_service.py +883 -0
  67. mindspore/{nn/layer → experimental/es}/embedding_service_layer.py +218 -30
  68. mindspore/experimental/llm_boost/__init__.py +21 -0
  69. mindspore/{nn/extend/layer → experimental/llm_boost/atb}/__init__.py +4 -8
  70. mindspore/experimental/llm_boost/atb/boost_base.py +211 -0
  71. mindspore/experimental/llm_boost/atb/llama_boost.py +115 -0
  72. mindspore/experimental/llm_boost/atb/qwen_boost.py +101 -0
  73. mindspore/experimental/llm_boost/register.py +129 -0
  74. mindspore/experimental/llm_boost/utils.py +31 -0
  75. mindspore/experimental/optim/adamw.py +85 -0
  76. mindspore/experimental/optim/optimizer.py +3 -0
  77. mindspore/hal/__init__.py +3 -3
  78. mindspore/hal/contiguous_tensors_handle.py +175 -0
  79. mindspore/hal/stream.py +18 -0
  80. mindspore/include/api/model_group.h +13 -1
  81. mindspore/include/api/types.h +10 -10
  82. mindspore/include/dataset/config.h +2 -2
  83. mindspore/include/dataset/constants.h +2 -2
  84. mindspore/include/dataset/execute.h +2 -2
  85. mindspore/include/dataset/vision.h +4 -0
  86. mindspore/jpeg62.dll +0 -0
  87. mindspore/log.py +1 -1
  88. mindspore/mindrecord/filewriter.py +68 -51
  89. mindspore/mindspore_backend.dll +0 -0
  90. mindspore/mindspore_common.dll +0 -0
  91. mindspore/mindspore_core.dll +0 -0
  92. mindspore/mindspore_glog.dll +0 -0
  93. mindspore/mindspore_np_dtype.dll +0 -0
  94. mindspore/mindspore_ops.dll +0 -0
  95. mindspore/mint/__init__.py +495 -46
  96. mindspore/mint/distributed/__init__.py +31 -0
  97. mindspore/mint/distributed/distributed.py +254 -0
  98. mindspore/mint/nn/__init__.py +266 -21
  99. mindspore/mint/nn/functional.py +125 -19
  100. mindspore/mint/nn/layer/__init__.py +39 -0
  101. mindspore/mint/nn/layer/activation.py +133 -0
  102. mindspore/mint/nn/layer/normalization.py +477 -0
  103. mindspore/mint/nn/layer/pooling.py +110 -0
  104. mindspore/mint/optim/adamw.py +28 -7
  105. mindspore/mint/special/__init__.py +63 -0
  106. mindspore/msobj140.dll +0 -0
  107. mindspore/mspdb140.dll +0 -0
  108. mindspore/mspdbcore.dll +0 -0
  109. mindspore/mspdbst.dll +0 -0
  110. mindspore/mspft140.dll +0 -0
  111. mindspore/msvcdis140.dll +0 -0
  112. mindspore/msvcp140_1.dll +0 -0
  113. mindspore/msvcp140_2.dll +0 -0
  114. mindspore/msvcp140_atomic_wait.dll +0 -0
  115. mindspore/msvcp140_codecvt_ids.dll +0 -0
  116. mindspore/multiprocessing/__init__.py +2 -1
  117. mindspore/nn/__init__.py +0 -1
  118. mindspore/nn/cell.py +275 -93
  119. mindspore/nn/layer/activation.py +211 -44
  120. mindspore/nn/layer/basic.py +113 -3
  121. mindspore/nn/layer/embedding.py +120 -2
  122. mindspore/nn/layer/normalization.py +101 -5
  123. mindspore/nn/layer/padding.py +34 -48
  124. mindspore/nn/layer/pooling.py +161 -7
  125. mindspore/nn/layer/transformer.py +3 -3
  126. mindspore/nn/loss/__init__.py +2 -2
  127. mindspore/nn/loss/loss.py +84 -6
  128. mindspore/nn/optim/__init__.py +2 -1
  129. mindspore/nn/optim/adadelta.py +1 -1
  130. mindspore/nn/optim/adam.py +1 -1
  131. mindspore/nn/optim/lamb.py +1 -1
  132. mindspore/nn/optim/tft_wrapper.py +127 -0
  133. mindspore/nn/wrap/cell_wrapper.py +12 -23
  134. mindspore/nn/wrap/grad_reducer.py +5 -5
  135. mindspore/nn/wrap/loss_scale.py +17 -3
  136. mindspore/numpy/__init__.py +1 -1
  137. mindspore/numpy/array_creations.py +65 -68
  138. mindspore/numpy/array_ops.py +64 -60
  139. mindspore/numpy/fft.py +610 -75
  140. mindspore/numpy/logic_ops.py +11 -10
  141. mindspore/numpy/math_ops.py +85 -84
  142. mindspore/numpy/utils_const.py +4 -4
  143. mindspore/opencv_core452.dll +0 -0
  144. mindspore/opencv_imgcodecs452.dll +0 -0
  145. mindspore/opencv_imgproc452.dll +0 -0
  146. mindspore/ops/__init__.py +6 -4
  147. mindspore/ops/_grad_experimental/grad_comm_ops.py +47 -3
  148. mindspore/ops/_grad_experimental/grad_math_ops.py +0 -22
  149. mindspore/ops/_vmap/vmap_array_ops.py +2 -4
  150. mindspore/ops/_vmap/vmap_math_ops.py +17 -1
  151. mindspore/ops/_vmap/vmap_nn_ops.py +43 -2
  152. mindspore/ops/auto_generate/cpp_create_prim_instance_helper.py +85 -7
  153. mindspore/ops/auto_generate/gen_arg_dtype_cast.py +2 -0
  154. mindspore/ops/auto_generate/gen_extend_func.py +734 -13
  155. mindspore/ops/auto_generate/gen_ops_def.py +2420 -381
  156. mindspore/ops/auto_generate/gen_ops_prim.py +5196 -1659
  157. mindspore/ops/auto_generate/pyboost_inner_prim.py +176 -56
  158. mindspore/ops/composite/base.py +85 -48
  159. mindspore/ops/composite/multitype_ops/_compile_utils.py +1 -0
  160. mindspore/ops/composite/multitype_ops/not_in_impl.py +2 -2
  161. mindspore/ops/function/__init__.py +22 -0
  162. mindspore/ops/function/array_func.py +490 -153
  163. mindspore/ops/function/debug_func.py +113 -1
  164. mindspore/ops/function/fft_func.py +15 -2
  165. mindspore/ops/function/grad/grad_func.py +3 -2
  166. mindspore/ops/function/math_func.py +558 -207
  167. mindspore/ops/function/nn_func.py +817 -383
  168. mindspore/ops/function/other_func.py +3 -2
  169. mindspore/ops/function/random_func.py +184 -8
  170. mindspore/ops/function/reshard_func.py +13 -11
  171. mindspore/ops/function/sparse_unary_func.py +1 -1
  172. mindspore/ops/function/vmap_func.py +3 -2
  173. mindspore/ops/functional.py +24 -14
  174. mindspore/ops/op_info_register.py +3 -3
  175. mindspore/ops/operations/__init__.py +6 -1
  176. mindspore/ops/operations/_grad_ops.py +2 -76
  177. mindspore/ops/operations/_infer_ops.py +1 -1
  178. mindspore/ops/operations/_inner_ops.py +71 -94
  179. mindspore/ops/operations/array_ops.py +12 -146
  180. mindspore/ops/operations/comm_ops.py +42 -53
  181. mindspore/ops/operations/custom_ops.py +83 -19
  182. mindspore/ops/operations/debug_ops.py +42 -10
  183. mindspore/ops/operations/manually_defined/_inner.py +12 -0
  184. mindspore/ops/operations/manually_defined/ops_def.py +265 -10
  185. mindspore/ops/operations/math_ops.py +12 -223
  186. mindspore/ops/operations/nn_ops.py +20 -114
  187. mindspore/ops/operations/other_ops.py +7 -4
  188. mindspore/ops/operations/random_ops.py +46 -1
  189. mindspore/ops/primitive.py +18 -6
  190. mindspore/ops_generate/arg_dtype_cast.py +2 -0
  191. mindspore/ops_generate/gen_aclnn_implement.py +11 -11
  192. mindspore/ops_generate/gen_constants.py +36 -0
  193. mindspore/ops_generate/gen_ops.py +67 -52
  194. mindspore/ops_generate/gen_ops_inner_prim.py +1 -1
  195. mindspore/ops_generate/gen_pyboost_func.py +131 -47
  196. mindspore/ops_generate/op_proto.py +10 -3
  197. mindspore/ops_generate/pyboost_utils.py +14 -1
  198. mindspore/ops_generate/template.py +43 -21
  199. mindspore/parallel/__init__.py +3 -1
  200. mindspore/parallel/_auto_parallel_context.py +28 -8
  201. mindspore/parallel/_cell_wrapper.py +83 -0
  202. mindspore/parallel/_parallel_serialization.py +47 -19
  203. mindspore/parallel/_tensor.py +81 -11
  204. mindspore/parallel/_utils.py +13 -1
  205. mindspore/parallel/algo_parameter_config.py +5 -5
  206. mindspore/parallel/checkpoint_transform.py +46 -39
  207. mindspore/parallel/cluster/process_entity/__init__.py +1 -1
  208. mindspore/parallel/cluster/process_entity/_api.py +31 -23
  209. mindspore/parallel/cluster/process_entity/_utils.py +2 -27
  210. mindspore/parallel/parameter_broadcast.py +3 -4
  211. mindspore/parallel/shard.py +162 -31
  212. mindspore/parallel/transform_safetensors.py +993 -0
  213. mindspore/pgodb140.dll +0 -0
  214. mindspore/pgort140.dll +0 -0
  215. mindspore/profiler/__init__.py +2 -1
  216. mindspore/profiler/common/constant.py +29 -0
  217. mindspore/profiler/common/registry.py +47 -0
  218. mindspore/profiler/common/util.py +28 -0
  219. mindspore/profiler/dynamic_profiler.py +694 -0
  220. mindspore/profiler/envprofiling.py +17 -19
  221. mindspore/profiler/parser/ascend_analysis/constant.py +18 -0
  222. mindspore/profiler/parser/ascend_analysis/file_manager.py +25 -4
  223. mindspore/profiler/parser/ascend_analysis/function_event.py +43 -19
  224. mindspore/profiler/parser/ascend_analysis/fwk_cann_parser.py +31 -26
  225. mindspore/profiler/parser/ascend_analysis/fwk_file_parser.py +56 -10
  226. mindspore/profiler/parser/ascend_analysis/msprof_timeline_parser.py +55 -8
  227. mindspore/profiler/parser/ascend_analysis/path_manager.py +313 -0
  228. mindspore/profiler/parser/ascend_analysis/profiler_info_parser.py +27 -20
  229. mindspore/profiler/parser/ascend_analysis/trace_event_manager.py +9 -2
  230. mindspore/profiler/parser/ascend_msprof_exporter.py +5 -4
  231. mindspore/profiler/parser/ascend_timeline_generator.py +27 -25
  232. mindspore/profiler/parser/base_timeline_generator.py +19 -25
  233. mindspore/profiler/parser/cpu_gpu_timeline_generator.py +25 -12
  234. mindspore/profiler/parser/framework_parser.py +1 -391
  235. mindspore/profiler/parser/gpu_analysis/__init__.py +14 -0
  236. mindspore/profiler/parser/gpu_analysis/function_event.py +44 -0
  237. mindspore/profiler/parser/gpu_analysis/fwk_file_parser.py +89 -0
  238. mindspore/profiler/parser/gpu_analysis/profiler_info_parser.py +72 -0
  239. mindspore/profiler/parser/memory_usage_parser.py +0 -154
  240. mindspore/profiler/parser/profiler_info.py +78 -6
  241. mindspore/profiler/profiler.py +153 -0
  242. mindspore/profiler/profiling.py +280 -412
  243. mindspore/rewrite/__init__.py +1 -2
  244. mindspore/rewrite/common/namespace.py +4 -4
  245. mindspore/rewrite/symbol_tree/symbol_tree.py +3 -3
  246. mindspore/run_check/_check_version.py +36 -103
  247. mindspore/safeguard/rewrite_obfuscation.py +591 -247
  248. mindspore/swresample-4.dll +0 -0
  249. mindspore/swscale-6.dll +0 -0
  250. mindspore/tbbmalloc.dll +0 -0
  251. mindspore/tinyxml2.dll +0 -0
  252. mindspore/train/__init__.py +4 -3
  253. mindspore/train/_utils.py +28 -2
  254. mindspore/train/amp.py +171 -53
  255. mindspore/train/callback/__init__.py +2 -2
  256. mindspore/train/callback/_callback.py +4 -4
  257. mindspore/train/callback/_checkpoint.py +85 -22
  258. mindspore/train/callback/_cluster_monitor.py +1 -1
  259. mindspore/train/callback/_flops_collector.py +1 -0
  260. mindspore/train/callback/_loss_monitor.py +3 -3
  261. mindspore/train/callback/_on_request_exit.py +134 -31
  262. mindspore/train/callback/_summary_collector.py +5 -5
  263. mindspore/train/callback/_tft_register.py +352 -0
  264. mindspore/train/dataset_helper.py +7 -3
  265. mindspore/train/metrics/metric.py +3 -3
  266. mindspore/train/metrics/roc.py +4 -4
  267. mindspore/train/mind_ir_pb2.py +44 -39
  268. mindspore/train/model.py +134 -58
  269. mindspore/train/serialization.py +336 -112
  270. mindspore/turbojpeg.dll +0 -0
  271. mindspore/utils/__init__.py +21 -0
  272. mindspore/utils/utils.py +60 -0
  273. mindspore/vcmeta.dll +0 -0
  274. mindspore/vcruntime140.dll +0 -0
  275. mindspore/vcruntime140_1.dll +0 -0
  276. mindspore/version.py +1 -1
  277. {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/METADATA +6 -2
  278. {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/RECORD +281 -275
  279. mindspore/include/c_api/ms/abstract.h +0 -67
  280. mindspore/include/c_api/ms/attribute.h +0 -197
  281. mindspore/include/c_api/ms/base/handle_types.h +0 -43
  282. mindspore/include/c_api/ms/base/macros.h +0 -32
  283. mindspore/include/c_api/ms/base/status.h +0 -33
  284. mindspore/include/c_api/ms/base/types.h +0 -283
  285. mindspore/include/c_api/ms/context.h +0 -102
  286. mindspore/include/c_api/ms/graph.h +0 -160
  287. mindspore/include/c_api/ms/node.h +0 -606
  288. mindspore/include/c_api/ms/tensor.h +0 -161
  289. mindspore/include/c_api/ms/value.h +0 -84
  290. mindspore/mindspore_shared_lib.dll +0 -0
  291. mindspore/nn/extend/basic.py +0 -140
  292. mindspore/nn/extend/embedding.py +0 -143
  293. mindspore/nn/extend/layer/normalization.py +0 -109
  294. mindspore/nn/extend/pooling.py +0 -117
  295. mindspore/nn/layer/embedding_service.py +0 -531
  296. mindspore/ops/_op_impl/aicpu/strided_slice_v2.py +0 -93
  297. mindspore/ops/_op_impl/aicpu/strided_slice_v2_grad.py +0 -66
  298. mindspore/ops/extend/__init__.py +0 -53
  299. mindspore/ops/extend/array_func.py +0 -218
  300. mindspore/ops/extend/math_func.py +0 -76
  301. mindspore/ops/extend/nn_func.py +0 -308
  302. mindspore/ops/silent_check.py +0 -162
  303. mindspore/profiler/parser/msadvisor_analyzer.py +0 -82
  304. mindspore/profiler/parser/msadvisor_parser.py +0 -240
  305. mindspore/train/callback/_mindio_ttp.py +0 -443
  306. {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/WHEEL +0 -0
  307. {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/entry_points.txt +0 -0
  308. {mindspore-2.3.0.dist-info → mindspore-2.4.0.dist-info}/top_level.txt +0 -0
@@ -15,45 +15,56 @@
15
15
  """mint module."""
16
16
  from __future__ import absolute_import
17
17
  import mindspore.ops as ops
18
- from mindspore.ops.extend import gather, conv2d, max, min
19
- from mindspore.ops.extend import array_func, math_func, nn_func
20
- from mindspore.mint.nn.functional import *
18
+ from mindspore.common._register_for_tensor import tensor_operator_registry_for_mint
19
+ from mindspore.common.tensor import Tensor
20
+ from mindspore.ops.function.array_func import gather_ext as gather, max_ext as max, min_ext as min
21
+ from mindspore.ops.function.nn_func import conv2d_ext as conv2d
22
+ from mindspore.mint.nn.functional import sigmoid
21
23
  from mindspore.mint.nn import functional
22
24
  from mindspore.mint import linalg
23
- from mindspore.ops import erf, where, triu
25
+ from mindspore.mint import special
26
+ from mindspore.mint import distributed
27
+ from mindspore.ops import erf, where
24
28
  from mindspore.ops.function.math_func import linspace_ext as linspace
25
- from mindspore.ops.function.array_func import full_ext as full
29
+ from mindspore.ops.function.math_func import median_ext as median
26
30
  from mindspore.ops.function.array_func import ones_like_ext as ones_like
31
+ from mindspore.ops.function.array_func import full_ext as full
27
32
  from mindspore.ops.function.array_func import zeros_like_ext as zeros_like
28
33
  from mindspore.ops.function.array_func import unique_ext as unique
34
+ from mindspore.ops.function.array_func import chunk_ext as chunk
29
35
  from mindspore.ops.function.math_func import isclose
30
36
  from mindspore.ops.auto_generate import abs
31
37
  # 1
32
38
  from mindspore.ops.function.math_func import divide, div
33
39
  from mindspore.ops.auto_generate import topk_ext as topk
40
+ from mindspore.ops.function.math_func import roll
34
41
  # 2
35
42
  from mindspore.ops.function.math_func import sin
36
43
  # 3
37
44
  from mindspore.ops.function.clip_func import clamp
38
45
  # 4
39
-
46
+ from mindspore.ops.auto_generate import sinc
47
+ from mindspore.ops.auto_generate import sinh
48
+ from mindspore.ops.auto_generate import cosh
49
+ from mindspore.ops.function.math_func import xlogy_ext as xlogy
40
50
  # 5
41
51
  from mindspore.ops.auto_generate import cumsum_ext as cumsum
42
52
  # 6
43
53
  from mindspore.ops.auto_generate import stack_ext as stack
44
54
 
45
55
  # 7
46
-
56
+ from mindspore.ops.function.array_func import unsqueeze
47
57
  # 8
48
-
58
+ from mindspore.ops.auto_generate import transpose_ext as transpose
49
59
  # 9
50
-
60
+ from mindspore.ops.auto_generate import masked_select
61
+ from mindspore.ops.function.math_func import cross
51
62
  # 10
52
63
  from mindspore.ops.function.math_func import ne
53
64
  # 11
54
65
 
55
66
  # 12
56
-
67
+ from mindspore.ops.function.array_func import repeat_interleave_ext as repeat_interleave
57
68
  # 13
58
69
  from mindspore.ops.functional import flip
59
70
  # 14
@@ -122,13 +133,13 @@ from mindspore.ops.functional import cos
122
133
  # 45
123
134
 
124
135
  # 46
125
-
136
+ from mindspore.ops.function.math_func import bitwise_and_ext as bitwise_and
126
137
  # 47
127
-
138
+ from mindspore.ops.function.math_func import bitwise_or_ext as bitwise_or
128
139
  # 48
129
-
140
+ from mindspore.ops.function.math_func import bitwise_xor_ext as bitwise_xor
130
141
  # 49
131
-
142
+ from mindspore.ops.function.math_func import baddbmm_ext as baddbmm
132
143
  # 50
133
144
  from mindspore.ops.functional import tile
134
145
  # 51
@@ -142,7 +153,7 @@ from mindspore.ops.function.random_func import normal_ext as normal
142
153
  # 55
143
154
 
144
155
  # 56
145
-
156
+ from mindspore.ops.function.math_func import norm_ext as norm
146
157
  # 57
147
158
  from mindspore.ops.functional import broadcast_to
148
159
  # 58
@@ -166,7 +177,7 @@ from mindspore.ops.functional import logical_not
166
177
  # 67
167
178
  from mindspore.ops.functional import logical_or
168
179
  # 68
169
-
180
+ from mindspore.ops.functional import logical_xor
170
181
  # 69
171
182
  from mindspore.ops.functional import less_equal, le
172
183
  # 70
@@ -194,7 +205,7 @@ from mindspore.ops.function import arange_ext as arange
194
205
  # 81
195
206
  from mindspore.ops.auto_generate import index_select_ext as index_select
196
207
  # 82
197
-
208
+ from mindspore.ops.auto_generate import cummin_ext as cummin
198
209
  # 83
199
210
  from mindspore.ops.function.array_func import narrow_ext as narrow
200
211
  # 84
@@ -204,9 +215,9 @@ from mindspore.mint import nn, optim
204
215
  # 86
205
216
 
206
217
  # 87
207
-
218
+ from mindspore.ops.auto_generate import trunc
208
219
  # 88
209
- from mindspore.ops.function.array_func import chunk_ext as chunk
220
+
210
221
  # 89
211
222
 
212
223
  # 90
@@ -231,13 +242,82 @@ from mindspore.ops.function.math_func import tanh
231
242
 
232
243
  # 100
233
244
 
245
+ # 101
246
+
247
+ # 102
248
+
249
+ # 103
250
+
251
+ # 104
252
+
253
+ # 105
254
+
255
+ # 106
256
+
257
+ # 107
258
+
259
+ # 108
260
+
261
+ # 109
262
+ from mindspore.ops.auto_generate import argmin_ext as argmin
263
+ # 110
264
+
265
+ # 111
266
+
267
+ # 112
268
+
269
+ # 113
270
+
271
+ # 114
272
+
273
+ # 115
274
+
275
+ # 116
276
+
277
+ # 117
278
+
279
+ # 118
280
+
281
+ # 119
282
+
283
+ # 120
284
+
285
+ # 121
286
+
234
287
  # 122
235
288
 
289
+ # 151
290
+ from mindspore.ops.function.math_func import acos_ext as acos
291
+ from mindspore.ops.function.math_func import arccos_ext as arccos
292
+ # 152
293
+ from mindspore.ops.function.math_func import acosh_ext as acosh
294
+ from mindspore.ops.function.math_func import arccosh_ext as arccosh
295
+ # 172
296
+ from mindspore.ops.function.math_func import asin_ext as asin
297
+ from mindspore.ops.function.math_func import arcsin_ext as arcsin
298
+ # 173
299
+ from mindspore.ops.function.math_func import asinh_ext as asinh
300
+ from mindspore.ops.function.math_func import arcsinh_ext as arcsinh
301
+ # 174
302
+ from mindspore.ops.function.math_func import atan_ext as atan
303
+ from mindspore.ops.function.math_func import arctan_ext as arctan
304
+ # 175
305
+ from mindspore.ops.function.math_func import atanh
306
+ from mindspore.ops.function.math_func import arctanh
236
307
  # 176
237
308
  from mindspore.ops.function.math_func import atan2_ext as atan2
238
309
  from mindspore.ops.function.math_func import arctan2_ext as arctan2
239
310
 
311
+ # 177
312
+ from mindspore.ops.function.math_func import round
313
+
314
+ # 182
315
+ from mindspore.ops.function.math_func import bernoulli_ext as bernoulli
240
316
 
317
+ # 204
318
+ from mindspore.ops.auto_generate import erfc
319
+ # 207
320
+ from mindspore.ops.auto_generate import expm1
241
321
  # 208
242
322
  from mindspore.ops.function.array_func import eye
243
323
  from mindspore.ops.function.random_func import rand_ext as rand
@@ -246,9 +326,43 @@ from mindspore.ops.function.random_func import rand_like_ext as rand_like
246
326
  from mindspore.ops.auto_generate import floor
247
327
  # 231
248
328
  from mindspore.ops.function.math_func import inverse_ext as inverse
249
-
329
+ # 244
330
+ from mindspore.ops.auto_generate import log1p
331
+ # 261
332
+ from mindspore.ops.function.random_func import multinomial_ext as multinomial
333
+ # 275
334
+ from mindspore.ops.function.math_func import remainder_ext as remainder
250
335
  # 285
251
336
  from mindspore.ops.function.array_func import scatter_add_ext as scatter_add
337
+ # 289
338
+ from mindspore.ops.auto_generate import sign
339
+
340
+ from mindspore.ops.auto_generate import select_ext as select
341
+
342
+ # 301
343
+ from mindspore.ops.function.math_func import tan
344
+
345
+ # 303
346
+ from mindspore.ops.auto_generate import trace_ext as trace
347
+
348
+ from mindspore.ops.function.array_func import reshape
349
+
350
+ from mindspore.ops.auto_generate import outer_ext as outer
351
+
352
+ # 304
353
+ from mindspore.ops.function.array_func import tril_ext as tril
354
+
355
+ # 305
356
+ from mindspore.ops import triu
357
+
358
+ # 538
359
+ from mindspore.ops.function.math_func import histc_ext as histc
360
+
361
+ # 553
362
+ from mindspore.ops.auto_generate import logaddexp_ext as logaddexp
363
+
364
+ # 610
365
+ from mindspore.ops.function.math_func import nan_to_num
252
366
 
253
367
 
254
368
  def add(input, other, *, alpha=1):
@@ -268,12 +382,12 @@ def add(input, other, *, alpha=1):
268
382
  Args:
269
383
  input (Union[Tensor, number.Number, bool]): The first input is a number.Number or
270
384
  a bool or a tensor whose data type is
271
- `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_ or
272
- `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_.
385
+ `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_ or
386
+ `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_.
273
387
  other (Union[Tensor, number.Number, bool]): The second input, is a number.Number or
274
388
  a bool or a tensor whose data type is
275
- `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_ or
276
- `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_.
389
+ `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_ or
390
+ `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_.
277
391
 
278
392
  Keyword Args:
279
393
  alpha (number.Number): A scaling factor applied to `other`, default 1.
@@ -429,7 +543,6 @@ def all(input, dim=None, keepdim=False):
429
543
  return ops.function.math_func.all(input, dim, keepdim)
430
544
 
431
545
 
432
-
433
546
  def cat(tensors, dim=0):
434
547
  r"""
435
548
  Connect input tensors along with the given dimension.
@@ -487,6 +600,104 @@ def cat(tensors, dim=0):
487
600
  return ops.auto_generate.cat(tensors, dim)
488
601
 
489
602
 
603
+ def concat(tensors, dim=0):
604
+ r"""
605
+ .. warning::
606
+ This is an experimental API that is subject to change or deletion.
607
+
608
+ Alias of mint.cat().
609
+ """
610
+ return cat(tensors, dim)
611
+
612
+
613
+ def cummax(input, dim):
614
+ r"""
615
+ Returns a tuple (values, indices) where `values` is the cumulative maximum value of input Tensor `input`
616
+ along the dimension `dim`, and `indices` is the index location of each maximum value.
617
+
618
+ .. math::
619
+ \begin{array}{ll} \\
620
+ y_{i} = \max(x_{1}, x_{2}, ... , x_{i})
621
+ \end{array}
622
+
623
+ Args:
624
+ input (Tensor): The input Tensor. Rank of `input` must be greater than 0.
625
+ dim (int): The dimension to do the operation over. The value of `dim` must be in the range
626
+ `[-input.ndim, input.ndim - 1]`.
627
+
628
+ Returns:
629
+ tuple [Tensor], tuple of 2 Tensors, containing the cumulative maximum of elements and the index.
630
+ The shape of each output tensor is the same as that of input `input`.
631
+
632
+ Raises:
633
+ TypeError: If `input` is not a Tensor.
634
+ TypeError: If `dim` is not an int.
635
+ ValueError: If `dim` is out the range of `[-input.ndim, input.ndim - 1]`.
636
+
637
+ .. note::
638
+ O2 mode is not supported in Ascend.
639
+
640
+ Supported Platforms:
641
+ ``Ascend``
642
+
643
+ Examples:
644
+ >>> import mindspore
645
+ >>> import numpy as np
646
+ >>> from mindspore import Tensor
647
+ >>> from mindspore import ops
648
+ >>> x = Tensor(np.array([[3, 4, 6, 10], [1, 6, 7, 9], [4, 3, 8, 7], [1, 3, 7, 9]]).astype(np.float32))
649
+ >>> output = mint.cummax(x, dim=0)
650
+ >>> print(output[0])
651
+ [[ 3. 4. 6. 10.]
652
+ [ 3. 6. 7. 10.]
653
+ [ 4. 6. 8. 10.]
654
+ [ 4. 6. 8. 10.]]
655
+ >>> print(output[1])
656
+ [[0 0 0 0]
657
+ [0 1 1 0]
658
+ [2 1 2 0]
659
+ [2 1 2 0]]
660
+ """
661
+ return ops.auto_generate.cummax(input, dim)
662
+
663
+
664
+ def item(input):
665
+ r"""
666
+ Returns the value of this tensor as a standard Python number.
667
+
668
+ Note:
669
+ This only works for tensors with one element.
670
+
671
+ Args:
672
+ input (Tensor[Number]): The input tensor. The dtype of the tensor to be reduced is number.
673
+ :math:`(N, *)` where :math:`*` means, any number of additional dimensions.
674
+
675
+ Returns:
676
+ number.
677
+
678
+ Raises:
679
+ TypeError: If `input` is not a Tensor.
680
+ RuntimeError: If the number of `input` elements is not 1.
681
+
682
+ Supported Platforms:
683
+ ``Ascend`` ``GPU`` ``CPU``
684
+
685
+ Examples:
686
+ >>> import mindspore
687
+ >>> import numpy as np
688
+ >>> from mindspore import Tensor, mint
689
+ >>> x = Tensor(np.array([1]).astype(np.float32))
690
+ >>> result = mint.item(x)
691
+ >>> print(result)
692
+ 1.0
693
+ """
694
+ if not isinstance(input, Tensor):
695
+ raise TypeError(f"the input must be a Tensor, but got {type(input)}")
696
+ if input.size != 1:
697
+ raise RuntimeError("a Tensor with {} elements cannot be converted to Scalar".format(input.size))
698
+ return input.asnumpy().item()
699
+
700
+
490
701
  def mean(input, dim=None, keepdim=False, *, dtype=None):
491
702
  r"""
492
703
  Reduces all dimension of a tensor by averaging all elements in the dimension, by default.
@@ -818,12 +1029,12 @@ def sub(input, other, *, alpha=1):
818
1029
  Args:
819
1030
  input (Union[Tensor, number.Number, bool]): The first input is a number.Number or
820
1031
  a bool or a tensor whose data type is
821
- `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_ or
822
- `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_.
1032
+ `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_ or
1033
+ `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_.
823
1034
  other (Union[Tensor, number.Number, bool]): The second input, is a number.Number or
824
1035
  a bool or a tensor whose data type is
825
- `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_ or
826
- `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html#mindspore.dtype>`_.
1036
+ `number <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_ or
1037
+ `bool_ <https://www.mindspore.cn/docs/en/master/api_python/mindspore/mindspore.dtype.html>`_.
827
1038
 
828
1039
  Keyword Args:
829
1040
  alpha (number.Number): A scaling factor applied to `other`, default 1.
@@ -859,6 +1070,22 @@ def sub(input, other, *, alpha=1):
859
1070
  return ops.auto_generate.sub_ext(input, other, alpha)
860
1071
 
861
1072
 
1073
+ def swapaxes(input, axis0, axis1):
1074
+ '''
1075
+ Interchange two axes of a tensor, alias for mint.transpose()
1076
+
1077
+ Examples:
1078
+ >>> import numpy as np
1079
+ >>> from mindspore import mint
1080
+ >>> from mindspore import Tensor
1081
+ >>> input = Tensor(np.ones((2,3,4), dtype=np.float32))
1082
+ >>> output = mint.swapaxes(input, 0, 2)
1083
+ >>> print(output.shape)
1084
+ (4, 3, 2)
1085
+ '''
1086
+ return transpose(input, axis0, axis1)
1087
+
1088
+
862
1089
  def zeros(size, *, dtype=None):
863
1090
  """
864
1091
  Creates a tensor filled with 0 with shape described by `size` and fills it with value 0 in type of `dtype`.
@@ -892,25 +1119,112 @@ def zeros(size, *, dtype=None):
892
1119
  return ops.auto_generate.zeros(size, dtype)
893
1120
 
894
1121
 
1122
+ def fix(input):
1123
+ """
1124
+ Alias for :func:`mindspore.mint.trunc` .
1125
+
1126
+ For more details, see :func:`mindspore.mint.trunc` .
1127
+
1128
+ Supported Platforms:
1129
+ ``Ascend``
1130
+ """
1131
+ return trunc(input)
1132
+
1133
+
1134
+ def scatter(input, dim, index, src):
1135
+ """
1136
+ Update the value in `src` to `input` according to the specified index.
1137
+ For a 3-D tensor, the output will be:
1138
+
1139
+ .. code-block::
1140
+
1141
+ output[index[i][j][k]][j][k] = src[i][j][k] # if dim == 0
1142
+
1143
+ output[i][index[i][j][k]][k] = src[i][j][k] # if dim == 1
1144
+
1145
+ output[i][j][index[i][j][k]] = src[i][j][k] # if dim == 2
1146
+
1147
+ .. note::
1148
+ The backward is supported only for the case `src.shape == index.shape` when `src` is a tensor.
1149
+
1150
+ Args:
1151
+ input (Tensor): The target tensor. The rank of `input` must be at least 1.
1152
+ dim (int): Which axis to scatter. Accepted range is [-r, r) where r = rank(input).
1153
+ index (Tensor): The index to do update operation whose data must be positive number with type of mindspore.int32
1154
+ or mindspore.int64. Same rank as `input` . And accepted range is [-s, s) where s is the size along axis.
1155
+ src (Tensor, float): The data doing the update operation with `input`. Can be a tensor with the same data type
1156
+ as `input` or a float number to scatter.
1157
+
1158
+ Returns:
1159
+ Tensor, has the same shape and type as `input` .
1160
+
1161
+ Raises:
1162
+ TypeError: If `index` is neither int32 nor int64.
1163
+ ValueError: If rank of any of `input` , `index` and `src` less than 1.
1164
+ ValueError: If the rank of `src` is not equal to the rank of `input` .
1165
+ TypeError: If the data type of `input` and `src` have different dtypes.
1166
+ RuntimeError: If `index` has negative elements.
1167
+
1168
+ Supported Platforms:
1169
+ ``Ascend`` ``GPU`` ``CPU``
1170
+
1171
+ Examples:
1172
+ >>> import numpy as np
1173
+ >>> import mindspore as ms
1174
+ >>> from mindspore import Tensor, mint
1175
+ >>> input = Tensor(np.array([[1, 2, 3, 4, 5]]), dtype=ms.float32)
1176
+ >>> src = Tensor(np.array([[8, 8]]), dtype=ms.float32)
1177
+ >>> index = Tensor(np.array([[2, 4]]), dtype=ms.int64)
1178
+ >>> out = mint.scatter(input=input, dim=1, index=index, src=src)
1179
+ >>> print(out)
1180
+ [[1. 2. 8. 4. 8.]]
1181
+ >>> input = Tensor(np.zeros((5, 5)), dtype=ms.float32)
1182
+ >>> src = Tensor(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), dtype=ms.float32)
1183
+ >>> index = Tensor(np.array([[0, 0, 0], [2, 2, 2], [4, 4, 4]]), dtype=ms.int64)
1184
+ >>> out = mint.scatter(input=input, dim=0, index=index, src=src)
1185
+ >>> print(out)
1186
+ [[1. 2. 3. 0. 0.]
1187
+ [0. 0. 0. 0. 0.]
1188
+ [4. 5. 6. 0. 0.]
1189
+ [0. 0. 0. 0. 0.]
1190
+ [7. 8. 9. 0. 0.]]
1191
+ >>> input = Tensor(np.zeros((5, 5)), dtype=ms.float32)
1192
+ >>> src = Tensor(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), dtype=ms.float32)
1193
+ >>> index = Tensor(np.array([[0, 2, 4], [0, 2, 4], [0, 2, 4]]), dtype=ms.int64)
1194
+ >>> out = mint.scatter(input=input, dim=1, index=index, src=src)
1195
+ >>> print(out)
1196
+ [[1. 0. 2. 0. 3.]
1197
+ [4. 0. 5. 0. 6.]
1198
+ [7. 0. 8. 0. 9.]
1199
+ [0. 0. 0. 0. 0.]
1200
+ [0. 0. 0. 0. 0.]]
1201
+ """
1202
+ return ops.function.array_func.scatter(input, dim, index, src)
1203
+
1204
+
895
1205
  __all__ = [
1206
+ 'conv2d',
896
1207
  'full',
897
1208
  'ones_like',
898
1209
  'zeros_like',
899
1210
  'abs',
900
1211
  'erf',
901
1212
  'where',
902
- 'linspace',
903
1213
  'isclose',
904
1214
  # 1
905
1215
  'div',
906
1216
  'divide',
907
1217
  'topk',
1218
+ 'roll',
908
1219
  # 2
909
1220
  'sin',
910
1221
  # 3
911
1222
  'clamp',
1223
+ 'xlogy',
912
1224
  # 4
913
-
1225
+ 'sinc',
1226
+ 'sinh',
1227
+ 'cosh',
914
1228
  # 5
915
1229
  'cumsum',
916
1230
  # 6
@@ -918,15 +1232,16 @@ __all__ = [
918
1232
  # 7
919
1233
  'zeros',
920
1234
  # 8
921
-
1235
+ 'transpose',
1236
+ 'swapaxes',
922
1237
  # 9
923
1238
 
924
1239
  # 10
925
1240
  'ne',
926
1241
  # 11
927
-
1242
+ 'unsqueeze',
928
1243
  # 12
929
-
1244
+ "repeat_interleave",
930
1245
  # 13
931
1246
  "flip",
932
1247
  # 14
@@ -966,8 +1281,8 @@ __all__ = [
966
1281
  # 30
967
1282
  'searchsorted',
968
1283
  # 31
969
-
970
- # 32
1284
+ 'cummax',
1285
+ 'cummin',
971
1286
  'sub',
972
1287
  # 33
973
1288
  'split',
@@ -994,15 +1309,17 @@ __all__ = [
994
1309
  # 44
995
1310
  'cos',
996
1311
  # 45
997
-
1312
+ 'concat',
998
1313
  # 46
999
-
1314
+ 'bitwise_and',
1315
+ 'bitwise_or',
1316
+ 'bitwise_xor',
1000
1317
  # 47
1001
1318
  'max',
1002
1319
  # 48
1003
1320
  'min',
1004
1321
  # 49
1005
-
1322
+ 'baddbmm',
1006
1323
  # 50
1007
1324
  'tile',
1008
1325
  # 51
@@ -1014,9 +1331,9 @@ __all__ = [
1014
1331
  # 54
1015
1332
  'normal',
1016
1333
  # 55
1017
-
1334
+ 'cross',
1018
1335
  # 56
1019
-
1336
+ 'norm',
1020
1337
  # 57
1021
1338
  'broadcast_to',
1022
1339
  # 58
@@ -1040,7 +1357,7 @@ __all__ = [
1040
1357
  # 67
1041
1358
  'logical_or',
1042
1359
  # 68
1043
-
1360
+ 'logical_xor',
1044
1361
  # 69
1045
1362
  'less_equal',
1046
1363
  'le',
@@ -1077,9 +1394,10 @@ __all__ = [
1077
1394
  'narrow',
1078
1395
  # 84
1079
1396
 
1080
- # 85
1397
+ 'masked_select',
1081
1398
 
1082
1399
  # 86
1400
+ 'select',
1083
1401
 
1084
1402
  # 87
1085
1403
 
@@ -1109,29 +1427,160 @@ __all__ = [
1109
1427
 
1110
1428
  # 100
1111
1429
 
1430
+ # 101
1431
+
1432
+ # 102
1433
+
1434
+ # 103
1435
+
1436
+ # 104
1437
+
1438
+ # 105
1439
+
1440
+ # 106
1441
+
1442
+ # 107
1443
+
1444
+ # 108
1445
+
1446
+ # 109
1447
+ 'argmin',
1448
+ # 110
1449
+
1450
+ # 111
1451
+
1452
+ # 112
1453
+
1454
+ # 113
1455
+
1456
+ # 114
1457
+
1458
+ # 115
1459
+
1460
+ # 116
1461
+
1462
+ # 117
1463
+
1464
+ # 118
1465
+
1466
+ # 119
1467
+
1468
+ # 120
1469
+
1470
+ # 121
1471
+
1472
+ # 122
1473
+
1474
+ # 151
1475
+ 'acos',
1476
+ 'arccos',
1477
+ # 152
1478
+ 'acosh',
1479
+ 'arccosh',
1480
+ # 153
1481
+
1482
+ # 154
1483
+
1484
+ # 155
1485
+
1486
+ # 156
1487
+
1488
+ # 157
1489
+ 'scatter',
1490
+ # 172
1491
+ 'asin',
1492
+ 'arcsin',
1493
+ # 173
1494
+ 'asinh',
1495
+ 'arcsinh',
1496
+ # 174
1497
+ 'atan',
1498
+ 'arctan',
1499
+ # 175
1500
+ 'atanh',
1501
+ 'arctanh',
1112
1502
  # 176
1113
1503
  'atan2',
1114
1504
  'arctan2',
1115
1505
 
1506
+ # 177
1507
+ 'round',
1508
+
1509
+ # 182
1510
+ 'bernoulli',
1511
+
1512
+ # 207
1513
+ 'expm1',
1514
+ # 204
1515
+ 'erfc',
1116
1516
  # 208
1117
1517
  'eye',
1518
+
1519
+ # 256
1520
+ 'median',
1118
1521
  'rand',
1119
1522
  'rand_like',
1120
1523
  # 210
1121
1524
  'floor',
1122
1525
  # 231
1123
1526
  'inverse',
1527
+ # 244
1528
+ 'log1p',
1529
+ # 261
1530
+ 'multinomial',
1531
+ # 275
1532
+ 'remainder',
1124
1533
  # 285
1125
1534
  'scatter_add',
1535
+ # 289
1536
+ 'sign',
1537
+ # 301
1538
+ 'tan',
1539
+ # 303
1540
+ 'trace',
1541
+ 'reshape',
1542
+ 'outer',
1126
1543
  # 304
1544
+ 'tril',
1127
1545
 
1128
1546
  # 305
1129
1547
  'triu',
1548
+
1549
+ # 538
1550
+ 'histc',
1551
+
1552
+ # 553
1553
+ 'logaddexp',
1554
+
1555
+ # 610
1556
+ 'nan_to_num',
1130
1557
  ]
1131
- __all__.extend(array_func.__all__)
1132
- __all__.extend(math_func.__all__)
1133
- __all__.extend(nn_func.__all__)
1558
+
1559
+ setattr(tensor_operator_registry_for_mint, 'add', add)
1560
+ setattr(tensor_operator_registry_for_mint, 'all', all)
1561
+ setattr(tensor_operator_registry_for_mint, 'any', any)
1562
+ setattr(tensor_operator_registry_for_mint, 'log', log)
1563
+ setattr(tensor_operator_registry_for_mint, 'ceil', ceil)
1564
+ setattr(tensor_operator_registry_for_mint, 'clamp', clamp)
1565
+ setattr(tensor_operator_registry_for_mint, 'cos', cos)
1566
+ setattr(tensor_operator_registry_for_mint, 'flatten', flatten)
1567
+ setattr(tensor_operator_registry_for_mint, 'item', item)
1568
+ setattr(tensor_operator_registry_for_mint, 'max', max)
1569
+ setattr(tensor_operator_registry_for_mint, 'mean', mean)
1570
+ setattr(tensor_operator_registry_for_mint, 'min', min)
1571
+ setattr(tensor_operator_registry_for_mint, 'repeat_interleave', repeat_interleave)
1572
+ setattr(tensor_operator_registry_for_mint, 'ne', ne)
1573
+ setattr(tensor_operator_registry_for_mint, 'round', round)
1574
+ setattr(tensor_operator_registry_for_mint, 'sin', sin)
1575
+ setattr(tensor_operator_registry_for_mint, 'split', split)
1576
+ setattr(tensor_operator_registry_for_mint, 'sqrt', sqrt)
1577
+ setattr(tensor_operator_registry_for_mint, 'square', square)
1578
+ setattr(tensor_operator_registry_for_mint, 'sub', sub)
1579
+ setattr(tensor_operator_registry_for_mint, 'sum', sum)
1580
+
1134
1581
  __all__.extend(functional.__all__)
1135
1582
  __all__.extend(nn.__all__)
1136
1583
  __all__.extend(optim.__all__)
1137
1584
  __all__.extend(linalg.__all__)
1585
+ __all__.extend(special.__all__)
1586
+ __all__.extend(distributed.__all__)