From cd9a98526be49bfe3d2714046ab435a7f81dad55 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Mon, 7 Nov 2022 10:25:30 -0600 Subject: [PATCH 1/2] Adding Ubuntu binary support to project Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: c3c2eef259801728202b7e5ca63d5b02180341d0] --- projects/rocprofiler-compute/src/common.py | 1 + projects/rocprofiler-compute/src/omniperf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/projects/rocprofiler-compute/src/common.py b/projects/rocprofiler-compute/src/common.py index 5aeeced221..afa0e3498c 100644 --- a/projects/rocprofiler-compute/src/common.py +++ b/projects/rocprofiler-compute/src/common.py @@ -33,6 +33,7 @@ SOC_LIST = ["mi50", "mi100", "mi200"] DISTRO_MAP = { "platform:el8": "rhel8", "15.3": "sle15sp3", + "20.04": "ubuntu20_04" } version = os.path.join(OMNIPERF_HOME.parent, "VERSION") try: diff --git a/projects/rocprofiler-compute/src/omniperf b/projects/rocprofiler-compute/src/omniperf index 47e3601c46..f4b231380d 100755 --- a/projects/rocprofiler-compute/src/omniperf +++ b/projects/rocprofiler-compute/src/omniperf @@ -203,6 +203,7 @@ def detect_roofline(): rocm_ver = mspec.rocmversion[:1] os_release = path("/etc/os-release").read_text() + ubuntu_distro = specs.search(r'VERSION_ID="(.*?)"', os_release) rhel_distro = specs.search(r'PLATFORM_ID="(.*?)"', os_release) sles_distro = specs.search(r'VERSION_ID="(.*?)"', os_release) @@ -221,6 +222,9 @@ def detect_roofline(): elif sles_distro == "15.3": # Must be a valid SLES machine distro = sles_distro + elif ubuntu_distro == "20.04": + # Must be a valid Ubuntu machine + distro = ubuntu_distro else: print("ROOFLINE ERROR: Cannot find a valid binary for your operating system") sys.exit(1) From 56f21c6d0bd7e2ff464756d72303ec68d6441dca Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Mon, 7 Nov 2022 10:27:31 -0600 Subject: [PATCH 2/2] Adjust python formatting Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: 48b055f827ba585790a7ff76df600c7822f78586] --- projects/rocprofiler-compute/src/common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/projects/rocprofiler-compute/src/common.py b/projects/rocprofiler-compute/src/common.py index afa0e3498c..2109ede788 100644 --- a/projects/rocprofiler-compute/src/common.py +++ b/projects/rocprofiler-compute/src/common.py @@ -30,11 +30,7 @@ OMNIPERF_HOME = Path(__file__).resolve().parent # OMNIPERF INFO PROG = "omniperf" SOC_LIST = ["mi50", "mi100", "mi200"] -DISTRO_MAP = { - "platform:el8": "rhel8", - "15.3": "sle15sp3", - "20.04": "ubuntu20_04" -} +DISTRO_MAP = {"platform:el8": "rhel8", "15.3": "sle15sp3", "20.04": "ubuntu20_04"} version = os.path.join(OMNIPERF_HOME.parent, "VERSION") try: with open(version, "r") as file: