mindspore 2.4.1__cp311-cp311-win_amd64.whl → 2.4.10__cp311-cp311-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.
- mindspore/.commit_id +1 -1
- mindspore/Microsoft.VisualStudio.Telemetry.dll +0 -0
- mindspore/Newtonsoft.Json.dll +0 -0
- mindspore/_c_dataengine.cp311-win_amd64.pyd +0 -0
- mindspore/_c_expression.cp311-win_amd64.pyd +0 -0
- mindspore/_c_mindrecord.cp311-win_amd64.pyd +0 -0
- mindspore/atlprov.dll +0 -0
- mindspore/avcodec-59.dll +0 -0
- mindspore/avdevice-59.dll +0 -0
- mindspore/avfilter-8.dll +0 -0
- mindspore/avformat-59.dll +0 -0
- mindspore/avutil-57.dll +0 -0
- mindspore/c1.dll +0 -0
- mindspore/c1xx.dll +0 -0
- mindspore/c2.dll +0 -0
- mindspore/common/api.py +1 -4
- mindspore/common/file_system.py +2 -0
- mindspore/common/parameter.py +1 -14
- mindspore/communication/_comm_helper.py +5 -0
- mindspore/context.py +7 -2
- mindspore/dataset/engine/datasets_standard_format.py +17 -0
- mindspore/dataset/engine/datasets_user_defined.py +27 -1
- mindspore/dnnl.dll +0 -0
- mindspore/dpcmi.dll +0 -0
- mindspore/experimental/llm_boost/__init__.py +2 -2
- mindspore/experimental/llm_boost/atb/boost_base.py +240 -64
- mindspore/experimental/llm_boost/atb/llama_boost.py +46 -29
- mindspore/experimental/llm_boost/atb/qwen_boost.py +47 -24
- mindspore/include/api/context.h +1 -1
- mindspore/include/dataset/constants.h +2 -2
- mindspore/jpeg62.dll +0 -0
- mindspore/mindspore_backend.dll +0 -0
- mindspore/mindspore_common.dll +0 -0
- mindspore/mindspore_core.dll +0 -0
- mindspore/mindspore_glog.dll +0 -0
- mindspore/mindspore_np_dtype.dll +0 -0
- mindspore/mindspore_ops.dll +0 -0
- mindspore/msobj140.dll +0 -0
- mindspore/mspdb140.dll +0 -0
- mindspore/mspdbcore.dll +0 -0
- mindspore/mspdbst.dll +0 -0
- mindspore/mspft140.dll +0 -0
- mindspore/msvcdis140.dll +0 -0
- mindspore/msvcp140_1.dll +0 -0
- mindspore/msvcp140_2.dll +0 -0
- mindspore/msvcp140_atomic_wait.dll +0 -0
- mindspore/msvcp140_codecvt_ids.dll +0 -0
- mindspore/nn/__init__.py +2 -0
- mindspore/nn/cell.py +16 -2
- mindspore/nn/layer/conv.py +3 -0
- mindspore/nn/layer/pooling.py +8 -10
- mindspore/nn/utils/__init__.py +22 -0
- mindspore/nn/utils/init.py +71 -0
- mindspore/opencv_core452.dll +0 -0
- mindspore/opencv_imgcodecs452.dll +0 -0
- mindspore/opencv_imgproc452.dll +0 -0
- mindspore/ops/_grad_experimental/grad_comm_ops.py +25 -7
- mindspore/ops/auto_generate/gen_ops_prim.py +3 -2
- mindspore/ops/function/math_func.py +5 -4
- mindspore/ops/operations/comm_ops.py +4 -1
- mindspore/ops/operations/custom_ops.py +6 -4
- mindspore/ops/operations/nn_ops.py +7 -2
- mindspore/parallel/_auto_parallel_context.py +23 -4
- mindspore/parallel/_cell_wrapper.py +22 -3
- mindspore/parallel/_utils.py +0 -1
- mindspore/pgodb140.dll +0 -0
- mindspore/pgort140.dll +0 -0
- mindspore/run_check/_check_version.py +17 -8
- mindspore/swresample-4.dll +0 -0
- mindspore/swscale-6.dll +0 -0
- mindspore/tbbmalloc.dll +0 -0
- mindspore/tinyxml2.dll +0 -0
- mindspore/train/callback/_tft_register.py +7 -6
- mindspore/train/model.py +1 -0
- mindspore/train/serialization.py +4 -1
- mindspore/turbojpeg.dll +0 -0
- mindspore/vcmeta.dll +0 -0
- mindspore/vcruntime140.dll +0 -0
- mindspore/vcruntime140_1.dll +0 -0
- mindspore/version.py +1 -1
- {mindspore-2.4.1.dist-info → mindspore-2.4.10.dist-info}/METADATA +2 -2
- {mindspore-2.4.1.dist-info → mindspore-2.4.10.dist-info}/RECORD +85 -83
- {mindspore-2.4.1.dist-info → mindspore-2.4.10.dist-info}/WHEEL +0 -0
- {mindspore-2.4.1.dist-info → mindspore-2.4.10.dist-info}/entry_points.txt +0 -0
- {mindspore-2.4.1.dist-info → mindspore-2.4.10.dist-info}/top_level.txt +0 -0
mindspore/.commit_id
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__commit_id__ = ''[sha1]:
|
|
1
|
+
__commit_id__ = ''[sha1]:8e2ae935,[branch]:(HEAD->r2.4.1,origin/r2.4.1)''
|
|
Binary file
|
mindspore/Newtonsoft.Json.dll
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
mindspore/atlprov.dll
CHANGED
|
Binary file
|
mindspore/avcodec-59.dll
CHANGED
|
Binary file
|
mindspore/avdevice-59.dll
CHANGED
|
Binary file
|
mindspore/avfilter-8.dll
CHANGED
|
Binary file
|
mindspore/avformat-59.dll
CHANGED
|
Binary file
|
mindspore/avutil-57.dll
CHANGED
|
Binary file
|
mindspore/c1.dll
CHANGED
|
Binary file
|
mindspore/c1xx.dll
CHANGED
|
Binary file
|
mindspore/c2.dll
CHANGED
|
Binary file
|
mindspore/common/api.py
CHANGED
|
@@ -1703,7 +1703,6 @@ class _CellGraphExecutor:
|
|
|
1703
1703
|
self._graph_executor = GraphExecutor_.get_instance()
|
|
1704
1704
|
self._graph_executor.set_py_exe_path(sys.executable)
|
|
1705
1705
|
self._graph_executor.set_kernel_build_server_dir(os.path.split(kernel_build_server.__file__)[0] + os.sep)
|
|
1706
|
-
self._pid = os.getpid()
|
|
1707
1706
|
|
|
1708
1707
|
def init_dataset(self, queue_name, dataset_size, batch_size, dataset_types, dataset_shapes,
|
|
1709
1708
|
input_indexs, phase='dataset', need_run=True):
|
|
@@ -1934,9 +1933,7 @@ class _CellGraphExecutor:
|
|
|
1934
1933
|
|
|
1935
1934
|
def del_net_res(self, obj, net_id):
|
|
1936
1935
|
"""Clear the memory resource of a network."""
|
|
1937
|
-
|
|
1938
|
-
if self._pid == os.getpid():
|
|
1939
|
-
self._graph_executor.del_net_res(obj, net_id)
|
|
1936
|
+
self._graph_executor.del_net_res(obj, net_id)
|
|
1940
1937
|
|
|
1941
1938
|
def _get_branch_control_input(self):
|
|
1942
1939
|
if ('obf_ratio' not in self.obfuscate_config.keys()) or (
|
mindspore/common/file_system.py
CHANGED
|
@@ -22,6 +22,7 @@ class FileSystem:
|
|
|
22
22
|
self.create_args = ("ab",)
|
|
23
23
|
self.open = open
|
|
24
24
|
self.open_args = ("rb",)
|
|
25
|
+
self.backend = "basic"
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def _register_basic_file_system(fs: FileSystem):
|
|
@@ -45,4 +46,5 @@ def _register_mindio_file_system(fs: FileSystem):
|
|
|
45
46
|
fs.create_args = ()
|
|
46
47
|
fs.open = mindio.open_file
|
|
47
48
|
fs.open_args = ()
|
|
49
|
+
fs.backend = "mindio"
|
|
48
50
|
return True
|
mindspore/common/parameter.py
CHANGED
|
@@ -22,7 +22,6 @@ import os
|
|
|
22
22
|
import sys
|
|
23
23
|
import math
|
|
24
24
|
import numbers
|
|
25
|
-
from contextlib import contextmanager
|
|
26
25
|
import numpy as np
|
|
27
26
|
from mindspore import log as logger
|
|
28
27
|
from mindspore.log import _LogActionOnce
|
|
@@ -55,16 +54,6 @@ PARAMETER_NAME_PREFIX_MAX_LEN = 1024
|
|
|
55
54
|
_GLOBAL_PARAMETER_KEY = -1
|
|
56
55
|
|
|
57
56
|
|
|
58
|
-
@contextmanager
|
|
59
|
-
def no_init_parameters():
|
|
60
|
-
init_class = globals()["Parameter"]
|
|
61
|
-
setattr(init_class, "init_param", False)
|
|
62
|
-
try:
|
|
63
|
-
yield
|
|
64
|
-
finally:
|
|
65
|
-
setattr(init_class, "init_param", True)
|
|
66
|
-
|
|
67
|
-
|
|
68
57
|
def _is_in_auto_parallel_mode():
|
|
69
58
|
"""Get parallel mode."""
|
|
70
59
|
return auto_parallel_context().get_parallel_mode() in ["semi_auto_parallel", "auto_parallel"]
|
|
@@ -988,9 +977,7 @@ class Parameter(Tensor_):
|
|
|
988
977
|
"""
|
|
989
978
|
if self.is_default_input_init and self.is_in_parallel != _is_in_auto_parallel_mode():
|
|
990
979
|
raise RuntimeError("Must set or change parallel mode before any initializer Tensor created.")
|
|
991
|
-
if
|
|
992
|
-
return self
|
|
993
|
-
if self.init_mode is None:
|
|
980
|
+
if self.init_mode is None or not self.has_init:
|
|
994
981
|
return self
|
|
995
982
|
if self.inited_param is not None:
|
|
996
983
|
return self.inited_param
|
mindspore/context.py
CHANGED
|
@@ -936,6 +936,7 @@ def set_auto_parallel_context(**kwargs):
|
|
|
936
936
|
\ group_ckpt_save_file
|
|
937
937
|
\ auto_pipeline
|
|
938
938
|
\ dump_local_norm
|
|
939
|
+
\ dump_device_local_norm
|
|
939
940
|
=========================== ===========================
|
|
940
941
|
|
|
941
942
|
Args:
|
|
@@ -1090,6 +1091,9 @@ def set_auto_parallel_context(**kwargs):
|
|
|
1090
1091
|
dump_local_norm (bool): Whether to dump local_norm value, when the `parallel_mode` is set to
|
|
1091
1092
|
``semi_auto_parallel`` or ``auto_parallel``.
|
|
1092
1093
|
Default: ``False`` .
|
|
1094
|
+
dump_device_local_norm (bool): Whether to dump device_local_norm value, when the `parallel_mode` is set to
|
|
1095
|
+
``semi_auto_parallel`` or ``auto_parallel``.
|
|
1096
|
+
Default: ``False`` .
|
|
1093
1097
|
|
|
1094
1098
|
Raises:
|
|
1095
1099
|
ValueError: If input key is not attribute in auto parallel context.
|
|
@@ -1165,8 +1169,9 @@ def reset_auto_parallel_context():
|
|
|
1165
1169
|
- pipeline_stages: 1.
|
|
1166
1170
|
- pipeline_result_broadcast: False.
|
|
1167
1171
|
- fusion_threshold: 64.
|
|
1168
|
-
- dump_local_norm: False.
|
|
1169
1172
|
- auto_pipeline: False.
|
|
1173
|
+
- dump_local_norm: False.
|
|
1174
|
+
- dump_device_local_norm: False.
|
|
1170
1175
|
|
|
1171
1176
|
Examples:
|
|
1172
1177
|
>>> import mindspore as ms
|
|
@@ -1793,7 +1798,7 @@ def set_context(**kwargs):
|
|
|
1793
1798
|
When both exist simultaneously, the global jit config will not overwrite the local network's jit config.
|
|
1794
1799
|
|
|
1795
1800
|
- jit_level (str): Used to control the compilation optimization level. Default: ``""`` , The framework
|
|
1796
|
-
automatically selects the execution method based on product,
|
|
1801
|
+
automatically selects the execution method based on product, Atlas training product is O2, and all other
|
|
1797
1802
|
products are O0. In addition, The option of the dynamic shape must be O0 or O1, O2 is not supported.
|
|
1798
1803
|
The value range is as follows:
|
|
1799
1804
|
|
|
@@ -33,6 +33,7 @@ from .datasets import UnionBaseDataset, SourceDataset, MappableDataset, Shuffle,
|
|
|
33
33
|
from .datasets_user_defined import GeneratorDataset
|
|
34
34
|
from .obs.obs_mindrecord_dataset import MindRecordFromOBS
|
|
35
35
|
from .validators import check_csvdataset, check_minddataset, check_tfrecorddataset, check_obsminddataset
|
|
36
|
+
from ..core.validator_helpers import type_check
|
|
36
37
|
from ...mindrecord.config import _get_enc_key, _get_dec_mode, _get_hash_mode, decrypt, verify_file_hash
|
|
37
38
|
|
|
38
39
|
|
|
@@ -301,6 +302,22 @@ class MindDataset(MappableDataset, UnionBaseDataset):
|
|
|
301
302
|
else:
|
|
302
303
|
self.new_padded_sample[k] = v
|
|
303
304
|
|
|
305
|
+
def __deepcopy__(self, memodict):
|
|
306
|
+
if id(self) in memodict:
|
|
307
|
+
return memodict[id(self)]
|
|
308
|
+
return self.__safe_deepcopy__(memodict, exclude=("mindrecord_op"))
|
|
309
|
+
|
|
310
|
+
def __getitem__(self, index):
|
|
311
|
+
type_check(index, (int,), "index")
|
|
312
|
+
if index < 0:
|
|
313
|
+
raise ValueError("index cannot be negative, but got {0}.".format(index))
|
|
314
|
+
if not hasattr(self, "mindrecord_op"):
|
|
315
|
+
minddata_node = cde.MindDataNode(
|
|
316
|
+
self.dataset_files, self.columns_list, self.sampler, self.new_padded_sample,
|
|
317
|
+
self.num_padded, shuffle_to_shuffle_mode(self.shuffle_option))
|
|
318
|
+
self.mindrecord_op = minddata_node.Build()
|
|
319
|
+
return [t.as_array() for t in self.mindrecord_op[index]]
|
|
320
|
+
|
|
304
321
|
|
|
305
322
|
class TFRecordDataset(SourceDataset, UnionBaseDataset):
|
|
306
323
|
"""
|
|
@@ -19,6 +19,7 @@ After declaring the dataset object, you can further apply dataset operations
|
|
|
19
19
|
(e.g. filter, skip, concat, map, batch) on it.
|
|
20
20
|
"""
|
|
21
21
|
import builtins
|
|
22
|
+
import copy
|
|
22
23
|
import errno
|
|
23
24
|
import itertools
|
|
24
25
|
import math
|
|
@@ -50,6 +51,7 @@ from ..core.config import get_enable_shared_mem, get_prefetch_size, get_multipro
|
|
|
50
51
|
get_enable_watchdog, get_debug_mode, get_seed, set_seed
|
|
51
52
|
from ..core.datatypes import mstypelist_to_detypelist
|
|
52
53
|
from ..core.py_util_helpers import ExceptionHandler
|
|
54
|
+
from ..core.validator_helpers import type_check
|
|
53
55
|
from ..transforms import transforms
|
|
54
56
|
|
|
55
57
|
|
|
@@ -427,6 +429,10 @@ class SamplerFn(cde.PythonMultiprocessingRuntime):
|
|
|
427
429
|
subprocess_file_descriptor = w.sentinel
|
|
428
430
|
st = time.time()
|
|
429
431
|
while _PythonMultiprocessing.is_process_alive(w.pid):
|
|
432
|
+
process = psutil.Process(w.pid)
|
|
433
|
+
if process.status() == psutil.STATUS_ZOMBIE:
|
|
434
|
+
process.kill()
|
|
435
|
+
break
|
|
430
436
|
time.sleep(0.01) # sleep 10ms, waiting for the subprocess exit
|
|
431
437
|
if time.time() - st > check_interval:
|
|
432
438
|
logger.warning("Waiting for the subprocess worker [{}] to exit.".format(w.pid))
|
|
@@ -469,7 +475,7 @@ class SamplerFn(cde.PythonMultiprocessingRuntime):
|
|
|
469
475
|
|
|
470
476
|
# let the quit event notify the worker process to exit
|
|
471
477
|
w.join(timeout=5)
|
|
472
|
-
if w.
|
|
478
|
+
if _PythonMultiprocessing.is_process_alive(w.pid):
|
|
473
479
|
# if the worker process did not exit, it may hang, try to terminate it
|
|
474
480
|
w.terminate()
|
|
475
481
|
w.close()
|
|
@@ -907,6 +913,26 @@ class GeneratorDataset(MappableDataset, UnionBaseDataset):
|
|
|
907
913
|
return memodict[id(self)]
|
|
908
914
|
return self.__safe_deepcopy__(memodict, exclude=("source", "__transfer_dataset__"))
|
|
909
915
|
|
|
916
|
+
def __getitem__(self, index):
|
|
917
|
+
type_check(index, (int, np.number), "index")
|
|
918
|
+
if not hasattr(self.source, "__getitem__"):
|
|
919
|
+
raise RuntimeError("Dataset don't support randomized access.")
|
|
920
|
+
if not hasattr(self, "generator_op"):
|
|
921
|
+
dataset = copy.deepcopy(self)
|
|
922
|
+
self.prepared_source = _generator_fn_wrapper(_cpp_sampler_fn, self.source)
|
|
923
|
+
if self.schema is None:
|
|
924
|
+
dataset.generator_node = cde.GeneratorNode(self.prepared_source, self.column_names, self.column_types,
|
|
925
|
+
self.source_len, self.sampler, 1, None)
|
|
926
|
+
else:
|
|
927
|
+
schema = self.schema
|
|
928
|
+
if isinstance(schema, Schema):
|
|
929
|
+
schema = self.schema.cpp_schema
|
|
930
|
+
dataset.generator_node = cde.GeneratorNode(self.prepared_source, schema, self.source_len,
|
|
931
|
+
self.sampler, 1, None)
|
|
932
|
+
self.generator_op = dataset.generator_node.Build()
|
|
933
|
+
sample_id = self.generator_op.GetMappedIndex(index)
|
|
934
|
+
return self.source[sample_id]
|
|
935
|
+
|
|
910
936
|
def is_shuffled(self):
|
|
911
937
|
if self.sampler:
|
|
912
938
|
return self.sampler.is_shuffled()
|
mindspore/dnnl.dll
CHANGED
|
Binary file
|
mindspore/dpcmi.dll
CHANGED
|
Binary file
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"""LlmBoost Register"""
|
|
16
16
|
from __future__ import absolute_import
|
|
17
17
|
|
|
18
|
-
from mindspore.experimental.llm_boost.atb import
|
|
18
|
+
from mindspore.experimental.llm_boost.atb import LlamaBoost, QwenBoost
|
|
19
19
|
from mindspore.experimental.llm_boost.register import LlmBoostRegister
|
|
20
20
|
|
|
21
|
-
__all__ = [
|
|
21
|
+
__all__ = ["LlmBoostRegister"]
|