华为计算微信公众号
昇腾AI开发者公众号
华为计算微博
华为计算今日头条
import mindspore.ops as ops import mindspore.nn as nn from mindspore.communication import init from mindspore import Tensor import numpy as np init() class Net(nn.Cell): def __init__(self): super(Net, self).__init__() self.depend = ops.Depend() self.send = ops.Send(st_tag=0, dest_rank=8, group="hccl_world_group") def construct(self, x): out = self.depend(x, self.send(x)) return out input_ = Tensor(np.ones([2, 8]).astype(np.float32)) net = Net() output = net(input_)
这是mindspore的通信算子里的例子,我想知道这样的程序我在一个8卡910的服务器上如何运行,因为send的功能是我的项目需要的,我在网上看到很多包括msrun启动,ranktable一类的,不知道具体使用哪个
本帖最后由 匿名用户 于 2024/10/12 11:31:51 编辑
我要发帖子
import mindspore.ops as ops import mindspore.nn as nn from mindspore.communication import init from mindspore import Tensor import numpy as np init() class Net(nn.Cell): def __init__(self): super(Net, self).__init__() self.depend = ops.Depend() self.send = ops.Send(st_tag=0, dest_rank=8, group="hccl_world_group") def construct(self, x): out = self.depend(x, self.send(x)) return out input_ = Tensor(np.ones([2, 8]).astype(np.float32)) net = Net() output = net(input_)这是mindspore的通信算子里的例子,我想知道这样的程序我在一个8卡910的服务器上如何运行,因为send的功能是我的项目需要的,我在网上看到很多包括msrun启动,ranktable一类的,不知道具体使用哪个