diff --git a/projects/rocprofiler-compute/CHANGELOG.md b/projects/rocprofiler-compute/CHANGELOG.md index 1682d155ff..26f1141683 100644 --- a/projects/rocprofiler-compute/CHANGELOG.md +++ b/projects/rocprofiler-compute/CHANGELOG.md @@ -78,6 +78,9 @@ Full documentation for ROCm Compute Profiler is available at [https://rocm.docs. * Total FLOPs (consider fp6 and fp4 ops) * Update Dash to >=3.0.0 (for web UI) * Change when Roofline PDFs are generated- during general profiling and --roof-only profiling (skip only when --no-roof option is present) +* Update Roofline binaries + * Rebuild using latest ROCm stack + * OS distribution support minimum for roofline feature is now Ubuntu22.04, RHEL9, and SLES15SP6 ### Resolved issues diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel8 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel8-rocm6 similarity index 100% rename from projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel8 rename to projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel8-rocm6 diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel9-rocm7 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel9-rocm7 new file mode 100755 index 0000000000..eb919b8ee8 Binary files /dev/null and b/projects/rocprofiler-compute/src/utils/rooflines/roofline-rhel9-rocm7 differ diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6-rocm6 similarity index 100% rename from projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6 rename to projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6-rocm6 diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6-rocm7 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6-rocm7 new file mode 100755 index 0000000000..4ca076224a Binary files /dev/null and b/projects/rocprofiler-compute/src/utils/rooflines/roofline-sles15sp6-rocm7 differ diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04-rocm6 similarity index 100% rename from projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04 rename to projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04-rocm6 diff --git a/projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04-rocm7 b/projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04-rocm7 new file mode 100755 index 0000000000..685ceb73bd Binary files /dev/null and b/projects/rocprofiler-compute/src/utils/rooflines/roofline-ubuntu22_04-rocm7 differ diff --git a/projects/rocprofiler-compute/src/utils/utils.py b/projects/rocprofiler-compute/src/utils/utils.py index 739995b9c9..b52fd9ca40 100644 --- a/projects/rocprofiler-compute/src/utils/utils.py +++ b/projects/rocprofiler-compute/src/utils/utils.py @@ -1169,6 +1169,10 @@ def gen_sysinfo( def detect_roofline(mspec): from utils import specs + rocm_ver = mspec.rocm_version[:1] + + target_binary = {"rocm_ver": rocm_ver, "distro": "override", "path": None} + 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) @@ -1177,38 +1181,51 @@ def detect_roofline(mspec): if "ROOFLINE_BIN" in os.environ.keys(): rooflineBinary = os.environ["ROOFLINE_BIN"] if path(rooflineBinary).exists(): - console_warning("roofline", "Detected user-supplied binary") - return { - "distro": "override", - "path": rooflineBinary, - } + msg = "Detected user-supplied binary --> ROOFLINE_BIN = %s\n" % rooflineBinary + console_warning("roofline", msg) + # distro stays marked as override and path value is substituted in + target_binary["path"] = rooflineBinary + return target_binary else: - msg = "user-supplied path to binary not accessible" - msg += "--> ROOFLINE_BIN = %s\n" % target_binary + msg = ( + "user-supplied path to binary not accessible --> ROOFLINE_BIN = %s\n" + % rooflineBinary + ) console_error("roofline", msg) - elif ( + + # Must be a valid RHEL machine + elif rocm_ver == 6 and ( rhel_distro == "platform:el8" + or rhel_distro == "platform:al8" or rhel_distro == "platform:el9" or rhel_distro == "platform:el10" - or rhel_distro == "platform:al8" ): - # Must be a valid RHEL machine + # RHEL8 supported up to ROCm6 distro = "platform:el8" + elif rocm_ver == 7 and ( + rhel_distro == "platform:el9" or rhel_distro == "platform:el10" + ): + # ROCm7 supports RHEL9 and above + distro = "platform:el9" + + # Must be a valid SLES machine elif ( (type(sles_distro) == str and len(sles_distro) >= 3) and sles_distro[:2] == "15" # confirm string and len and int(sles_distro[3]) >= 6 # SLES15 and SP >= 6 ): - # Must be a valid SLES machine # Use SP6 binary for all forward compatible service pack versions distro = "15.6" + + # Must be a valid Ubuntu machine elif ubuntu_distro == "22.04" or ubuntu_distro == "24.04": - # Must be a valid Ubuntu machine distro = "22.04" + else: console_error("roofline", "Cannot find a valid binary for your operating system") - target_binary = {"distro": distro} + # distro gets assigned, to follow default roofline bin location and nomenclature + target_binary["distro"] = distro return target_binary @@ -1218,6 +1235,7 @@ def mibench(args, mspec): distro_map = { "platform:el8": "rhel8", + "platform:el9": "rhel9", "15.6": "sles15sp6", "22.04": "ubuntu22_04", } @@ -1236,7 +1254,13 @@ def mibench(args, mspec): ] for dir in potential_paths: - path_to_binary = dir + "-" + distro_map[target_binary["distro"]] + path_to_binary = ( + dir + + "-" + + distro_map[target_binary["distro"]] + + "-rocm" + + target_binary["rocm_ver"] + ) binary_paths.append(path_to_binary) # Distro is valid but cant find rocm ver