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 the Shuffle.ADAPTIVEoption, 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 specify Shuffle.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 interface offload and the attribute backward_prefetch. Users can use this interface through Cell.offload(backward_prefetch) to offload activations within a specific Cell 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 and other 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 of tensor | 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 to function .

    Remove parameter mode , input_signature , hash_args , jit_config and compile_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 the ascend_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 and ENABLE_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.

详情查看:https://gitee.com/mindspore/mindspore/releases/v2.6.0


相關推薦

2023-11-10

体计算软件风雷的基础上,依托昇腾 AI 澎湃算力及昇思 MindSpore AI 框架共同研发的面向飞行器流体仿真的智能化模型。 大模型通过打造智能通用的流体力学软件平台与流体工业全场景应用底座,旨在实现全场景流场准确预测。

2022-09-22

论坛议程如下: 分论坛四:“昇思生态论坛” 昇思 MindSpore 是由华为开源的 AI 框架,原生支持大模型训练。现在,昇思 MindSpore AI 已经携手行业领先的研究机构,推出覆盖语言、影像、医学领域的四大模型,并广泛应用在金

2023-07-08

AI算力云平台,以及异构计算架构CANN、全场景AI框架昇思MindSpore,AI开发生产线ModelArts等,为大模型开发和运行提供分布式并行加速,算子和编译优化、集群级通信优化等关键能力。基于华为的AI根技术,大模型训练效能可以调优

2023-06-17

,人工智能框架生态峰会在上海举办。 峰会现场,昇思MindSpore携手行业用户与伙伴带来人工智能框架的最新进展与系列重磅发布,包括18家AI顶尖企业、学会、高校与科研院所联合发布《共建人工智能框架生态倡议》、昇思MindSp

2022-09-10

参与该分论坛并发表演讲的嘉宾有: 钟源珂,华为昇思MindSpore算法工程师 钟源珂硕士毕业于西北工业大学,研究方向为生物信息学,在 Briefings In Bioinformatics(IF 11.622)、BIBM国际会议等发表论文多篇。目前负责华为昇思大模

2024-06-27

发的,包括arkTS和仓颉编程语言、“盘古”AI大模型、“MindSpore”AI框架以及“DevEco Studio”等集成开发环境。 其中,仓颉编程语言是一种面向全场景应用开发的通用编程语言,语法简明高效,并支持函数式、命令式和面向对象等

2023-06-14

新和应用落地。 作为全球领先的人工智能框架,昇思MindSpore将在峰会中发挥重要作用,引领人工智能框架的创新与发展。昇思首创多维混合并行技术,并具备全场景协同和全流程极简的特点,可实现一次开发云边端全场景部

2024-07-05

7月4日,禅城区经济和科技促进局将携手华为云计算技术有限公司举办2024华为开发者大会(HDC 2024)佛山分会场活动,本次活动以“AI引领佛山智造,数聚禅城开拓创新”为主题。届时,来自产业研究领域的专家学者、优秀企业

2024-09-26

已进入加快推进应用落地的关键阶段,中国电信联合华为发布魔乐(Modelers)开发者社区,进一步驱动产业发展,加快技术创新和商业落地。魔乐社区汇聚了AI全产业链能力,依托成员单位提供AI全生命周期服务,吸引全国开发者

2025-04-02

工信部电子知识产权中心发布了《2024生成式人工智能全栈技术专利分析报告》,阐析了生成式人工智能全栈技术创新的新发展新突破,并围绕模型能力的最新拓展,由算力芯片和软件框架构成的基础层、大模型打造的模型层协

2023-03-17

sp;的核心竞争力 openGemini 开源后持续版本迭代,现已发布 v1.0.0 版本,在高性能、高安全、企业级特性、可扩展性、功能、应用开发等六个方面已全面具备生产环境可使用的完整能力。 高性能 openGemini 针对物联网、运

2024-08-28

展新模式,为数字产业健康快速发展作出了重要贡献。 华为公司常务董事、华为云CEO张平安表示,华为云在基础设施、AI领域持续投入,做好“黑土地”,助力千行万业数字化、智能化,而828 B2B企业节正是“把最合适的产品、

2025-04-29

4月27日下午,在北京人工智能产业生态创新发布会上,开源人工智能社区“模力方舟”正式发布,“开源人工智能应用创新大赛”也同步启动,经开区将围绕建设全域人工智能之城,助力共建国内AI开源开放生态。 模力方舟依

2024-09-28

件快速开发并接入系统;提供设计、开发、仿真、测试、发布的一站式平台,带来DevOps式的高效开发体验。 开放标准:打造南向部件接口标准,与社区共建南向硬件标准生态,实现天池部件自适配,非天池部件快速接入适配,