(beta)torch.distributed.is_hccl_available

产品支持情况

产品 是否支持
Atlas A3 训练系列产品
Atlas A2 训练系列产品
Atlas 推理系列产品
Atlas 训练系列产品

功能说明

判断HCCL通信后端是否可用,与torch.distributed.is_nccl_available类似,具体请参考https://pytorch.org/docs/stable/distributed.html#torch.distributed.is_nccl_available

函数原型

torch.distributed.is_hccl_available()

返回值说明

Bool:True为可用,False为不可用。

调用示例

import torch
import torch_npu

torch.distributed.is_hccl_available()

True