From c3c2eef259801728202b7e5ca63d5b02180341d0 Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Mon, 7 Nov 2022 10:25:30 -0600 Subject: [PATCH] Adding Ubuntu binary support to project Signed-off-by: colramos-amd --- src/common.py | 1 + src/omniperf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/common.py b/src/common.py index 5aeeced221..afa0e3498c 100644 --- a/src/common.py +++ b/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/src/omniperf b/src/omniperf index 47e3601c46..f4b231380d 100755 --- a/src/omniperf +++ b/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)