device_id
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas 350 Accelerator Card |
No |
Yes |
|
Yes |
|
No |
|
No |
|
No |
Note: For the
Function Description
Sets the device ID of the current process, corresponding to the underlying ge.exec.deviceId configuration item.
Prototype
1 | device_id(device_id) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
device_id |
Union[int, List[int], Tuple[int]] |
Device ID(s) of the current process. You can configure one or more device IDs. If you configure multiple device IDs, separate them with commas (,).
|
Example
1 2 3 4 5 6 | from llm_datadist import LLMConfig llm_config = LLMConfig() # Single-process single-device configuration method llm_config.device_id = 0 # Single-process multi-device configuration method # llm_config.device_id = [0, 1] |
Returns
In normal cases, no value is returned.
If a parameter is incorrect, a TypeError or ValueError may be thrown.
Constraints
None