Optimum 文档

DistributedRunner

您正在查看 main 版本,该版本需要从源码安装。如果您想要常规 pip 安装,请查看最新的稳定版本 (v1.24.0)。
Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

DistributedRunner

class optimum.habana.distributed.DistributedRunner

< >

( command_list: typing.List = [] world_size: int = 1 hostfile: typing.Union[str, pathlib.Path] = None use_mpi: bool = False use_deepspeed: bool = False master_port: int = 29500 use_env: bool = False map_by: bool = 'socket' multi_hls = None )

设置训练/推理硬件配置并运行分布式命令。

create_multi_node_setup

< >

( )

DeepSpeed 的多节点配置设置。

create_single_card_setup

< >

( use_deepspeed = False )

单卡设置。

create_single_node_setup

< >

( )

单节点多卡配置设置。

create_single_node_setup_deepspeed

< >

( )

DeepSpeed 的单节点多卡配置设置。

create_single_node_setup_mpirun

< >

( )

mpirun 的单节点多卡配置设置。

process_hostfile

< >

( ) str

返回值

str

主节点的地址。

返回用于 DeepSpeed 多节点运行的主节点地址。直接灵感来自 https://github.com/microsoft/DeepSpeed/blob/316c4a43e0802a979951ee17f735daf77ea9780f/deepspeed/autotuning/utils.py#L145

run

< >

( )

使用用户指定的配置运行所需的命令。

< > Update on GitHub