mindspore 2.2.10__cp39-cp39-win_amd64.whl → 2.2.14__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 (128) hide show
  1. mindspore/.commit_id +1 -1
  2. mindspore/__init__.py +2 -1
  3. mindspore/_c_dataengine.cp39-win_amd64.pyd +0 -0
  4. mindspore/_c_expression.cp39-win_amd64.pyd +0 -0
  5. mindspore/_c_mindrecord.cp39-win_amd64.pyd +0 -0
  6. mindspore/_extends/parse/__init__.py +3 -2
  7. mindspore/_extends/parse/parser.py +6 -1
  8. mindspore/_extends/parse/standard_method.py +12 -2
  9. mindspore/common/_utils.py +16 -0
  10. mindspore/common/tensor.py +0 -2
  11. mindspore/communication/management.py +3 -0
  12. mindspore/context.py +34 -4
  13. mindspore/dataset/engine/cache_client.py +8 -5
  14. mindspore/dataset/engine/datasets.py +23 -0
  15. mindspore/dataset/engine/validators.py +1 -1
  16. mindspore/dataset/vision/py_transforms_util.py +2 -2
  17. mindspore/dnnl.dll +0 -0
  18. mindspore/experimental/optim/lr_scheduler.py +5 -6
  19. mindspore/jpeg62.dll +0 -0
  20. mindspore/mindrecord/tools/cifar100_to_mr.py +49 -57
  21. mindspore/mindrecord/tools/cifar10_to_mr.py +46 -55
  22. mindspore/mindrecord/tools/csv_to_mr.py +3 -8
  23. mindspore/mindrecord/tools/mnist_to_mr.py +4 -9
  24. mindspore/mindrecord/tools/tfrecord_to_mr.py +1 -4
  25. mindspore/mindspore_backend.dll +0 -0
  26. mindspore/mindspore_common.dll +0 -0
  27. mindspore/mindspore_core.dll +0 -0
  28. mindspore/mindspore_glog.dll +0 -0
  29. mindspore/mindspore_shared_lib.dll +0 -0
  30. mindspore/nn/layer/activation.py +1 -1
  31. mindspore/nn/layer/embedding.py +2 -2
  32. mindspore/nn/layer/flash_attention.py +48 -135
  33. mindspore/nn/loss/loss.py +1 -1
  34. mindspore/nn/optim/ada_grad.py +2 -2
  35. mindspore/nn/optim/sgd.py +3 -2
  36. mindspore/nn/wrap/__init__.py +4 -2
  37. mindspore/nn/wrap/cell_wrapper.py +6 -3
  38. mindspore/numpy/math_ops.py +1 -1
  39. mindspore/opencv_core452.dll +0 -0
  40. mindspore/opencv_imgcodecs452.dll +0 -0
  41. mindspore/opencv_imgproc452.dll +0 -0
  42. mindspore/ops/__init__.py +3 -0
  43. mindspore/ops/_grad_experimental/grad_array_ops.py +0 -31
  44. mindspore/ops/_grad_experimental/grad_comm_ops.py +4 -2
  45. mindspore/ops/_grad_experimental/grad_inner_ops.py +8 -0
  46. mindspore/ops/_grad_experimental/grad_math_ops.py +37 -17
  47. mindspore/ops/_op_impl/aicpu/__init__.py +1 -0
  48. mindspore/ops/_op_impl/aicpu/generate_eod_mask.py +38 -0
  49. mindspore/ops/_op_impl/aicpu/linear_sum_assignment.py +21 -2
  50. mindspore/ops/function/array_func.py +6 -5
  51. mindspore/ops/function/debug_func.py +1 -1
  52. mindspore/ops/function/linalg_func.py +21 -11
  53. mindspore/ops/function/math_func.py +3 -0
  54. mindspore/ops/function/nn_func.py +13 -11
  55. mindspore/ops/function/parameter_func.py +2 -0
  56. mindspore/ops/function/sparse_unary_func.py +2 -2
  57. mindspore/ops/function/vmap_func.py +1 -0
  58. mindspore/ops/operations/__init__.py +5 -2
  59. mindspore/ops/operations/_embedding_cache_ops.py +1 -1
  60. mindspore/ops/operations/_grad_ops.py +3 -4
  61. mindspore/ops/operations/_inner_ops.py +56 -1
  62. mindspore/ops/operations/_quant_ops.py +4 -4
  63. mindspore/ops/operations/_rl_inner_ops.py +1 -1
  64. mindspore/ops/operations/array_ops.py +15 -4
  65. mindspore/ops/operations/custom_ops.py +1 -1
  66. mindspore/ops/operations/debug_ops.py +1 -1
  67. mindspore/ops/operations/image_ops.py +3 -3
  68. mindspore/ops/operations/inner_ops.py +49 -0
  69. mindspore/ops/operations/math_ops.py +65 -3
  70. mindspore/ops/operations/nn_ops.py +95 -28
  71. mindspore/ops/operations/random_ops.py +2 -0
  72. mindspore/ops/operations/sparse_ops.py +4 -4
  73. mindspore/ops/silent_check.py +162 -0
  74. mindspore/parallel/__init__.py +3 -2
  75. mindspore/parallel/_auto_parallel_context.py +82 -3
  76. mindspore/parallel/_parallel_serialization.py +34 -2
  77. mindspore/parallel/_tensor.py +3 -1
  78. mindspore/parallel/_transformer/transformer.py +8 -8
  79. mindspore/parallel/checkpoint_transform.py +191 -45
  80. mindspore/profiler/parser/ascend_cluster_generator.py +111 -0
  81. mindspore/profiler/parser/ascend_communicate_generator.py +315 -0
  82. mindspore/profiler/parser/ascend_flops_generator.py +8 -2
  83. mindspore/profiler/parser/ascend_fpbp_generator.py +8 -2
  84. mindspore/profiler/parser/ascend_hccl_generator.py +2 -2
  85. mindspore/profiler/parser/ascend_msprof_exporter.py +30 -6
  86. mindspore/profiler/parser/ascend_msprof_generator.py +16 -5
  87. mindspore/profiler/parser/ascend_op_generator.py +15 -7
  88. mindspore/profiler/parser/ascend_timeline_generator.py +5 -2
  89. mindspore/profiler/parser/base_timeline_generator.py +11 -3
  90. mindspore/profiler/parser/cpu_gpu_timeline_generator.py +2 -1
  91. mindspore/profiler/parser/framework_parser.py +8 -2
  92. mindspore/profiler/parser/memory_usage_parser.py +8 -2
  93. mindspore/profiler/parser/minddata_analyzer.py +8 -2
  94. mindspore/profiler/parser/minddata_parser.py +1 -1
  95. mindspore/profiler/parser/msadvisor_analyzer.py +4 -2
  96. mindspore/profiler/parser/msadvisor_parser.py +9 -3
  97. mindspore/profiler/profiling.py +97 -25
  98. mindspore/rewrite/api/node.py +1 -1
  99. mindspore/rewrite/api/symbol_tree.py +2 -2
  100. mindspore/rewrite/parsers/for_parser.py +6 -6
  101. mindspore/rewrite/parsers/module_parser.py +4 -4
  102. mindspore/tinyxml2.dll +0 -0
  103. mindspore/train/callback/_checkpoint.py +8 -8
  104. mindspore/train/callback/_landscape.py +2 -3
  105. mindspore/train/callback/_summary_collector.py +6 -7
  106. mindspore/train/dataset_helper.py +6 -0
  107. mindspore/train/model.py +17 -5
  108. mindspore/train/serialization.py +6 -1
  109. mindspore/train/summary/_writer_pool.py +1 -1
  110. mindspore/train/summary/summary_record.py +5 -6
  111. mindspore/turbojpeg.dll +0 -0
  112. mindspore/version.py +1 -1
  113. {mindspore-2.2.10.dist-info → mindspore-2.2.14.dist-info}/METADATA +3 -2
  114. {mindspore-2.2.10.dist-info → mindspore-2.2.14.dist-info}/RECORD +117 -124
  115. mindspore/ops/_op_impl/_custom_op/flash_attention/__init__.py +0 -0
  116. mindspore/ops/_op_impl/_custom_op/flash_attention/attention.py +0 -406
  117. mindspore/ops/_op_impl/_custom_op/flash_attention/constants.py +0 -41
  118. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_bwd.py +0 -467
  119. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_fwd.py +0 -563
  120. mindspore/ops/_op_impl/_custom_op/flash_attention/flash_attention_impl.py +0 -193
  121. mindspore/ops/_op_impl/_custom_op/flash_attention/tik_ops_utils.py +0 -435
  122. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/__init__.py +0 -0
  123. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/sparse_tiling.py +0 -45
  124. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/strategy.py +0 -67
  125. mindspore/ops/_op_impl/_custom_op/flash_attention/tiling_strategy/wukong_tiling.py +0 -62
  126. {mindspore-2.2.10.dist-info → mindspore-2.2.14.dist-info}/WHEEL +0 -0
  127. {mindspore-2.2.10.dist-info → mindspore-2.2.14.dist-info}/entry_points.txt +0 -0
  128. {mindspore-2.2.10.dist-info → mindspore-2.2.14.dist-info}/top_level.txt +0 -0
