From 57764f8152f68d70c9173a3761bec236ca945897 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:44:39 -0800 Subject: [PATCH] Fix incorrect rocm-smi ID conversion (#648) --- src/misc/rocm_smi_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/rocm_smi_wrap.cc b/src/misc/rocm_smi_wrap.cc index a233ad3745..82b70a04de 100644 --- a/src/misc/rocm_smi_wrap.cc +++ b/src/misc/rocm_smi_wrap.cc @@ -59,7 +59,7 @@ ncclResult_t rocm_smi_getDevicePciBusIdString(uint32_t deviceIndex, char* busId, * | Device | [ 7: 3] | * | Function | [ 2: 0] | **/ - snprintf(busId, len, "%04lx:%02lx:%02lx.%01lx", (id) >> 32, (id & 0xff00) >> 8, (id & 0xf0) >> 4, (id & 0x3)); + snprintf(busId, len, "%04lx:%02lx:%02lx.%01lx", (id) >> 32, (id & 0xff00) >> 8, (id & 0xf8) >> 3, (id & 0x7)); return ncclSuccess; }