intel / ai-reference-models

Intel® AI Reference Models: contains Intel optimizations for running deep learning workloads on Intel® Xeon® Scalable processors and Intel® Data Center GPUs
Apache License 2.0
674 stars 220 forks source link

fix: fix core binding strategies for different cpu topologies #143

Open zeroorhero opened 1 year ago

zeroorhero commented 1 year ago

In different cpu topologies, run 'numactl -H | grep node [0-9] cpus | sed node [0-9] cpus: | head -{0} | cut-f1 -{1} -d.mat (self.num_numa_nodes, int(cores_per_node)) 'to get the id of a physical core is incorrect. For example, in ecs, logical core 0 and logical core 1 belong to the same physical core, and only some physical cores are bound by the above command. Therefore, you need to use the /proc/cpuinfo file to adopt different core binding policies for different cpu topology results.