Tiny support setting numa nodes for different ranks (#10006)
This commit is contained in:
@@ -3027,3 +3027,12 @@ def check_cuda_result(raw_output):
|
||||
raise Exception(f"CUDA error: {err}")
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def numa_bind_to_node(node: int):
|
||||
libnuma = ctypes.CDLL("libnuma.so")
|
||||
if libnuma.numa_available() < 0:
|
||||
raise SystemError("numa not available on this system")
|
||||
|
||||
libnuma.numa_run_on_node(ctypes.c_int(node))
|
||||
libnuma.numa_set_localalloc()
|
||||
|
||||
Reference in New Issue
Block a user