[CI][AMD] Configure MI300 tests for native execution without DinD (#48387)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
@@ -694,10 +694,22 @@ def _get_checkpoints_size_bytes(files: list[str]) -> int:
|
||||
|
||||
|
||||
def _get_available_ram_bytes() -> int:
|
||||
"""Return the available RAM in bytes."""
|
||||
"""Return available RAM, honoring cgroup limits on ROCm."""
|
||||
import psutil
|
||||
|
||||
return psutil.virtual_memory().available
|
||||
host_available = psutil.virtual_memory().available
|
||||
if not current_platform.is_rocm():
|
||||
return host_available
|
||||
|
||||
from vllm.utils.cpu_resource_utils import get_cgroup_memory_limit
|
||||
|
||||
cgroup_limit, cgroup_usage = get_cgroup_memory_limit()
|
||||
if cgroup_limit is None:
|
||||
return host_available
|
||||
cgroup_available = (
|
||||
cgroup_limit if cgroup_usage is None else max(0, cgroup_limit - cgroup_usage)
|
||||
)
|
||||
return min(host_available, cgroup_available)
|
||||
|
||||
|
||||
def _get_fs_type(files: list[str]) -> str:
|
||||
|
||||
Reference in New Issue
Block a user