mindspore.communication.release =============================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/communication/mindspore.communication.release.rst :alt: 查看源文件 .. py:function:: mindspore.communication.release() 释放分布式资源,例如 `HCCL` 或 `NCCL` 或 `MCCL` 服务。 .. note:: - `release` 方法应该在 `init` 方法之后使用。如果不使用,则在程序结束时资源才会自动释放。 异常: - **RuntimeError** - 在释放分布式资源失败时抛出。 样例: .. note:: .. include:: ../ops/mindspore.ops.comm_note.txt