@@ -1,67 +0,0 @@
1
- # Copyright 2023 Huawei Technologies Co., Ltd
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- # ============================================================================
15
- """The base class of tiling strategy"""
16
- from abc import ABCMeta
17
- from abc import abstractmethod
18
- from collections import namedtuple
19
-
20
- TilingPara = namedtuple("TilingPara", "Br last_Br Bc last_Bc Tr Tc")
21
-
22
-
23
- class TilingStrategy(metaclass=ABCMeta):
24
- """Tiling strategy interface. All implementations should be defined in this module,
25
- otherwise, the UT will fail.
26
- """
27
-
28
- _strategies = {}
29
-
30
- def __init__(self, Nq, N, head_dim) -> None:
31
- super().__init__()
32
- self.Nq = Nq
33
- self.N = N
34
- self.Br = None
35
- self.last_Br = None
36
- self.Bc = None
37
- self.last_Bc = None
38
- self.Tr = None
39
- self.Tc = None
40
- self.d = head_dim
41
-
42
- def __init_subclass__(cls, **kwargs):
43
- TilingStrategy._strategies[cls.strategy_name()] = cls
44
-
45
- @classmethod
46
- @abstractmethod
47
- def strategy_name(cls):
48
- """strategy name"""
49
- raise NotImplementedError
50
-
51
- @classmethod
52
- def from_strategy_name(cls, stgy_name: str):
53
- """from strategy name"""
54
- stgy_clz = TilingStrategy._strategies.get(stgy_name)
55
- if stgy_clz is None:
56
- raise Exception(f"Strategy:{stgy_name} not supported")
57
-
58
- return stgy_clz
59
-
60
- @abstractmethod
61
- def tiling(self) -> TilingPara:
62
- """tiling"""
63
- raise NotImplementedError
64
-
65
- def gen_tiling_para(self) -> TilingPara:
66
- """gen tiling para"""
67
- return TilingPara(self.Br, self.last_Br, self.Bc, self.last_Bc, self.Tr, self.Tc)
@@ -1,62 +0,0 @@
1
- # Copyright 2023 Huawei Technologies Co., Ltd
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- # ============================================================================
15
- """wukong tiling"""
16
- from mindspore.ops._op_impl._custom_op.flash_attention.tiling_strategy.strategy import TilingPara
17
- from mindspore.ops._op_impl._custom_op.flash_attention.tiling_strategy.strategy import TilingStrategy
18
-
19
-
20
- class WukongTiling(TilingStrategy):
21
- """A tiling strategy implementation for wukonghuahua model shape"""
22
-
23
- @classmethod
24
- def strategy_name(cls):
25
- return "wukong"
26
-
27
- def tiling(self) -> TilingPara:
28
- """
29
- 反向的空间分布待详细分析
30
- N = (4096, 1024, 256, 64) 或 77
31
- Nq = (4096, 1024, 256, 64)
32
- d = dv = (40, 80, 160, 160)
33
- """
34
- if self.N <= 77: # [77, 64]
35
- # cross-attention or self-attention of (64, 64, 160)
36
- self.Bc = self.N
37
- self.Tc = self.N // self.Bc
38
- if self.d <= 80: # [40, 80]
39
- # 内存瓶颈为在ub中对P*V结果[Br, dv]进行cast
40
- self.Br = min(self.Nq, 64)
41
- self.Tr = self.Nq // self.Br
42
- else:
43
- self.Br = min(self.Nq, 64)
44
- self.Tr = self.Nq // self.Br
45
- else:
46
- # self-attention
47
- if self.N == 256:
48
- self.Bc = 64
49
- self.Tc = 1
50
- # 内存瓶颈为在ub中对Q*K的结果[Br, Bc]进行cast
51
- self.Br = 64
52
- self.Tr = self.Nq // self.Br
53
- else:
54
- self.Bc = 64
55
- self.Tc = self.N // self.Bc
56
- self.Br = 64
57
- self.Tr = self.Nq // self.Br
58
-
59
- self.last_Br = self.Br
60
- self.last_Bc = self.Bc
61
-
62
- return self.gen_tiling_para()