diff --git a/fimutil/__init__.py b/fimutil/__init__.py index eeb41e2..b0fe67c 100644 --- a/fimutil/__init__.py +++ b/fimutil/__init__.py @@ -3,5 +3,5 @@ This is a package of Information Model utilitied for FABRIC for scanning different types of sites """ -__VERSION__ = "1.6.3" +__VERSION__ = "1.6.4" __version__ = __VERSION__ diff --git a/fimutil/ralph/gpu.py b/fimutil/ralph/gpu.py index 640400b..4c38b30 100644 --- a/fimutil/ralph/gpu.py +++ b/fimutil/ralph/gpu.py @@ -16,8 +16,8 @@ class GPU: """ Model: str Description: str - BDF: str - NUMA: str + BDF: list + NUMA: list @staticmethod def find_gpus(node_raw_json) -> List[Any]: @@ -33,8 +33,18 @@ def find_gpus(node_raw_json) -> List[Any]: logging.debug(f'Detected GPU {gpu_model}') model = gpu_model description = custom_fields[field] - bdf = custom_fields[field + '_pci_id'] + # May contain multiple PCI devices depending on GPU type + # GPUs at CIEN rack have both an audio and video PCI device associated + # [root@cien-w1 ~]# lspci | grep 25:00. + # 25:00.0 VGA compatible controller: NVIDIA Corporation AD102GL [RTX 6000 Ada Generation] (rev a1) + # 25:00.1 Audio device: NVIDIA Corporation AD102 High Definition Audio Controller (rev a1) + # bdf field woul show as 25:00.0 25:00.1 + # Extract PCI devices information + bdf_values = custom_fields.get(f'{field}_pci_id', '').split() + bdf = [bdf.strip() for bdf in bdf_values] # -1 means unknown - numa = custom_fields.get(field + '_numa_node', '-1') + # Extract NUMA information + numa_val = custom_fields.get(f'{field}_numa_node', '-1') + numa = [numa_val] * len(bdf) if bdf else [numa_val] ret.append(GPU(model, description, bdf, numa)) return ret \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4cca4d1..3be42a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,9 @@ build-backend = "flit_core.buildapi" [project] name = "fim-utils" -authors = [{name = "Ilya Baldin", email = "ibaldin@renci.org"}, {name = "Xi Yang", email="xiyang@es.net"}, {name="Hussamuddin Nasir", email="nasir@netlab.uky.edu"}] +authors = [{name = "Ilya Baldin", email = "ibaldin@renci.org"}, + {name = "Xi Yang", email="xiyang@es.net"}, + {name="Hussamuddin Nasir", email="nasir@netlab.uky.edu"}] readme = "README.md" license = {file = "LICENSE"} classifiers = ["License :: OSI Approved :: MIT License", @@ -13,7 +15,7 @@ classifiers = ["License :: OSI Approved :: MIT License", dynamic = ["version", "description"] requires-python = '>=3.9' dependencies = [ - "fabric_fim >= 1.6.0", + "fabric_fim >= 1.6.2", "pyjq == 2.6.0", "jsonpath_ng == 1.5.3", ]