|
Lines 1068-1074
static List _get_system_gpu_list_rsmi(node_config_load_t *node_config)
Link Here
|
| 1068 |
// Loop through all the GPUs on the system and add to gres_list_system |
1068 |
// Loop through all the GPUs on the system and add to gres_list_system |
| 1069 |
for (i = 0; i < device_count; ++i) { |
1069 |
for (i = 0; i < device_count; ++i) { |
| 1070 |
unsigned int minor_number = 0; |
1070 |
unsigned int minor_number = 0; |
| 1071 |
char *device_file = NULL; |
1071 |
char *device_file = NULL, *links = NULL; |
| 1072 |
char device_name[RSMI_STRING_BUFFER_SIZE] = {0}; |
1072 |
char device_name[RSMI_STRING_BUFFER_SIZE] = {0}; |
| 1073 |
char device_brand[RSMI_STRING_BUFFER_SIZE] = {0}; |
1073 |
char device_brand[RSMI_STRING_BUFFER_SIZE] = {0}; |
| 1074 |
rsmiPciInfo_t pci_info; |
1074 |
rsmiPciInfo_t pci_info; |
|
Lines 1082-1087
static List _get_system_gpu_list_rsmi(node_config_load_t *node_config)
Link Here
|
| 1082 |
_rsmi_get_device_pci_info(i, &pci_info); |
1082 |
_rsmi_get_device_pci_info(i, &pci_info); |
| 1083 |
_rsmi_get_device_unique_id(i, &uuid); |
1083 |
_rsmi_get_device_unique_id(i, &uuid); |
| 1084 |
|
1084 |
|
|
|
1085 |
/* Use links to record PCI bus ID order */ |
| 1086 |
links = gres_links_create_empty(i, device_count); |
| 1087 |
|
| 1085 |
xstrfmtcat(device_file, "/dev/dri/renderD%u", minor_number); |
1088 |
xstrfmtcat(device_file, "/dev/dri/renderD%u", minor_number); |
| 1086 |
|
1089 |
|
| 1087 |
debug2("GPU index %u:", i); |
1090 |
debug2("GPU index %u:", i); |
|
Lines 1091-1096
static List _get_system_gpu_list_rsmi(node_config_load_t *node_config)
Link Here
|
| 1091 |
debug2(" PCI Domain/Bus/Device/Function: %u:%u:%u.%u", |
1094 |
debug2(" PCI Domain/Bus/Device/Function: %u:%u:%u.%u", |
| 1092 |
pci_info.domain, |
1095 |
pci_info.domain, |
| 1093 |
pci_info.bus, pci_info.device, pci_info.function); |
1096 |
pci_info.bus, pci_info.device, pci_info.function); |
|
|
1097 |
debug2(" Links: %s", links); |
| 1094 |
debug2(" Device File (minor number): %s", device_file); |
1098 |
debug2(" Device File (minor number): %s", device_file); |
| 1095 |
if (minor_number != i+128) |
1099 |
if (minor_number != i+128) |
| 1096 |
debug("Note: GPU index %u is different from minor # %u", |
1100 |
debug("Note: GPU index %u is different from minor # %u", |
|
Lines 1101-1109
static List _get_system_gpu_list_rsmi(node_config_load_t *node_config)
Link Here
|
| 1101 |
|
1105 |
|
| 1102 |
add_gres_to_list(gres_list_system, "gpu", 1, |
1106 |
add_gres_to_list(gres_list_system, "gpu", 1, |
| 1103 |
node_config->cpu_cnt, NULL, NULL, |
1107 |
node_config->cpu_cnt, NULL, NULL, |
| 1104 |
device_file, device_brand, NULL); |
1108 |
device_file, device_brand, links); |
| 1105 |
|
1109 |
|
| 1106 |
xfree(device_file); |
1110 |
xfree(device_file); |
|
|
1111 |
xfree(links); |
| 1107 |
} |
1112 |
} |
| 1108 |
|
1113 |
|
| 1109 |
rsmi_shut_down(); |
1114 |
rsmi_shut_down(); |
| 1110 |
- |
|
|
| 1111 |
CUDA_VISIBLE_DEVICES |
1115 |
CUDA_VISIBLE_DEVICES |
| 1112 |
-- |
|
|
| 1113 |
src/plugins/gres/common/gres_common.c | 18 +++++++++++++++--- |
1116 |
src/plugins/gres/common/gres_common.c | 18 +++++++++++++++--- |
| 1114 |
src/plugins/gres/common/gres_common.h | 2 +- |
1117 |
src/plugins/gres/common/gres_common.h | 2 +- |
| 1115 |
src/plugins/gres/gpu/gres_gpu.c | 4 ++-- |
1118 |
src/plugins/gres/gpu/gres_gpu.c | 4 ++-- |
| 1116 |
src/plugins/gres/mps/gres_mps.c | 2 +- |
1119 |
src/plugins/gres/mps/gres_mps.c | 2 +- |
| 1117 |
src/plugins/gres/nic/gres_nic.c | 2 +- |
1120 |
src/plugins/gres/nic/gres_nic.c | 2 +- |
| 1118 |
5 files changed, 20 insertions(+), 8 deletions(-) |
1121 |
5 files changed, 20 insertions(+), 8 deletions(-) |