intel / xFasterTransformer

Apache License 2.0
270 stars 53 forks source link

[bug] HBM flat QUAD mode determination method is incorrect #446

Open xuyizhan opened 3 weeks ago

xuyizhan commented 3 weeks ago

Hi there,

In https://github.com/intel/xFasterTransformer/blob/main/benchmark/run_benchmark.sh#L224, use NUMA nodes to confirm HBM flat mode or EMR SNC-2 mode. Actually, there are some blank space after "NUMA node3 CPU(s):" and then it takes for EMR SNC-2 mode. Here is an example for HBM CPU flat QUAD mode.

lscpu | grep "NUMA node3 CPU(s):"
NUMA node3 CPU(s):
[root@node1 bin]# lscpu | grep "NUMA:"
[root@node1 bin]# lscpu | grep "NUMA"
NUMA node(s):                       4
NUMA node0 CPU(s):                  0-39,80-119
NUMA node1 CPU(s):                  40-79,120-159
NUMA node2 CPU(s):
NUMA node3 CPU(s):

So need to use gsub to remove all the blank space first, thanks.

numa_nodes_info=$(lscpu | grep "NUMA node3 CPU(s):" | awk -F ':' '{gsub(" ", "", $2);print $2}')