[4/N]DP refactor: support watching mode get_load and shortest queue strategy (#10201)

This commit is contained in:
Liangsheng Yin
2025-09-15 10:06:08 +08:00
committed by GitHub
parent ca63f075b7
commit 305c9e8c2d
12 changed files with 202 additions and 44 deletions

View File

@@ -1160,7 +1160,7 @@ def pytorch_profile(name, func, *args, data_size=-1):
def get_zmq_socket(
context: zmq.Context, socket_type: zmq.SocketType, endpoint: str, bind: bool
):
) -> zmq.Socket:
mem = psutil.virtual_memory()
total_mem = mem.total / 1024**3
available_mem = mem.available / 1024**3