Skip to content

Commit b4300cc

Browse files
committed
Add PCI domain and device ID for GPU device BDF display
1 parent 903918f commit b4300cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/common.cu‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ testResult_t run() {
984984
int rank = proc*nThreads*nGpus+i;
985985
cudaDeviceProp prop;
986986
CUDACHECK(cudaGetDeviceProperties(&prop, cudaDev));
987-
len += snprintf(line+len, MAX_LINE-len, "# Rank %2d Group %2d Pid %6d on %10s device %2d [0x%02x] %s\n",
988-
rank, color, getpid(), hostname, cudaDev, prop.pciBusID, prop.name);
987+
len += snprintf(line+len, MAX_LINE-len, "# Rank %2d Group %2d Pid %6d on %10s device %2d [%04x:%02x:%02x] %s\n",
988+
rank, color, getpid(), hostname, cudaDev, prop.pciDomainID, prop.pciBusID, prop.pciDeviceID, prop.name);
989989
maxMem = std::min(maxMem, prop.totalGlobalMem);
990990
}
991991

0 commit comments

Comments
 (0)