Skip to content

Commit 03730d0

Browse files
committed
[Hotfix] Fix cpu core list when threads_per_core==1
1 parent 0b25555 commit 03730d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/run_rochpl.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ devicelist=$(${rocm_dir}/bin/rocm-smi --csv --showtoponuma | tail -n +2 | tr ','
280280
threads_per_core=$(echo "${cpulist}" | grep -c ".* 0 .*")
281281

282282
#remove the extra cpus on each core to make a list of just physical cores, then sort by numa domain
283-
corelist=$(echo "$cpulist" | awk -v tpc=${threads_per_core} 'NR%tpc' | sort -k 3 -g -s)
283+
corelist=$(echo "$cpulist" | awk -v tpc=${threads_per_core} '(NR-1)%tpc==0' | sort -k 3 -g -s)
284284

285285
#count numa domains
286286
line=($(echo "$cpulist" | tail -n 1))

0 commit comments

Comments
 (0)