From ea38b8475d5a2bd6d4a89b84572cf6cef5a55950 Mon Sep 17 00:00:00 2001 From: yuhan Date: Thu, 24 Jul 2025 16:51:19 +0800 Subject: [PATCH] modify config --- docs/lite/api/source_en/conf.py | 4 +- docs/mindspore/source_en/RELEASE.md | 125 +++++++++++++++++++++++++ docs/mindspore/source_en/conf.py | 59 ++++++------ docs/mindspore/source_zh_cn/RELEASE.md | 125 +++++++++++++++++++++++++ docs/mindspore/source_zh_cn/conf.py | 72 ++++++++------ 5 files changed, 324 insertions(+), 61 deletions(-) create mode 100644 docs/mindspore/source_en/RELEASE.md create mode 100644 docs/mindspore/source_zh_cn/RELEASE.md diff --git a/docs/lite/api/source_en/conf.py b/docs/lite/api/source_en/conf.py index 7b7914e6d9..6b27f55256 100644 --- a/docs/lite/api/source_en/conf.py +++ b/docs/lite/api/source_en/conf.py @@ -308,7 +308,9 @@ try: decorator_list = [("mindspore_lite/model.py","del decorator", "@set_env","# generate api by del decorator set_env."), ("mindspore_lite/converter.py","del decorator", - "@set_env","# generate api by del decorator set_env.")] + "@set_env","# generate api by del decorator set_env."), + ("mindspore_lite/llm_engine.py","del decorator", + "@set_env","# generate api by del decorator set_env.")] for i in decorator_list: with open(os.path.join(base_path, os.path.normpath(i[0])), "r+", encoding="utf8") as f: diff --git a/docs/mindspore/source_en/RELEASE.md b/docs/mindspore/source_en/RELEASE.md new file mode 100644 index 0000000000..11088488b3 --- /dev/null +++ b/docs/mindspore/source_en/RELEASE.md @@ -0,0 +1,125 @@ +# Release Notes + +[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.7.0rc1/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/mindspore/blob/v2.7.0-rc1/RELEASE.md) + +## MindSpore 2.7.0-rc1 Release Notes + +### Major Features and Improvements + +#### Ascend + +- [STABLE] Added GroupedMatmul optimization in O1 scenario, which supports fusion of element-wise operators to significantly reduce data handling overhead and improve computational efficiency. Users can turn it on by setting the environment variable `MS_DEV_GRAPH_KERNEL_FLAGS` to `"--enable_cluster_ops=GroupedMatmul"`. +- [STABLE] Improved ease of use of memory tracker: Users can import tracker data for model memory analysis via [mindspore.runtime.memory_replay(file_path)](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/runtime/mindspore.runtime.memory_replay.html); set the tracker data storage path by setting `export MS_ALLOC_CONF=memory_tracker_path:file_path`;reduce the size of saved data by setting `export MS_ALLOC_CONF=simple_tracker:true` to save only the last user of each memory block. +- [STABLE] Optimized the custom operator function of ops.Custom primitive for aclnn types in graph mode, with full support for inputs of non-Tensor type and automatic loading of RegInfo information, which significantly improves the ease of use and flexibility of aclnn custom operator. + +#### PyNative + +- [STABLE] [mindspore.nn.Cell.register_forward_hook](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.register_forward_hook) and [mindspore.nn.Cell.register_forward_pre_hook](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.register_forward_pre_hook) added the `with_kwargs` argument (default: False) to support passing keyword arguments from the `construct` call to `hook_fn`. +- [STABLE] [mindspore.Tensor.register_hook](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore/Tensor/mindspore.Tensor.register_hook.html#mindspore.Tensor.register_hook) now supports registering hooks on output tensors of operators with multiple outputs. +- [STABLE] Enhanced Cell custom bprop. Support verification and automatic conversion of data type and shape for return value and corresponding input. +- [STABLE] Added [Storage](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore/Tensor/mindspore.Tensor.storage.html) API for Tensor: Supports memory operations through Storage and related interfaces to achieve memory optimization. +- [STABLE] Added C++ [ms::pynative::PyboostRunner](https://www.mindspore.cn/tutorials/en/r2.7.0rc1/custom_program/operation/cpp_api_for_custom_ops.html#class-pyboostrunner) interface to facilitate customization of the operator to support PyNative's multi-stage pipelining runtime. + +#### parallel + +- [STABLE] Configurable HCCL buffer size for communucation group: [communication.create_group](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/communication/mindspore.communication.create_group.html#mindspore.communication.create_group) supports additional configuration `options` in passing communication domain, sets the communication domain HCCL communication domain cache size by `hccl_config` key-value pair to avoid OOM under multiple communication domains. +- [STABLE] Supported CPU communication interfaces [mint.distributed.all_reduce](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.all_reduce.html)/[mint.distributed.barrier](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.barrier.html)/[mint.distributed.send](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.send.html)/[mint.distributed.recv](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.recv.html), through which users can use the corresponding collective communication operators functions. +- [STABLE] In static graph mode, forward and reverse operators, [AllGatherV](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/ops/mindspore.ops.AllGatherV.html) and [ReduceScatterV](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/ops/mindspore.ops.ReduceScatterV.html) are supported. +- [BETA] Support for data caching via member methods of [mint.distributed.TCPStore](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.TCPStore.html) function. + +#### Training + +- [STABLE] Recomputation communication overlap: Supports mutual overlap of the communication between two cells for full recomputation, improving the performance of the recomputation scenario model. +- [STABLE] Quick recovery from accuracy failure without reboot: Supports resuming training of loading a checkpoint file without restrarting the process when training result excepition occurs. +- [STABLE] Silent data corruption detection: Supporting validation of `MatMul` results during forward and backward computations. User can enable it by setting the environment variable `MS_SDC_DETECT_ENABLE` to `1`. Using interfaces in the `mindspore.utils.sdc_detect` module to start/stop detection and get the detection result. + +#### Inference + +- [STABLE] The vLLM MindSpore plugin has now been adapted to vLLM v0.8.3 and supports foundational features of the vLLM V1 new architecture, including inference capabilities such as Chunked Prefill and Automatic Prefix Caching. For service-oriented deployment, vLLM MindSpore adds support for hybrid DP/TP/EP parallel inference capabilities on DeepSeek-V3/R1, effectively improving both full and incremental inference efficiency while reducing device memory overhead. + +#### Tool + +MindInsight will no longer update or release new versions after version 2.3,and the related documents have been removed. The origin system optimization data visualization has been integrated into MindStudio Insight, and scalar visualization, parameter distribution visualization, and computational graphs visualization have been integrated into the MindStudio Insight plugins. For details, see the [MindStudio Insight User Guide](https://www.hiascend.com/document/detail/zh/mindstudio/80RC1/GUI_baseddevelopmenttool/msascendinsightug/Insight_userguide_0002.html). + +- [STABLE] MindSpore Profiler supports msMonitor, enabling users to collect performance data through online monitoring tools. +- [STABLE] MindSpore Profiler adds the record_shapes parameter, supporting users to collect shapes of operators issued by the framework side. +- [STABLE] MindSpore Profiler adds sys resource parameters, supporting the ability to collect sys resource class information. +- [STABLE] MindSpore Profiler adds host_sysparameter, supporting the ability to collect host information such as system call class, storage class, CPU information, etc. +- [STABLE] MindSpore Profiler mstx module provides domain functionality, supporting users to finely control mstx data. + +### API Change + +- [STABLE] Some of the functional, nn and Tensor interfaces in the DEMO state in the [mindspore.mint](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore.mint.html) API are turned to STABLE. The mint interfaces are still mostly experimental, with better performance than ops interfaces in the graph compilation mode O0/O1 and PyNative mode. Currently O2 compilation mode (graph sink) and CPU, GPU backend are not supported, which will be gradually improved. + + | mindspore.mint | + | :-------------------------- | + | mindspore.mint.randomperm | + | mindspore.mint.randn | + | mindspore.mint.randint | + | mindspore.mint.triu | + | mindspore.mint.empty_like | + | mindspore.mint.empty | + | mindspore.mint.floor_divide | + + | mindspore.mint.nn | + | :----------------------------- | + | mindspore.mint.nn.BatchNorm1d | + | mindspore.mint.nn.BatchNorm2d | + | mindspore.mint.nn.BatchNorm3d | + | mindspore.mint.nn.PixelShuffle | + | mindspore.mint.nn.Threshold | + + | mindspore.mint.nn.functional | + | :----------------------------------------- | + | mindspore.mint.nn.functional.threshold | + | mindspore.mint.nn.functional.threshold_ | + | mindspore.mint.nn.functional.pixel_shuffle | + + | mindspore.Tensor | + | ----------------------------- | + | mindspore.Tensor.new_full | + | mindspore.Tensor.new_empty | + | mindspore.Tensor.floor_divide | + | mindspore.Tensor.exponential_ | + +- [STABLE] [mindspore.ops](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore.ops.html) API provides an new interface [mindspore.ops.swiglu](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/ops/mindspore.ops.swiglu.html). Currently, only Ascend backend is supported. +- [STABLE] [mindspore.ops.svd](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/ops/mindspore.ops.svd.html#mindspore.ops.svd) of [mindspore.ops](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore.ops.html) API now extra supports Ascend backend. +- [STABLE] [mindspore.mint.nn.functional.silu](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.nn.functional.silu.html#mindspore.mint.nn.functional.silu) and [mindspore.mint.nn.SiLU](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mint/mindspore.mint.nn.SiLU.html) now support input argument `inplace`. +- [STABLE] [communication.create_group](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/communication/mindspore.communication.create_group.html#mindspore.communication.create_group) adds support for additional configuration `options` for communication domains. HCCL backend supports setting `hccl_config` in `options` to set the HCCL communication domain cache size for communication domains. +- [STABLE] [mindspore.runtime](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/mindspore.runtime.html) API adds implementation of [mindspore.runtime.empty_cache](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/runtime/mindspore.runtime.empty_cache.html#mindspore.runtime.empty_cache). +- [STABLE] [mindspore.runtime.set_memory](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_memory.html#mindspore.runtime.set_memory) now supports input argument `huge_page_reserve_size`. +- [STABLE] [mindspore.runtime.set_cpu_affinity](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_cpu_affinity.html) now supports input argument `module_to_cpu_dict`. +- [STABLE] [minspore.nn.cell](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html) added the function to view/save model's state_dict. New interfaces are as follows: + + | mindspore.nn.Cell | + | --------------------------------------- | + | cell.register_state_dict_post_hook | + | cell.register_state_dict_pre_hook | + | cell.state_dict | + | cell.register_load_state_dict_pre_hook | + | cell.register_load_state_dict_post_hook | + | cell.load_state_dict | + +- [STABLE] [minspore.nn.cell](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html) added the function to view/register model's buffer. New interfaces are as follows: + + | mindspore.nn.Cell | + | -------------------- | + | cell.register_buffer | + | cell.get_buffer | + | cell.get_sub_cell | + | cell.named_buffer | + | cell.buffers | + +#### Backwards Incompatible Change + +- [runtime.set_cpu_affinity](https://www.mindspore.cn/docs/en/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_cpu_affinity.html) + + The type of `affinity_cpu_list` changed from dictionary to list to customize the configuration of affinity CPU range segments for a single process only. Added a new parameter `module_to_cpu_dict` to support customized configuration of CPU affinity policies for hot module threads. + + | 2.6 | 2.7 | + | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | + | >>> from mindspore.runtime import set_cpu_affinity
>>> set_cpu_affinity(True, {"device0": ["10-19", "23-40"]}) | >>> from mindspore.runtime import set_cpu_affinity
>>> set_cpu_affinity(True, ["10-19", "23-40"],
...                                {"main": [0,1,2,3],
...                                 "runtime": [4,5,6],
...                                 "pynative": [7,8,9]}) | + +### Contributors + +baochong,Bellatan,BJ-WANG,caifubi,caiji_zhang,Carey,chaijinwei,changzherui,chengbin,chujinjin,DavidFFFan,DeshiChen,dingjinshan,Dring,ehaleva,Erpim,fary86,fengtingyan,fengyixing,fuchao,gaoyong10,gengdongjie,guangpengz,GuoZhibin,gupengcheng0401,haozhang,hedongdong,hhz886,huandong1,huangbingjian,huangziling,huda,HuilanLi,hujiahui8,jiangchao_j,jianghui58,jiangshanfeng,jiaorui,jiaxueyu,jizewei,jjfeing,jshawjc,kairui_kou,kingxian,kisnwang,lanzhineng,leida,LiangZhibo,lichen,limingqi107,LiNuohang,linux,liubuyu,liuchengji,liuluobin,liuyanwei,lkp,looop5,lujiale,luochao60,luoyang,maoyuanpeng1,Margaret_wangrui,mengxian,MengXiangyu,mengyuanli,NaCN,One_East,panshaowu,panzhihui,pengqi,Qiao_Fu,qiuleilei,qiuyufeng,rainyhorse,SaiYao,shaoshengqi,shen_haochen,shenhaojing,shenwei41,shuqian0,tanghuikang,tangmengcheng,tan-wei-cheng,tianxiaodong,uuhuu,wang_ziqi,WangChengzhao,wangshaocong,wangyibo,wujueying,XianglongZeng,xiaopeng,xiaotianci,xiaoyao,XinDu,xuzhen,yangguodong,yanghaoran,yangyingchun,Yanzhi_YI,yide12,yihangchen,YijieChen,yuanqi,yuchaojie,yuezenglin,YuJianfeng,YukioZzz,yuliangbin,yyuse,zhangbuxue,zhangdanyang,zhanghanLeo,zhangyinxia,ZhangZGC,zhanzhan,zhaochenjie,zhengzuohe,zhouyaqiang0,zhunaipan,zichun_ye,ZPaC,zyli2020,程超,范吉斌,胡犇,胡彬,宦晓玲,黄勇,李栋,李良灿,李林杰,李寅杰3,刘飞扬,刘力力,刘勇琪,刘子涵,梅飞要,宋佳琪,王泓皓,王禹程,王振邦,熊攀,徐安越,杨卉,杨明海,俞涵,虞良斌,云骑士,张栩浩,周一航 diff --git a/docs/mindspore/source_en/conf.py b/docs/mindspore/source_en/conf.py index 5166836938..501dfc0430 100644 --- a/docs/mindspore/source_en/conf.py +++ b/docs/mindspore/source_en/conf.py @@ -490,6 +490,7 @@ def linkcode_resolve(domain, info): name1 = 'mindspore.ops.' + '_'.join(re.split('(?=[A-Z])', name1)[1:]).lower() if name1.endswith('_d'): name1 = name1[:-2] + 'd' + # 大写接口小写化去查找对应yaml if name1.split('.')[-1] + '_doc.yaml' not in ops_yaml_list: if name.split('.')[-1].lower() + '_doc.yaml' in ops_yaml_list: name1 = name.lower() @@ -601,32 +602,32 @@ def copy_image(sourcedir, des_dir): copy_image(src_dir, des_dir) -src_release = os.path.join(repo_path, 'RELEASE.md') -des_release = "./RELEASE.md" -release_source = f'[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE.md)\n' - -with open(src_release, "r", encoding="utf-8") as f: - data = f.read() - -hide_release = [] -if len(re.findall("\n## (.*?)\n",data)) > 1: - for i in hide_release: - del_doc = re.findall(f"(\n## MindSpore {i}[\s\S\n]*?)\n## ", data) - if del_doc: - data = data.replace(del_doc[0], '') - content = regex.findall("(\n## MindSpore [^L][\s\S\n]*?)\n## ", data, overlapped=True) - repo_version = re.findall("\n## MindSpore ([0-9]+?\.[0-9]+?)\.([0-9]+?)[ -]", content[0])[0] - content_new = '' - for i in content: - if re.findall(f"\n## MindSpore ({repo_version[0]}\.[0-9]+?)[ -]", i): - content_new += i - content = content_new -else: - content = re.findall("(\n## [\s\S\n]*)", data) - content = content[0] - -with open(des_release, "w", encoding="utf-8") as p: - content = re.sub(re_url, r'\1/r2.7.0rc1', content) - content = re.sub(re_url2, r'\1/v2.7.0-rc1', content) - p.write("# Release Notes" + "\n\n" + release_source) - p.write(content) +# src_release = os.path.join(repo_path, 'RELEASE.md') +# des_release = "./RELEASE.md" +# release_source = f'[![View Source On Gitee](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source_en.svg)](https://gitee.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE.md)\n' + +# with open(src_release, "r", encoding="utf-8") as f: +# data = f.read() + +# hide_release = [] +# if len(re.findall("\n## (.*?)\n",data)) > 1: +# for i in hide_release: +# del_doc = re.findall(f"(\n## MindSpore {i}[\s\S\n]*?)\n## ", data) +# if del_doc: +# data = data.replace(del_doc[0], '') +# content = regex.findall("(\n## MindSpore [^L][\s\S\n]*?)\n## ", data, overlapped=True) +# repo_version = re.findall("\n## MindSpore ([0-9]+?\.[0-9]+?)\.([0-9]+?)[ -]", content[0])[0] +# content_new = '' +# for i in content: +# if re.findall(f"\n## MindSpore ({repo_version[0]}\.[0-9]+?)[ -]", i): +# content_new += i +# content = content_new +# else: +# content = re.findall("(\n## [\s\S\n]*)", data) +# content = content[0] + +# with open(des_release, "w", encoding="utf-8") as p: +# content = re.sub(re_url, r'\1/r2.7.0rc1', content) +# content = re.sub(re_url2, r'\1/v2.7.0-rc1', content) +# p.write("# Release Notes" + "\n\n" + release_source) +# p.write(content) diff --git a/docs/mindspore/source_zh_cn/RELEASE.md b/docs/mindspore/source_zh_cn/RELEASE.md new file mode 100644 index 0000000000..7f73be5951 --- /dev/null +++ b/docs/mindspore/source_zh_cn/RELEASE.md @@ -0,0 +1,125 @@ +# Release Notes + +[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.7.0rc1/resource/_static/logo_source.svg)](https://gitee.com/mindspore/mindspore/blob/v2.7.0-rc1/RELEASE_CN.md) + +## MindSpore 2.7.0-rc1 Release Notes + +### 主要特性及增强 + +#### Ascend + +- [STABLE] 新增 O1 场景下的 GroupedMatmul 优化,支持该算子后融合 element-wise 算子,大幅减少数据搬运开销,提升计算效率。用户可以通过设置环境变量 `MS_DEV_GRAPH_KERNEL_FLAGS`为 `"--enable_cluster_ops=GroupedMatmul"`开启。 +- [STABLE] 提升内存 tracker 易用性:用户可以通过 [mindspore.runtime.memory_replay(file_path)](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/runtime/mindspore.runtime.memory_replay.html) 导入 tracker 数据,用于模型显存分析;通过设置 `export MS_ALLOC_CONF=memory_tracker_path:file_path` 设置 tracker 数据保存路径;通过设置 `export MS_ALLOC_CONF=simple_tracker:true` 仅保存每个内存块最后一个使用者,减少保存数据大小。 +- [STABLE] 优化了图模式下ops.Custom原语针对aclnn类型的自定义算子功能,全面支持非Tensor类型输入,并自动加载RegInfo信息,显著提升了aclnn自定义算子的易用性和灵活性。 + +#### PyNative + +- [STABLE] [mindspore.nn.Cell.register_forward_hook](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.register_forward_hook) 和 [mindspore.nn.Cell.register_forward_pre_hook](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html#mindspore.nn.Cell.register_forward_pre_hook) 新增 `with_kwargs` 参数(默认值:False),用于支持将 `construct` 调用时的关键字参数传递给 `hook_fn`。 +- [STABLE] [mindspore.Tensor.register_hook](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore/Tensor/mindspore.Tensor.register_hook.html#mindspore.Tensor.register_hook) 现已支持对多输出算子的输出 Tensor 注册 hook。 +- [STABLE] Cell自定义反向功能增强,支持返回值的类型和对应输入的数据类型和shape形状的校验和自动转换。 +- [STABLE] Tensor增加[Storage](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore/Tensor/mindspore.Tensor.storage.html?highlight=storage#mindspore.Tensor.storage)接口:支持通过Storage及其相关接口对内存进行操作,从而实现内存优化。 +- [STABLE] 新增 C++ 的 [ms::pynative::PyboostRunner](https://www.mindspore.cn/tutorials/zh-CN/r2.7.0rc1/custom_program/operation/cpp_api_for_custom_ops.html#class-pyboostrunner) 接口,方便自定义算子支持 PyNative 多级流水运行时。 + +#### 并行 + +- [STABLE] 针对通信域可配HCCL缓存:[communication.create_group](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/communication/mindspore.communication.create_group.html#mindspore.communication.create_group) 支持传入通信域额外配置 `options`,通过 `hccl_config`键值对设置通信域HCCL通信域缓存大小,避免多通信域下OOM。 +- [STABLE] 支持CPU通信接口 [mint.distributed.all_reduce](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.all_reduce.html)/[mint.distributed.barrier](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.barrier.html)/[mint.distributed.send](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.send.html)/[mint.distributed.recv](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.recv.html),用户可通过这些接口使用对应的集合通信算子功能。 +- [STABLE] 静态图模式场景,支持 [AllGatherV](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/ops/mindspore.ops.AllGatherV.html) 和[ReduceScatterV](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/ops/mindspore.ops.ReduceScatterV.html)正反向算子。 +- [BETA] 支持通过[mint.distributed.TCPStore](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.distributed.TCPStore.html)类的成员方法实现数据缓存功能。 + +#### 训练 + +- [STABLE] 重计算通信掩盖:支持对于完全重计算的两个Cell的计算通信进行互相掩盖,提升重计算场景模型的性能。 +- [STABLE] 精度故障不重启快速恢复:支持当发生精度故障时,在不重启进程的情况下加载CheckPoint继续训练。 +- [STABLE] 静默检测:支持对正反向计算中 `MatMul`结果进行校验。用户可以通过设置环境变量 `MS_SDC_DETECT_ENABLE` 为 `1` 使能,并通过 `mindspore.utils.sdc_detect` 模块的接口动态开启/关闭检测并获取结果。 + +#### 推理 + +- [STABLE] vLLM MindSpore 插件现已适配 vLLM v0.8.3 版本,并支持 vLLM V1 新架构的基础特性,包含 Chunked Prefill、Automatic Prefix Caching 等推理能力,在服务化部署方面,新增支持运行 DeepSeek-V3/R1 DP/TP/EP 混合并行推理能力,有效提升模型全量及增量推理效率,同时降低显存开销; + +#### 工具 + +自2.3版本起MindInsight工具停止更新发布,相关文档已下架。原有系统调优数据可视化已整合至MindStudio Insight,标量可视化、参数分布图可视化和计算图可视化已整合至MindStudio Insight插件,请参阅[《MindStudio Insight用户指南》](https://www.hiascend.com/document/detail/zh/mindstudio/80RC1/GUI_baseddevelopmenttool/msascendinsightug/Insight_userguide_0002.html)。 + +- [STABLE] MindSpore Profiler支持接入msMonitor功能,支持用户通过在线监控工具采集性能数据。 +- [STABLE] MindSpore Profiler增加record_shapes参数,支持用户采集框架侧下发算子的shape信息。 +- [STABLE] MindSpore Profiler增加sys类资源类开关,支持sys资源类信息采集能力。 +- [STABLE] MindSpore Profiler增加host_sys开关,支持系统调用类、存储类、cpu信息等host信息采集能力。 +- [STABLE] MindSpore Profiler mstx模块提供domain功能,支持用户精细化控制mstx打点数据。 + +### API 变更 + +- [STABLE] [mindspore.mint](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore.mint.html) API中部分DEMO状态的functional、nn和Tensor接口转为STABLE。mint接口当前大多仍为实验性接口,在图编译模式为O0/O1和PyNative模式下性能比ops更优。当前暂不支持O2编译模式(图下沉)及CPU、GPU后端,后续会逐步完善。 + + | mindspore.mint | + | :-------------------------- | + | mindspore.mint.randomperm | + | mindspore.mint.randn | + | mindspore.mint.randint | + | mindspore.mint.triu | + | mindspore.mint.empty_like | + | mindspore.mint.empty | + | mindspore.mint.floor_divide | + + | mindspore.mint.nn | + | :----------------------------- | + | mindspore.mint.nn.BatchNorm1d | + | mindspore.mint.nn.BatchNorm2d | + | mindspore.mint.nn.BatchNorm3d | + | mindspore.mint.nn.PixelShuffle | + | mindspore.mint.nn.Threshold | + + | mindspore.mint.nn.functional | + | :----------------------------------------- | + | mindspore.mint.nn.functional.threshold | + | mindspore.mint.nn.functional.threshold_ | + | mindspore.mint.nn.functional.pixel_shuffle | + + | mindspore.Tensor | + | ----------------------------- | + | mindspore.Tensor.new_full | + | mindspore.Tensor.new_empty | + | mindspore.Tensor.floor_divide | + | mindspore.Tensor.exponential_ | + +- [STABLE] [mindspore.ops](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore.ops.html) API新增[mindspore.ops.swiglu](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/ops/mindspore.ops.swiglu.html)接口,当前仅支持Ascend后端。 +- [STABLE] [mindspore.ops](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore.ops.html) API的[mindspore.ops.svd](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/ops/mindspore.ops.svd.html#mindspore.ops.svd)接口现在额外支持了Ascend后端。 +- [STABLE] [mindspore.mint.nn.functional.silu](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.nn.functional.silu.html#mindspore.mint.nn.functional.silu)和 [mindspore.mint.nn.SiLU](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mint/mindspore.mint.nn.SiLU.html) 新增支持了入参 `inplace`。 +- [STABLE] [communication.create_group](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/communication/mindspore.communication.create_group.html#mindspore.communication.create_group) 新增支持通信域额外配置 `options`。HCCL后端支持设置 `options`中的 `hccl_config`,针对通信域设置HCCL通信域缓存大小。 +- [STABLE] [mindspore.runtime](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/mindspore.runtime.html)增加[mindspore.runtime.empty_cache](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/runtime/mindspore.runtime.empty_cache.html#mindspore.runtime.empty_cache)的实现。 +- [STABLE] [mindspore.runtime.set_memory](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_memory.html#mindspore.runtime.set_memory)接口新增入参 `huge_page_reserve_size`。 +- [STABLE] [mindspore.runtime.set_cpu_affinity](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_cpu_affinity.html#mindspore.runtime.set_cpu_affinity)接口新增入参 `module_to_cpu_dict`。 +- [STABLE] [minspore.nn.Cell](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html)模块新增查看/保存模型状态的功能。新增接口: + + | mindspore.nn.Cell | + | --------------------------------------- | + | cell.register_state_dict_post_hook | + | cell.register_state_dict_pre_hook | + | cell.state_dict | + | cell.register_load_state_dict_pre_hook | + | cell.register_load_state_dict_post_hook | + | cell.load_state_dict | + +- [STABLE] [minspore.nn.Cell](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/nn/mindspore.nn.Cell.html)模块查看/注册模型缓冲区的功能。新增接口: + + | mindspore.nn.Cell | + | -------------------- | + | cell.register_buffer | + | cell.get_buffer | + | cell.get_sub_cell | + | cell.named_buffer | + | cell.buffers | + +#### 非兼容性接口变更 + +- [runtime.set_cpu_affinity](https://www.mindspore.cn/docs/zh-CN/r2.7.0rc1/api_python/runtime/mindspore.runtime.set_cpu_affinity.html) + + 参数 `affinity_cpu_list`类型由字典变更为列表,仅针对单一进程自定义配置亲和CPU范围段。新增参数 `module_to_cpu_dict`,支持针对热点模块线程自定义配置CPU亲和策略。 + + | 2.6 | 2.7 | + | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | + | >>> from mindspore.runtime import set_cpu_affinity
>>> set_cpu_affinity(True, {"device0": ["10-19", "23-40"]}) | >>> from mindspore.runtime import set_cpu_affinity
>>> set_cpu_affinity(True, ["10-19", "23-40"],
...                                {"main": [0,1,2,3],
...                                 "runtime": [4,5,6],
...                                 "pynative": [7,8,9]}) | + +### 贡献者 + +baochong,Bellatan,BJ-WANG,caifubi,caiji_zhang,Carey,chaijinwei,changzherui,chengbin,chujinjin,DavidFFFan,DeshiChen,dingjinshan,Dring,ehaleva,Erpim,fary86,fengtingyan,fengyixing,fuchao,gaoyong10,gengdongjie,guangpengz,GuoZhibin,gupengcheng0401,haozhang,hedongdong,hhz886,huandong1,huangbingjian,huangziling,huda,HuilanLi,hujiahui8,jiangchao_j,jianghui58,jiangshanfeng,jiaorui,jiaxueyu,jizewei,jjfeing,jshawjc,kairui_kou,kingxian,kisnwang,lanzhineng,leida,LiangZhibo,lichen,limingqi107,LiNuohang,linux,liubuyu,liuchengji,liuluobin,liuyanwei,lkp,looop5,lujiale,luochao60,luoyang,maoyuanpeng1,Margaret_wangrui,mengxian,MengXiangyu,mengyuanli,NaCN,One_East,panshaowu,panzhihui,pengqi,Qiao_Fu,qiuleilei,qiuyufeng,rainyhorse,SaiYao,shaoshengqi,shen_haochen,shenhaojing,shenwei41,shuqian0,tanghuikang,tangmengcheng,tan-wei-cheng,tianxiaodong,uuhuu,wang_ziqi,WangChengzhao,wangshaocong,wangyibo,wujueying,XianglongZeng,xiaopeng,xiaotianci,xiaoyao,XinDu,xuzhen,yangguodong,yanghaoran,yangyingchun,Yanzhi_YI,yide12,yihangchen,YijieChen,yuanqi,yuchaojie,yuezenglin,YuJianfeng,YukioZzz,yuliangbin,yyuse,zhangbuxue,zhangdanyang,zhanghanLeo,zhangyinxia,ZhangZGC,zhanzhan,zhaochenjie,zhengzuohe,zhouyaqiang0,zhunaipan,zichun_ye,ZPaC,zyli2020,程超,范吉斌,胡犇,胡彬,宦晓玲,黄勇,李栋,李良灿,李林杰,李寅杰3,刘飞扬,刘力力,刘勇琪,刘子涵,梅飞要,宋佳琪,王泓皓,王禹程,王振邦,熊攀,徐安越,杨卉,杨明海,俞涵,虞良斌,云骑士,张栩浩,周一航 diff --git a/docs/mindspore/source_zh_cn/conf.py b/docs/mindspore/source_zh_cn/conf.py index 081953ea89..db973e91fa 100644 --- a/docs/mindspore/source_zh_cn/conf.py +++ b/docs/mindspore/source_zh_cn/conf.py @@ -554,6 +554,7 @@ def linkcode_resolve(domain, info): ('mint.select_ext_view', 'mint.select', 'select_ext_view', 'select'), ('mint.transpose_ext_view', 'mint.transpose', 'transpose_ext_view', 'transpose'), ('mint.nn.functional.im2col_ext', 'mint.nn.functional.unfold', 'im2col_ext', 'unfold'), + ('mint.nn.functional.col2im_ext', 'mint.nn.functional.fold', 'col2im_ext', 'fold'), ('mint.nn.functional.inplace_threshold', 'mint.nn.functional.threshold_', 'inplace_threshold', 'threshold_'), ] fullname = modname + '.' + name @@ -568,6 +569,7 @@ def linkcode_resolve(domain, info): name1 = 'mindspore.ops.' + '_'.join(re.split('(?=[A-Z])', name1)[1:]).lower() if name1.endswith('_d'): name1 = name1[:-2] + 'd' + # 大写接口小写化去查找对应yaml if name1.split('.')[-1] + '_doc.yaml' not in ops_yaml_list: if name.split('.')[-1].lower() + '_doc.yaml' in ops_yaml_list: name1 = name.lower() @@ -593,13 +595,21 @@ def linkcode_resolve(domain, info): if name1.split('.')[-1] in func_name_dict and not py_source_rel: py_source_rel = ops_yaml + func_name_dict[name1.split('.')[-1]] + '_doc.yaml' + + # 通过yaml目录反向查找接口名是否符合,有些yaml没有按照大写字母后跟_的规则 + if not py_source_rel and name.lower() != name: + for ops_yaml_n in ops_yaml_list: + new_ops_yaml_n = ops_yaml_n[:-9].replace('_', '') + if name1.split('.')[-1].lower().replace('_', '') == new_ops_yaml_n: + py_source_rel = ops_yaml + ops_yaml_n + break + elif 'ops/functional_overload' in pkg_fn: py_source_rel = func_yaml + name.split('.')[-1] + '_doc.yaml' if py_source_rel: return f"https://gitee.com/mindspore/mindspore/blob/{branch}/{py_source_rel}" - elif 'mindspore/ops/auto_generate/' in py_source_rel: - return None + source, linenum = inspect.getsourcelines(obj) except Exception: name = info["fullname"] @@ -624,32 +634,32 @@ def setup(app): app.add_directive('includecode', IncludeCodeDirective) app.add_js_file('js/mermaid-9.3.0.js') -src_release = os.path.join(repo_path, 'RELEASE_CN.md') -des_release = "./RELEASE.md" -release_source = f'[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source.svg)](https://gitee.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE_CN.md)\n' - -with open(src_release, "r", encoding="utf-8") as f: - data = f.read() - -hide_release = [] -if len(re.findall("\n## (.*?)\n",data)) > 1: - for i in hide_release: - del_doc = re.findall(f"(\n## MindSpore {i}[\s\S\n]*?)\n## ", data) - if del_doc: - data = data.replace(del_doc[0], '') - content = regex.findall("(\n## MindSpore [^L][\s\S\n]*?)\n## ", data, overlapped=True) - repo_version = re.findall("\n## MindSpore ([0-9]+?\.[0-9]+?)\.([0-9]+?)[ -]", content[0])[0] - content_new = '' - for i in content: - if re.findall(f"\n## MindSpore ({repo_version[0]}\.[0-9]+?)[ -]", i): - content_new += i - content = content_new -else: - content = re.findall("(\n## [\s\S\n]*)", data) - content = content[0] - -with open(des_release, "w", encoding="utf-8") as p: - content = re.sub(re_url, r'\1/r2.7.0rc1', content) - content = re.sub(re_url2, r'\1/v2.7.0-rc1', content) - p.write("# Release Notes" + "\n\n" + release_source) - p.write(content) +# src_release = os.path.join(repo_path, 'RELEASE_CN.md') +# des_release = "./RELEASE.md" +# release_source = f'[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/{docs_branch}/resource/_static/logo_source.svg)](https://gitee.com/mindspore/{copy_repo}/blob/{branch}/' + 'RELEASE_CN.md)\n' + +# with open(src_release, "r", encoding="utf-8") as f: +# data = f.read() + +# hide_release = [] +# if len(re.findall("\n## (.*?)\n",data)) > 1: +# for i in hide_release: +# del_doc = re.findall(f"(\n## MindSpore {i}[\s\S\n]*?)\n## ", data) +# if del_doc: +# data = data.replace(del_doc[0], '') +# content = regex.findall("(\n## MindSpore [^L][\s\S\n]*?)\n## ", data, overlapped=True) +# repo_version = re.findall("\n## MindSpore ([0-9]+?\.[0-9]+?)\.([0-9]+?)[ -]", content[0])[0] +# content_new = '' +# for i in content: +# if re.findall(f"\n## MindSpore ({repo_version[0]}\.[0-9]+?)[ -]", i): +# content_new += i +# content = content_new +# else: +# content = re.findall("(\n## [\s\S\n]*)", data) +# content = content[0] + +# with open(des_release, "w", encoding="utf-8") as p: +# content = re.sub(re_url, r'\1/r2.7.0rc1', content) +# content = re.sub(re_url2, r'\1/v2.7.0-rc1', content) +# p.write("# Release Notes" + "\n\n" + release_source) +# p.write(content) -- Gitee