!69037 fix doc example

Merge pull request !69037 from chenweifeng/master
This commit is contained in:
i-robot 2024-05-06 00:52:30 +00:00 committed by Gitee
commit eff405639d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 1 deletions

View File

@ -11,3 +11,13 @@ mindspore.sync_pipeline_shared_parameters
参数:
- **net** (nn.Cell) - 推理网络。
支持平台:
``Ascend``
样例:
.. note::
运行以下样例之前,需要配置好通信环境变量。
针对Ascend设备用户需要编写动态组网启动脚本详见 `动态组网启动 <https://www.mindspore.cn/tutorials/experts/zh-CN/master/parallel/dynamic_cluster.html>`_

View File

@ -538,7 +538,6 @@ def sync_pipeline_shared_parameters(net):
... ret = ret + (y,)
... ret = self.concat(ret)
... return ret
>>> D.init()
>>> context.set_auto_parallel_context(parallel_mode='semi_auto_parallel', full_batch=True, pipeline_stages=2)
>>> net = Network()