针对PyTorch 2.1版本,补齐PyTorch原生部分集合通信算子无法入图功能。
def patch_for_hcom()
无
1 2 3 4 5
# 1.导入patch_for_hcom包 import torch_npu import torchair # 2.在图执行之前调用patch方法 torchair.patch_for_hcom()