Switching from RHEL 8 to RHEL 9 (#318)

* Switching from RHEL 8 to RHEL 9

* Switching from RHEL 8 to RHEL 9

* Switching from RHEL 8 to RHEL 9

* Fixing ROCPD for older Python Versions

* Formatting and checking if SQRT is available or not

* Formatting and checking if SQRT is available or not

* Formatting and checking if SQRT is available or not

* Formatting and checking if SQRT is available or not

* Formatting and checking if SQRT is available or not

* Update projects/rocprofiler-sdk/source/lib/python/rocpd/summary.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update summary.py

* Update summary.py

* Update projects/rocprofiler-sdk/source/lib/python/rocpd/summary.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update projects/rocprofiler-sdk/source/lib/python/rocpd/summary.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update summary.py

* Update summary.py

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Этот коммит содержится в:
Ammar ELWazir
2025-08-13 08:53:38 -05:00
коммит произвёл GitHub
родитель 311e279596
Коммит 28977999ad
3 изменённых файлов: 40 добавлений и 6 удалений
+3 -1
Просмотреть файл
@@ -10,12 +10,14 @@ on:
- '!projects/aqlprofile/*.md'
- '!projects/aqlprofile/CODEOWNERS'
- '!projects/aqlprofile/source/docs/**'
- '.github/workflows/aqlprofile-continuous_integration.yml'
pull_request:
paths:
- 'projects/aqlprofile/**'
- '!projects/aqlprofile/*.md'
- '!projects/aqlprofile/CODEOWNERS'
- '!projects/aqlprofile/source/docs/**'
- '.github/workflows/aqlprofile-continuous_integration.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -106,7 +108,7 @@ jobs:
fail-fast: false
matrix:
runner: ['mi300']
os: ['rhel-8', 'sles-15']
os: ['rhel-9', 'sles-15']
build-type: ['RelWithDebInfo']
ci-flags: ['--linter clang-tidy']
+3 -5
Просмотреть файл
@@ -202,7 +202,7 @@ jobs:
fail-fast: false
matrix:
runner: ['mi300']
os: ['rhel-8', 'sles-15']
os: ['rhel-9', 'sles-15']
build-type: ['RelWithDebInfo']
ci-flags: ['']
@@ -225,11 +225,10 @@ jobs:
working-directory: projects/rocprofiler-sdk
run: |
git config --global --add safe.directory '*'
if [ "${OS_TYPE}" == "rhel-8" ]; then
if [ "${OS_TYPE}" == "rhel-9" ]; then
dnf makecache
dnf groupinstall -y "Development Tools"
dnf remove -y gcc-c++
dnf install -y gcc-toolset-11-gcc-c++ llvm14-devel
dnf install -y llvm14-devel
fi
python3 -m pip install --upgrade pip
python3 -m pip install -U --user -r requirements.txt
@@ -258,7 +257,6 @@ jobs:
shell: bash
working-directory: projects/rocprofiler-sdk
run:
if [ "${OS_TYPE}" == "rhel-8" ]; then source scl_source enable gcc-toolset-11; fi;
/usr/bin/python3 ./source/scripts/run-ci.py -B build
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.runner }}-core
--build-jobs 16
+34
Просмотреть файл
@@ -25,6 +25,7 @@
import argparse
import os
import math
from typing import Any, List, Tuple
from .importer import RocpdImportData, execute_statement
@@ -32,6 +33,28 @@ from .query import export_sqlite_query
from . import output_config
def check_function_availability(connection, function_name):
"""
Checks if a given function exists in the SQLite database.
Args:
connection (sqlite3 db connection): The SQLite database connection handler.
function_name (str): The name of the function to check.
Returns:
bool: True if the function exists, False otherwise.
"""
cursor = connection.cursor()
# Query pragma_function_list to check for the function
cursor.execute(
"SELECT EXISTS(SELECT 1 FROM pragma_function_list WHERE name=?)", (function_name,)
)
result = cursor.fetchone()[0]
return bool(result)
def get_temp_view_names(connection: RocpdImportData) -> List[str]:
"""Return the names of all temporary views in the SQLite connection."""
return [
@@ -374,6 +397,17 @@ def generate_all_summaries(connection: RocpdImportData, **kwargs: Any) -> None:
region_categories = kwargs.get("region_categories", None)
output_format = kwargs.get("format", "console")
if not check_function_availability(connection, "sqrt"):
connection.create_function(
"sqrt",
1,
lambda x: (
math.sqrt(x)
if x is not None and isinstance(x, (int, float)) and x >= 0
else None
),
)
# create the temporary summary views
create_summary_views(connection, by_rank)
create_summary_region_views(connection, by_rank, region_categories=region_categories)