Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorrt_llm/llmapi/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __init__(self,
self.mpi_session = self.args.mpi_session

if self.args.parallel_config.is_multi_gpu:
if os.getenv("RAY_LOCAL_RANK") is None and get_device_count(
if os.getenv("RAY_LOCAL_WORLD_SIZE") is None and get_device_count(
) < self.args.parallel_config.world_size_per_node:
raise RuntimeError(
f"Only {get_device_count()} GPUs are available, but {self.args.parallel_config.world_size} are required."
Expand Down
2 changes: 1 addition & 1 deletion tensorrt_llm/llmapi/llm_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ def validate_dtype(cls, v, info):
@field_validator("gpus_per_node", mode='before')
@classmethod
def validate_gpus_per_node(cls, v, info):
if os.getenv("RAY_LOCAL_RANK") is not None:
if os.getenv("RAY_LOCAL_WORLD_SIZE") is not None:
return info.data.get("tensor_parallel_size")
if v is None:
logger.warning(
Expand Down
Loading