334 Star 1.5K Fork 864

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
set_context.md 951 Bytes
一键复制 编辑 原始数据 按行查看 历史
俞涵 提交于 2023-01-29 16:21 . add mindquantum and modify url

Function Differences with torch.cuda.set_device

torch.cuda.set_device

torch.cuda.set_device(device)

For more information, see torch.cuda.set_device.

mindspore.set_context

mindspore.set_context(**kwargs)

For more information, see mindspore.set_context.

Differences

PyTorch: It is used to set the current device.

MindSpore:It is not only used to set the current device, but also set the mode, device_target, save_graphs, etc.

1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r2.0.0-alpha

搜索帮助