Files
vLLM/vllm/utils/numa_wrapper.sh
T
75e01a39a1 [Feature] NUMA binding support for GPU workers (#38635)
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Co-authored-by: Jason Li <jasonlizhengjian@gmail.com>
Co-authored-by: Roger Wang <hey@rogerw.io>
2026-04-08 09:55:24 -07:00

26 lines
653 B
Bash
Executable File

#!/bin/sh
if [ -z "${_VLLM_INTERNAL_NUMACTL_ARGS:-}" ]; then
echo "_VLLM_INTERNAL_NUMACTL_ARGS is not set" >&2
exit 1
fi
if [ -z "${_VLLM_INTERNAL_NUMACTL_PYTHON_EXECUTABLE:-}" ]; then
echo "_VLLM_INTERNAL_NUMACTL_PYTHON_EXECUTABLE is not set" >&2
exit 1
fi
if ! command -v numactl >/dev/null 2>&1; then
echo "numactl is not available on PATH" >&2
exit 1
fi
case "${_VLLM_INTERNAL_NUMACTL_ARGS}" in
*[![:alnum:]\ \-\_=,./]*)
echo "Invalid characters in _VLLM_INTERNAL_NUMACTL_ARGS" >&2
exit 1
;;
esac
exec numactl ${_VLLM_INTERNAL_NUMACTL_ARGS} "${_VLLM_INTERNAL_NUMACTL_PYTHON_EXECUTABLE}" "$@"