MindSpore v2.6.0 发布,华为全场景 AI 计算框架
MindSpore v2.6.0 已经发布,华为全场景 AI 计算框架。
MindSpore 2.6.0 Release Notes
Major Features and Improvements
Dataset
- [STABLE] The sharding sampling behavior of the MindDataset interface has been changed from block-based sampling (Data sharding strategy 2 in the link) to interval sampling (Data sharding strategy 1 in the link). Users can control whether to switch back to block-based sampling by setting the MS_DEV_MINDRECORD_SHARD_BLOCK environment variable.
- [STABLE] GeneratorDataset supports spawn to start multiprocessing, and supports the use of Ascend back-end data augmentation methods in multiprocessing. Users can set mindspore.dataset.config.set_multiprocessing_start_method("spawn") to enable multiprocessing in spawn mode.
- [STABLE] The
shuffle
parameter in MindDataset supports theShuffle.ADAPTIVE
option, which adaptively adjusts the shuffle sample count strategy based on the number of samples to reduce training memory overhead and lower the risk of OOM. If global shuffle is desired, users can specifyShuffle.GLOBAL
, but they must ensure sufficient machine memory.
Ascend
- [STABLE] In MindSpore's dynamic graph mode, the AscendC custom operators integrated by the ops.Custom primitive support multiple output types, and
ops.Custom
supports type inference on the C++ side. - [BETA] In MindSpore's dynamic graph mode, added
CustomOpBuilder
to support online building and loading of custom operators. - [STABLE] When using the O1 compilation option, users can control the scope of graph and computation fusion optimization. Users can enable or disable specific fusion patterns by setting the environment variable MS_DEV_GRAPH_KERNEL_FLAGS with options such as enable_fusion_pattern_only or disable_fusion_pattern. Additionally, it supports reading configuration from a file via the --path=example.json option.
- [STABLE] Support users to set the aclop operator cache information aging configuration and error message reporting mode configuration through the mindspore.device_context.ascend.op_debug.aclinit_config interface.
- [STABLE] GE backend only supports whole graph sinking and lazy inline subgraph sinking, while other scenarios are no longer supported.
- [BETA] In MindSpore's static graph O0/O1 mode,
mindpore.nn.Cell
adds the new interfaceoffload
and the attributebackward_prefetch
. Users can use this interface through Cell.offload(backward_prefetch) to offload activations within a specificCell
class from the device side to the host side during the forward training phase, and prefetch activations from the host side to the device side during the backward training phase.
Parallel
- [STABLE] Parallel pdb debugging, dynamic and static graph mode are supported. dynamic graph mode is recommended.
- [STABLE] New API mindspore.communication.get_comm_name, which allows users to query the name of the underlying communicator of the HCCL collection communication library.
- [STABLE] Added AutoParallel API to support parallel configuration of individual networks, solving the problem of excessive scope of parallel configuration.
- [STABLE] SeqPipe now supports two new scheduling methods, seqvpp and seqsmartvpp, significantly reducing the memory cost in scenarios where SeqPipe is combined with VPP.
- [STABLE] Static graph now supports zero2/zero3 level memory optimization, reducing the memory cost for models that require pure data parallel (DP) training.
- [STABLE] Static graph now supports 1b1f compute and communication overlapping in pipeline parallelism conditions, enhancing the performance of pipeline parallelism.
- [STABLE] Static graphs support grad model parallel communication overlap with dw computation under tensor model parallelism and expert model parallelism, improving model training performance.
- [STABLE] Static graph auto-parallel strategy propagation mode is updated to prioritize the layout propagation to improve the accuracy.
- [STABLE] Static graph auto-parallel support using mindspore.parallel.shard interface to configure strategies for mint operators, optimized for multi-input operators.
- [STABLE] For LLM reinforcement learning, now we support DP/MP/PP for training and inferenceing phase.
- [STABLE] MindSpore supports users to query whether the distributed module is available and whether the communication module is initialized. Users can query whether the distributed module is available through the mint.distributed.is_available interface, and query whether the communication module is initialized through the mint.distributed.is_initialized interface.
- [STABLE] MindSpore static graph mode supports the
AlltoAllV
forward and reverse operators. Users can use this operator through the ops.AlltoAllV interface. - [STABLE] Support CPU operators mindspore.mint.distributed.allreduce, mindspore.mint.distributed.barrier, mindspore.mint.distributed.send, and mindspore.mint.distributed.recv, and the users can use the corresponding aggregate communication operator functions through these interfaces.
Inference
- [STABLE] Support full-precision inference with BFloat16 and quantized inference with W8A8 for DeepSeek-V3/R1. Add or optimize 12 fusion operators including RmsNormQuant, MatMul+Sigmoid+Add, and Transpose+BatchMatMul+Transpose to enhance the inference performance of DeepSeek-V3/R1.
- [BETA] Support deploying inference services of DeepSeek-V3/R1 using MindIE and MindSpore Transformers large model development suite.
- [STABLE] Optimize the process of loading safetensors and realize on-demand initialization of GE, which reduces both memory usage and startup time when deploying inference services using MindIE and MindSpore Transformers large model suite.
- [BETA] Support deploying inference services of DeepSeek-V3/R1 and Qwen2.5 using the vLLM-MindSpore plugin and vLLM v0.6.6.post1.
Profiler
- [STABLE] The MindSpore framework supports obtaining communication domain parallel strategy information, which can be visualized to improve performance troubleshooting efficiency in cluster scenarios.
- [STABLE] MindSpore Profiler dynamic profiling supports lightweight instrumentation, allowing users to dynamically enable lightweight tracing and view performance data in real time.
- [STABLE] MindSpore Profiler's lightweight instrumentation capability has been enhanced, supporting key phases such as dataloader and save checkpoint with lightweight tracing information.
- [STABLE] Profiler supports viewing memory_access related aicore metric information.
- [STABLE] MindSpore Profiler supports mindspore.profiler.profile and _ExperimentalConfig, as well as the tensorboard_trace_handler parameter, improving tool usability.
- [STABLE] MindSpore Profiler dynamic profiling now supports memory data collection, allowing users to dynamically enable memory data gathering to enhance tool usability.
Compiler
- [BETA] The graph mode supports the inplace and view operator forward expression capabilities.
API Change
New APIs & Enhanced APIs
-
[DEMO] mindspore.mint API provides more functional, nn interfaces. The mint interface is currently an experimental interface and performs better than ops in
jit_level="O0"
and pynative mode. Currently, the graph sinking mode and CPU/GPU backend are not supported, and it will be gradually improved in the future.mindspore.mint mindspore.mint.reshape mindspore.mint.triangular_solve mindspore.mint.index_add mindspore.mint.logaddexp2 mindspore.mint.diag mindspore.mint.nn mindspore.mint.nn.Sigmoid mindspore.mint.nn.Conv2d mindspore.mint.nn.PixelShuffle mindspore.mint.nn.functional mindspore.mint.nn.functional.adaptive_avg_pool3d mindspore.mint.nn.functional.conv2d mindspore.mint.nn.functional.avg_pool3d mindspore.mint.nn.functional.elu_ mindspore.mint.nn.functional.pixel_shuffle others mindspore.mint.optim.SGD mindspore.mint.linalg.qr -
[STABLE] mindspore.mint API also provides some new stable interfaces. Besides, some demo interfaces are changed into stable ones.
mindspore.mint mindspore.mint.full_like mindspore.mint.log2 mindspore.mint.isneginf mindspore.mint.nn mindspore.mint.nn.GLU mindspore.mint.nn.KLDivLoss mindspore.mint.nn.functional mindspore.mint.nn.functional.glu mindspore.mint.nn.functional.kl_div mindspore.Tensor mindspore.Tensor.isneginf mindspore.Tensor.log2 -
[DEMO] mindspore.Tensor API provides more Tensor methods. Currently, these Tensor methods are experimental interfaces and currently does not support the graph sink mode and CPU, GPU backend, and they will be gradually improved in the future. Details can be found in API list in official website.
-
[STABLE] mindspore.ops provides two inference API mindspore.ops.moe_token_permute and mindspore.ops.moe_token_unpermute. Currently, only Ascend backend is supported.
-
[STABLE] mindspore.mint.nn.functional.gelu and mindspore.mint.nn.GeLU now support input argument "approximate".
-
[STABLE] Added the offline parsing interface mindspore.profiler.profiler.analyse.
Backwards Incompatible Change
-
For mindspore.ops.Xlogy, the arguments
input
andother
no longer support non-tensor input. (!81625)2.5.0 2.6.0 ops.Xlogy(input [Tensor, numbers.Number, bool], other [Tensor, numbers.Number, bool])
ops.Xlogy(input [Tensor], other [Tensor])
-
&
operator no longer supports the input Tensor with data type of uint32/uint64 on Ascend backend in PyNative mode.^
operator no longer supports the input Tensor with data type of uint16/uint32/uint64 on Ascend backend in PyNative mode.|
operator no longer supports the input Tensor with data type of uint16/uint32/uint64 on Ascend backend in PyNative mode at the scene oftensor | scalar
. (!82054) -
%
operator no longer supports the input Tensor with data type of uint16/uint32/uint64 on CPU and GPU backend. (!83055) -
mindspore.jit interface parameter change。(!80248)
The name of parameter
fn
is changed tofunction
.Remove parameter
mode
,input_signature
,hash_args
,jit_config
andcompile_once
.Add parameter
capture_mode
to set how to compile to MindSpore graph.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(mode="PIJit") ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(capture_mode="bytecode") ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
Add parameter
jit_level
to set the level of compilation optimization.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit, JitConfig >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(jit_config=JitConfig(jit_level="O0")) ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(jit_level="O0") ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
Add parameter
dynamic
to set whether dynamic shape compilation should be performed.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(dynamic=1) ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
Add parameter
fullgraph
to set whether to capture the entire function into graph.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit, JitConfig >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(jit_config=JitConfig(jit_syntax_level="STRICT")) ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(fullgraph=True) ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
Add parameter
backend
to set the compilation backend to be used.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(backend="ms_backend") ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
Add parameter
options
to set the dictionary of options to pass to the compilation backend.2.5.0 2.6.0 >>> import numpy as np >>> from mindspore import Tensor, jit, JitConfig >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(jit_config=JitConfig(infer_boost="on")) ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
>>> import numpy as np >>> from mindspore import Tensor, jit >>> >>> x = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> y = Tensor(np.ones([1, 1, 3, 3]).astype(np.float32)) >>> >>> @jit(infer_boost="on") ... def tensor_add_with_dec(x, y): ... z = x + y ... return z ... >>> out = tensor_add_with_dec(x, y)
-
The
mindspore.profiler.tensor_board_trace_handler
interface change.The
mindspore.profiler.tensor_board_trace_handler
interface is now renamed to mindspore.profiler.tensorboard_trace_handler.2.5.0 2.6.0 >>> from mindspore.profiler import tensor_board_trace_handler
>>> from mindspore.profiler import tensorboard_trace_handler
-
The
mindspore.set_context
interface change。The
exception_dump
field in theascend_config
parameter was changed to the"dump"
field in device_context.ascend.op_debug.aclinit_config.2.5.0 2.6.0 >>> import mindspore as ms >>> ms.set_context(ascend_config = {"exception_dump": "2"})
>>> import mindspore as ms >>> ms.device_context.ascend.op_debug.aclinit_config({"dump": {"dump_scene": "lite_exception"}})
-
The printing content of
mindspore.Tensor
change。The original Tensor prints only the value, while the new Tensor prints key information such as shape and dtype.
2.5.0 2.6.0 >>> import mindspore as ms >>> tensor = ms.Tensor([1,1,1], dtype=ms.float32) >>> print(tensor) [1. 1. 1.]
>>> import mindspore as ms >>> tensor = ms.Tensor([1,1,1], dtype=ms.float32) >>> print(tensor) Tensor(shape=[3], dtype=Float32, value= [ 1.00000000e+00, 1.00000000e+00, 1.00000000e+00])
-
In graph mode, Ascend backend, when jit_level is O2, the Dump interface changes.
In the graph Ascend backend jit_level O2 scenario, the environment variables
MINDSPORE_DUMP_CONFIG
andENABLE_MS_GE_DUMP
have been deprecated, and the dump-related functions have been migrated to the msprobe tool. For more details, please refer to msprobe Tool MindSpore Scene Accuracy Data Collection Guide.

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
Linus 发布 Linux 6.15-rc7,正式版计划下周推出
Linus Torvalds在内核邮件列表发布了 Linux 6.15-rc7,并称其有望成为 Linux 6.15 正式版发布前的最终版本,尽管第八个候选版本的可能性尚待确认。 Linus 表示,上周进展顺利,但他确实注意到“又一次”执行了 CPU 漏洞缓解措施,这带来了额外的工作量。 他说,这次的情况已经得到很好的处理,并且得到了控制,因此不太可能发展到 rc8 版本。除了 CPU 方面的问题外,Linus 还重点介绍了 DRM Xe 图形驱动程序的重大修复,以及针对扩展调度程序 sched-ext 的重要补丁。 Linus 的公告以对内核的大量修复和更新结束,表明目前有大量的工作正在进行中。一些贡献者也来自 Google 和 IBM 等公司——这两家公司都高度依赖 Linux,因此他们会持续资助员工致力于解决内核问题。就提交的补丁数量而言,本周排名靠前的贡献者是 Pawan Gupta (11 个)、Shuai Xue (9 个) 和 Kent Overstreet (8 个)。 在新的硬件支持方面,NEC Lavie X1475JAS 笔记本电脑获得了高级配置和电源接口 (AC...
- 下一篇
Dante Cloud 3.4.5.2 发布,“一套代码、两种架构”的企业级云原生微服务
[一] 项目简介 Dante Cloud 国内首个支持阻塞式和响应式服务并行的微服务平台。是采用领域驱动模型(DDD)设计思想,以「高质量代码、低安全漏洞」为核心,基于 Spring 生态全域开源技术,高度模块化和组件化设计,支持智能电视、IoT等物联网设备认证,满足国家三级等保要求,支持接口国密数字信封加解密等一系列安全体系的多租户微服务解决方案。可以“一套代码实现微服务和单体两种架构”的企业级应用系统。 [二] 项目理念 Dante Cloud 一直秉承着“简洁、高效、包容、务实”的理念,使用微服务领域及周边相关的各类新兴技术或主流技术进行建设,不断地深耕细作、去粗取精、用心打造。目标是构建一款代码质量高、维护投入低、安全防护强的,可以帮助用户快速跨越架构技术选型、技术研究探索阶段,降低传统项目中因安全漏洞、技术负债、低质代码等潜在隐患所产生的高维护投入,期望像项目名字寓意一样,在行业变革的时期承上启下,助力企业信息化建设和变革的产品。 Dante Cloud 核心关注点是:「高质量的系统代码」、「合理的系统架构」、「低耦合的模块划分」、「高安全性系统实现」、「灵活的功能扩展能力」...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- CentOS7安装Docker,走上虚拟化容器引擎之路
- CentOS7,CentOS8安装Elasticsearch6.8.6
- Docker安装Oracle12C,快速搭建Oracle学习环境
- Linux系统CentOS6、CentOS7手动修改IP地址
- CentOS7设置SWAP分区,小内存服务器的救世主
- CentOS6,7,8上安装Nginx,支持https2.0的开启
- MySQL8.0.19开启GTID主从同步CentOS8
- CentOS6,CentOS7官方镜像安装Oracle11G
- Mario游戏-低调大师作品
- CentOS8,CentOS7,CentOS6编译安装Redis5.0.7