产品 |
是否支持 |
---|---|
√ |
|
x |
|
x |
|
x |
|
x |
设置当前进程device ID,对应底层ge.exec.deviceId配置项。
1 | device_id(device_id) |
参数名称 |
数据类型 |
取值说明 |
---|---|---|
device_id |
Union[int, List[int], Tuple[int]] |
设置当前进程的device ID。支持配置为一个或者列表,配置为列表时以,间隔。
|
1 2 3 4 5 6 | from llm_datadist import LLMConfig llm_config = LLMConfig() # 单进程单卡设置方法 llm_config.device_id = 0 # 单进程多卡设置方法 # llm_config.device_id = [0, 1] |
正常情况下无返回值。
参数错误可能抛出TypeError或ValueError。
无