@@ -75,25 +75,13 @@ runs:
7575 python3 ./devops/scripts/benchmarks/presets.py query "$PRESET"
7676 [ "$?" -ne 0 ] && exit 1 # Stop workflow if invalid preset
7777 echo "PRESET=$PRESET" >> $GITHUB_ENV
78- - name : Compute CPU core range to run benchmarks on
78+ - name : Set NUMA node to run benchmarks on
7979 shell : bash
8080 run : |
81- # Compute the core range for the first NUMA node; second node is used by
82- # UMF. Skip the first 3 cores as the kernel is likely to schedule more
83- # work on these.
84- CORES="$(lscpu | awk '
85- /NUMA node0 CPU|On-line CPU/ {line=$0}
86- END {
87- split(line, a, " ")
88- split(a[4], b, ",")
89- sub(/^0/, "3", b[1])
90- print b[1]
91- }')"
92- echo "CPU core range to use: $CORES"
93- echo "CORES=$CORES" >> $GITHUB_ENV
94-
95- ZE_AFFINITY_MASK=0
96- echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV
81+ # Set CPU and GPU affinity for the first NUMA node; second node is used by UMF
82+ NUMA_NODE=0
83+ echo "ZE_AFFINITY_MASK=$NUMA_NODE" >> $GITHUB_ENV
84+ echo "NUMA_NODE=$NUMA_NODE" >> $GITHUB_ENV
9785
9886 # Compute-benchmarks relies on UR static libraries, cmake config files, etc.
9987 # DPC++ doesn't ship with these files. The easiest way of obtaining these
@@ -192,7 +180,8 @@ runs:
192180 sycl-ls
193181 echo "-----"
194182
195- taskset -c "$CORES" ./devops/scripts/benchmarks/main.py \
183+ numactl --cpunodebind "$NUMA_NODE" --membind "$NUMA_NODE" \
184+ ./devops/scripts/benchmarks/main.py \
196185 " $(realpath ./llvm_test_workdir)" \
197186 --sycl "$(realpath ./toolchain)" \
198187 --ur "$(realpath ./ur/install)" \
0 commit comments