[ROCProfiler SDK CI] Runners Update & Workflow Cache Improvement (#722)

Overriding checks/reviewers as CODEOWNER changes are pending

* Runners Update

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Testing ROCProfiler-SDK

Testing ROCProfiler-SDK

Changing CDash

Fixing ROCProfiler-SDK

Moving AQLProfile Navi3 and Navi4 to DIND

Moving AQLProfile Navi3 and Navi4 to DIND

Moving AQLProfile Navi3 and Navi4 to DIND

Moving AQLProfile Navi3 and Navi4 to DIND

Moving AQLProfile Navi3 and Navi4 to DIND

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating images

Updating images

Updating images

Updating images

Updating RHEL and SLES for AQLProfile

Fixing RPM OSes AQLprofile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for AQLProfile

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

Updating RHEL and SLES for ROCProfiler-SDK

* Fixing ENV for ROCProfiler-SDK

Fixing ENV for ROCProfiler-SDK

Temp workaround for OpenMP targets

Fixing ROCProfiler-SDK for Ubuntu

* Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Update rocprofiler-sdk-continuous_integration.yml

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Fixing Ubuntu Workflow

Adding RPM Package

Adding RPM Package

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Fixing OPenMP Compiler Issues

Update rocprofiler-sdk-continuous_integration.yml

Update rocprofiler-sdk-continuous_integration.yml

Update aqlprofile-continuous_integration.yml

Update rocprofiler-sdk-continuous_integration.yml

Fixing AQLProfile

* [rocprofiler-sdk][CI] add latest aqlprofile to rocprofiler-sdk workflow (#352)

* add aqlprofile

* misc.

* format

* add sudo to install

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

---------

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>

Update aqlprofile-continuous_integration.yml

Removing extra packages

Removing extra packages

Fixing ROCM Path Issues

Fixing ROCM Path Issues

Fixing ROCM Path Issues

Fixing RHEL

Fixing RHEL

Fixing RHEL

Fixing RHEL

Fixing RHEL

Fixing Sanitizers

* General Fixes

* Fixing ROCProfiler-SDK CI

* Fixing ROCProfiler-SDK CI

* Update projects/aqlprofile/dashboard.cmake

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

* General Fixes

* Update Readme.txt

* Fix ROCProfiler SDK CI

* Fix ROCProfiler SDK CI

* Fix ROCProfiler SDK CI

* Fix ROCProfiler SDK CI

* Update rocprofiler-sdk-continuous_integration.yml

* Fix ROCProfiler SDK CI

* Fix ROCProfiler SDK CI

* Fix for RHEL and Sanitizers for ROCProfiler-SDK

* Fix for RHEL and Sanitizers for ROCProfiler-SDK

* Fix for RHEL and Sanitizers for ROCProfiler-SDK

* Fix for RHEL and Sanitizers for ROCProfiler-SDK

* Upgrade ROCm Release & Fix for RHEL & SLES - ROCProfiler SDK CI

* Fix for RHEL & SLES - ROCProfiler SDK CI

* Fix for RHEL & SLES & Sanitizers - ROCProfiler SDK CI

* Fix for RHEL & SLES & Sanitizers - ROCProfiler SDK CI

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Adding ROCR Installation

* Adding ROCR Installation

* Adding ROCR Installation

* Adding ROCR Installation

* Adding ROCR Installation

* Adding ROCR Installation

* Update run-ci.py

* Fix for Sanitizers & Fix for RHEL 8.8

* Updating Code Coverage Workflow

* Updating Code Coverage Workflow

* Formatting Fix

* Formatting Fix

* Fix for Code Coverage & Sanitizers

* Fix for Code Coverage & Sanitizers

* Fix for Code Coverage & Sanitizers

* Caching Docker

* Caching Docker

* Caching Docker

* Changing Runner for CI Builder

* Adding CCache

* Fixing Core

* Fixing Core

* Fixing Core

* Fixing Core

* Fixing Core

* Update rocprofiler-sdk-continuous_integration.yml

* Update ROCm and amdgpu repository configurations

* Refactor repository configuration commands in CI

* Fix installation commands in CI workflow

* Remove unnecessary packages from installation commands

* Update ROCm and amdgpu repository paths in CI config

* Update pip installation commands to handle errors

* Install AWS CLI in CI workflow

* Update rocprofiler-sdk-continuous_integration.yml

* Remove awscli installation from CI workflow

* Modify PATH and pipx install commands in CI config

* Refactor ROCm SDK CI workflow to eliminate redundancy

* Add safe.directory configuration for git

* Update rocprofiler-sdk-continuous_integration.yml

* Fix CMake install prefix in CI workflow

* Add variant option to ccache configuration

* Change compiler launcher from ccache to sccache

* Set up Python virtual environment in CI workflow

* Remove ccache launcher from CMake build

* Add environment setup for building projects

* Add Curl installation step for RHEL 8.8

* Update rocprofiler-sdk-continuous_integration.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Fixing RPM

* Fixing RPM & Code Coverage

* Fixing RPM

* Fixing CI

* Lowering the size of the docker image

* Update aqlprofile-continuous_integration.yml

* Updating paths in AQLProfile

* Splitting the Build CI Docker Images from Main CI

* Create Dockerfile.ci, update ci docker workflow to reference it

* Splitting the Build CI Docker Images from Main CI

* Add new line to Dockerfile.ci

* Remove on schedule logic from ci docker workflow, change cdash project name in run-ci.py

* Update file path in build_ci_docker_images.yml

* Remove context from docker step

* Update file path in build_ci_docker_images

* more path changes

* remove context again

* Update rocprofiler-sdk-build_ci_docker_images.yml

* Update rocprofiler-sdk-code_coverage.yml

* Update rocprofiler-sdk-continuous_integration.yml

* Remove env variables from rocprofiler-sdk-build_ci_docker_images.yml

* Rename docker images file

* Rename KEY to FILE_NAME for Docker tarball

* [rocprofiler-sdk][CI] lint fixes  (#830)

* lint fixes.

* Updating Code Coverage Workflow

* Update rocprofiler-sdk-code_coverage.yml

* Update format.hpp

* Update format.hpp

---------

Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com>
Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com>

* TEMP: Removing ROCR build from develop

* [rocprofiler-sdk][SDK] Add new HIP API changes for ROCm 7.1 (#856)

* Add new HIP 7.1 changes.

* bug fix.

* bug fix.

* Apply suggestion from @Copilot

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

* Fix typo in hipDriverEntryPoint case statement

---------

Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com>
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Venkateshwar Reddy Kandula <Venkateshwarreddy.Kandula@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jbonnell-amd <jason.bonnell@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com>
This commit is contained in:
Ammar ELWazir
2025-09-09 14:25:07 -05:00
committed by GitHub
parent 2c249eb14f
commit a697941150
19 changed files with 1585 additions and 284 deletions
-3
View File
@@ -62,6 +62,3 @@ $ /opt/rocm/opencl/bin/clang -cl-std=CL2.0 -include /opt/rocm/opencl/include/ope
With newer device-libs layout, use this recompile command:
$ /opt/rocm/opencl/bin/clang -cl-std=CL2.0 -include /opt/rocm/opencl/include/opencl-c.h --hip-device-lib-path=/opt/rocm/amdgcn/bitcode -target amdgcn-amd-amdhsa -mcpu=gfx906 vector_add_kernel.cl -o vector_add_kernel.so
### ROCm 5.7
Added support for GFX10/GFX11
+9 -9
View File
@@ -8,10 +8,10 @@ macro(dashboard_submit)
endif()
endmacro()
set(CTEST_PROJECT_NAME "aqlprofile")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.rocprofiler.amd.com")
set(CTEST_PROJECT_NAME "AQLProfile")
set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
set(CTEST_DROP_SITE_CDASH TRUE)
@@ -62,13 +62,13 @@ endif()
macro(handle_error _message _ret)
if(NOT ${${_ret}} EQUAL 0)
dashboard_submit(PARTS Done RETURN_VALUE _submit_ret)
message(WARNING "${_message} failed: ${${_ret}}")
message(AUTHOR_WARNING "${_message} failed: ${${_ret}}")
endif()
endmacro()
ctest_start(Continuous)
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _update_ret)
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE _update_ret)
handle_error("Update" _update_ret)
ctest_configure(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _configure_ret)
@@ -76,12 +76,12 @@ dashboard_submit(PARTS Start Update Configure RETURN_VALUE _submit_ret)
handle_error("Configure" _configure_ret)
ctest_build(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _build_ret)
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _build_ret)
dashboard_submit(PARTS Build RETURN_VALUE _submit_ret)
handle_error("Build" _build_ret)
ctest_test(SOURCE "${CTEST_SOURCE_DIRECTORY}" BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _test_ret)
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _test_ret)
dashboard_submit(PARTS Test RETURN_VALUE _submit_ret)
handle_error("Testing" _test_ret)
@@ -90,5 +90,5 @@ dashboard_submit(PARTS Done RETURN_VALUE _submit_ret)
if(_submit_ret EQUAL 0)
message(STATUS "Dashboard submission successful.")
else()
message(WARNING "Dashboard submission failed with code ${_submit_ret}.")
message(AUTHOR_WARNING "Dashboard submission failed with code ${_submit_ret}.")
endif()
-6
View File
@@ -125,9 +125,3 @@ Please report issues on GitHub OR send an email to <dl.ROCm-Profiler.support@amd
NUM_COMPUTE_UNITS: 28
TARGET_GRAPHICS_VERSION: gfx1102
```
> [!WARNING]
> To use ROCprofiler-SDK, obtain the latest mainline version of AQLprofile from [here](https://github.com/ROCm/aqlprofile).
@@ -0,0 +1,126 @@
# Build a thin "base with deps" image atop the private runner image
ARG BASE_TAG=ubuntu-22.04
FROM rocm/rocprofiler-private:${BASE_TAG}
# GPU Type from GitHub Actions
ARG GPU_TYPE=gfx94X
ENV GPU_TYPE=${GPU_TYPE}
# Nightly Tarball Keys from GitHub Actions
ARG GFX94X_FILE_NAME
ENV GFX94X_FILE_NAME=${GFX94X_FILE_NAME}
ARG GFX110X_FILE_NAME
ENV GFX110X_FILE_NAME=${GFX110X_FILE_NAME}
ARG GFX120X_FILE_NAME
ENV GFX120X_FILE_NAME=${GFX120X_FILE_NAME}
SHELL ["/bin/bash","-lc"]
COPY projects/rocprofiler-sdk/requirements.txt /root/requirements.txt
ENV DEBIAN_FRONTEND=noninteractive
ENV CMAKE_HIP_PLATFORM=amd
ENV HIP_PLATFORM=amd
ENV HIP_RUNTIME=rocclr
ENV HIP_COMPILER=amdclang++
ENV LLVM_PATH=/opt/rocm/llvm
ENV CMAKE_PREFIX_PATH=/opt/rocm
ENV PATH=/opt/rh/gcc-toolset-11/root/usr/bin:/opt/rocm/bin:/opt/rocm/llvm/bin:/usr/local/bin:~/.local/bin:${PATH}
ENV LD_LIBRARY_PATH=/opt/rocm/lib:/opt/rocm/llvm/lib:${LD_LIBRARY_PATH}
RUN set -euo pipefail; \
if [ -f /etc/debian_version ]; then \
apt-get update && \
apt-get install -y curl wget gpg python3 python3-pip build-essential coreutils software-properties-common git cmake g++-11 g++-12 libdw-dev libsqlite3-dev libdrm-dev file autoconf pkg-config rpm libzstd-dev && \
add-apt-repository ppa:git-core/ppa && \
mkdir -p /etc/apt/keyrings && \
wget -N -P /tmp/ https://repo.radeon.com/amdgpu-install/.7.0/ubuntu/jammy/amdgpu-install_7.0.70000-1_all.deb && \
apt-get install -y /tmp/amdgpu-install_7.0.70000-1_all.deb && \
sed -i "s/\/30.10/\/.30.10/" /etc/apt/sources.list.d/amdgpu*.list && \
sed -i "s|rocm/apt/7.0|rocm/apt/.apt_7.0|; s|graphics/7.0|graphics/.7.0|" /etc/apt/sources.list.d/rocm.list && \
apt-get update && \
apt-get install -y git rocm-openmp-sdk libva-amdgpu-dev rocm-llvm-dev && \
python3 -m pip install -U awscli pipx && \
python3 -m pip install -U --user -r /root/requirements.txt; \
elif [ $(grep -i "ID=.*rhel" /etc/os-release | wc -l) -gt 0 ]; then \
dnf clean all || true; \
dnf install -y perl-ExtUtils-MakeMaker python3-pip || true; \
if [ $(grep -i "VERSION_ID=\"8.8\"" /etc/os-release | wc -l) -gt 0 ]; then \
wget https://www.kernel.org/pub/software/scm/git/git-2.51.0.tar.xz; \
tar -xf git-2.51.0.tar.xz; \
cd git-2.51.0; \
rm -rf /etc/yum.repos.d/redhat-partner.repo || true; \
dnf clean all; \
dnf install -y perl-ExtUtils-MakeMaker || true; \
export PATH=/opt/rh/gcc-toolset-11/root/usr/bin:$PATH; \
make prefix=/usr all -j 32; \
make prefix=/usr install; \
cd ..; rm -rf git-2.51.0*; \
echo -e "[ROCm-7.0.0]\nname=ROCm7.0.0\nbaseurl=https://repo.radeon.com/rocm/el8/7.0_rc1/main\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/yum.repos.d/rocm.repo; \
echo -e "[amdgpu]\nname=amdgpu\nbaseurl=https://repo.radeon.com/amdgpu/latest/rhel/8.8/main/x86_64/\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/yum.repos.d/amdgpu.repo; \
else \
rm -rf /etc/yum.repos.d/RHEL-partners.repo; \
dnf clean all; \
echo -e "[ROCm-7.0.0]\nname=ROCm7.0.0\nbaseurl=https://repo.radeon.com/rocm/el9/7.0_rc1/main\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/yum.repos.d/rocm.repo; \
echo -e "[amdgpu]\nname=amdgpu\nbaseurl=https://repo.radeon.com/amdgpu/30.10_rc1/rhel/9.5/main/x86_64/\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/yum.repos.d/amdgpu.repo; \
fi; \
dnf clean all; \
dnf install -y rocm-openmp rocm-openmp-sdk rocm-llvm-devel hipify-clang libsqlite3x-devel elfutils-devel; \
python3 -m pip install -U awscli pipx; \
python3 -m venv rocprofiler-sdk; \
source rocprofiler-sdk/bin/activate; \
export PATH=/opt/rh/gcc-toolset-11/root/usr/bin:${PATH}; \
python3 -m pip install --upgrade pip; \
python3 -m pip install --upgrade -r /root/requirements.txt; \
else \
echo -e "[ROCm-7.0.0]\nname=ROCm7.0.0\nbaseurl=https://repo.radeon.com/rocm/zyp/7.0_rc1/main\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/zypp/repos.d/rocm.repo; \
echo -e "[amdgpu]\nname=amdgpu\nbaseurl=https://repo.radeon.com/amdgpu/30.10_rc1/sle/15.6/main/x86_64/\nenabled=1\npriority=50\ngpgcheck=1\ngpgkey=https://repo.radeon.com/rocm/rocm.gpg.key" > /etc/zypp/repos.d/amdgpu.repo; \
zypper --gpg-auto-import-keys refresh; \
zypper --non-interactive install -y rocm-openmp rocm-openmp-sdk rocm-llvm-devel hipify-clang sqlite3-devel python3-pip; \
python3 -m venv rocprofiler-sdk; \
source rocprofiler-sdk/bin/activate; \
python3 -m pip install --upgrade pip pipx; \
python3 -m pipx install awscli; \
python3 -m pipx ensurepath; \
source ~/.bashrc; \
python3 -m pip install --upgrade pip || true; \
python3 -m pip install --upgrade -r /root/requirements.txt || true; \
cd /tmp; wget https://www.kernel.org/pub/software/scm/git/git-2.51.0.tar.xz; \
tar -xf git-2.51.0.tar.xz; cd git-2.51.0; make prefix=/usr all -j 32; make prefix=/usr install; \
cd /tmp; ln -s -f /usr/bin/git /usr/local/bin/git; rm -rf git-2.51.0*; \
fi
# Nightly Tarball - gfx94X
RUN set -euo pipefail; \
if [ "${GPU_TYPE}" = "gfx94X" ]; then \
if [ $(grep -i "sles" /etc/os-release | wc -l) -gt 0 ]; then \
source rocprofiler-sdk/bin/activate; \
python3 -m pipx ensurepath; \
source ~/.bashrc; \
fi; \
aws s3 cp "s3://therock-nightly-tarball/${GFX94X_FILE_NAME}" rocm-gfx94X.tar.gz --no-sign-request && \
mv rocm-gfx94X.tar.gz /opt/rocm-gfx94X.tar.gz; \
fi
# Nightly Tarball - gfx110X
RUN set -euo pipefail; \
if [ "${GPU_TYPE}" = "gfx110X" ]; then \
if [ $(grep -i "sles" /etc/os-release | wc -l) -gt 0 ]; then \
source rocprofiler-sdk/bin/activate; \
python3 -m pipx ensurepath; \
source ~/.bashrc; \
fi; \
aws s3 cp "s3://therock-nightly-tarball/${GFX110X_FILE_NAME}" rocm-gfx110X.tar.gz --no-sign-request && \
mv rocm-gfx110X.tar.gz /opt/rocm-gfx110X.tar.gz; \
fi
# Nightly Tarball - gfx120X
RUN set -euo pipefail; \
if [ "${GPU_TYPE}" = "gfx120X" ]; then \
if [ $(grep -i "sles" /etc/os-release | wc -l) -gt 0 ]; then \
source rocprofiler-sdk/bin/activate; \
python3 -m pipx ensurepath; \
source ~/.bashrc; \
fi; \
aws s3 cp "s3://therock-nightly-tarball/${GFX120X_FILE_NAME}" rocm-gfx120X.tar.gz --no-sign-request && \
mv rocm-gfx120X.tar.gz /opt/rocm-gfx120X.tar.gz; \
fi
@@ -953,7 +953,27 @@ ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipDrvLaunchKernelEx)
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetHandleForAddressRange)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleGetFunctionCount)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8Async)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16Async)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32Async)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetAttribute)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamSetAttribute)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleLoadFatBinary)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyBatchAsync)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DBatchAsync)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeer)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeerAsync)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint_spt)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemPrefetchAsync_v2)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipMemAdvise_v2)
ROCPROFILER_ENUM_LABEL(ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetId)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 442);
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 1
@@ -982,6 +1002,8 @@ static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 476);
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 477);
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 13
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 477);
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 14
static_assert(ROCPROFILER_HIP_RUNTIME_API_ID_LAST == 496);
#else
# if !defined(ROCPROFILER_UNSAFE_NO_VERSION_CHECK) && \
(defined(ROCPROFILER_CI) && ROCPROFILER_CI > 0)
@@ -3147,6 +3147,144 @@ typedef union rocprofiler_hip_api_args_t
unsigned long long flags;
} hipMemGetHandleForAddressRange;
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
struct
{
unsigned int* count;
hipModule_t mod;
} hipModuleGetFunctionCount;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned char value;
size_t width;
size_t height;
} hipMemsetD2D8;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned char value;
size_t width;
size_t height;
hipStream_t stream;
} hipMemsetD2D8Async;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned short value;
size_t width;
size_t height;
} hipMemsetD2D16;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned short value;
size_t width;
size_t height;
hipStream_t stream;
} hipMemsetD2D16Async;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned int value;
size_t width;
size_t height;
} hipMemsetD2D32;
struct
{
hipDeviceptr_t dst;
size_t dstPitch;
unsigned int value;
size_t width;
size_t height;
hipStream_t stream;
} hipMemsetD2D32Async;
struct
{
hipStream_t stream;
hipLaunchAttributeID attr;
const hipLaunchAttributeValue* value_out;
} hipStreamGetAttribute;
struct
{
hipStream_t stream;
hipLaunchAttributeID attr;
const hipLaunchAttributeValue* value;
} hipStreamSetAttribute;
struct
{
hipModule_t* module;
const void* fatbin;
} hipModuleLoadFatBinary;
struct
{
void** dsts;
void** srcs;
size_t* sizes;
size_t count;
hipMemcpyAttributes* attrs;
size_t* attrsIdxs;
size_t numAttrs;
size_t* failIdx;
hipStream_t stream;
} hipMemcpyBatchAsync;
struct
{
size_t numOps;
hipMemcpy3DBatchOp* opList;
size_t* failIdx;
unsigned long long flags;
hipStream_t stream;
} hipMemcpy3DBatchAsync;
struct
{
hipMemcpy3DPeerParms* p;
} hipMemcpy3DPeer;
struct
{
hipMemcpy3DPeerParms* p;
hipStream_t stream;
} hipMemcpy3DPeerAsync;
struct
{
const char* symbol;
void** funcPtr;
unsigned long long flags;
hipDriverEntryPointQueryResult* driverStatus;
} hipGetDriverEntryPoint;
struct
{
const char* symbol;
void** funcPtr;
unsigned long long flags;
hipDriverEntryPointQueryResult* driverStatus;
} hipGetDriverEntryPoint_spt;
struct
{
const void* dev_ptr;
size_t count;
hipMemLocation location;
unsigned int flags;
hipStream_t stream;
} hipMemPrefetchAsync_v2;
struct
{
const void* dev_ptr;
size_t count;
hipMemoryAdvise advice;
hipMemLocation location;
} hipMemAdvise_v2;
struct
{
hipStream_t stream;
unsigned long long* streamId;
} hipStreamGetId;
#endif
} rocprofiler_hip_api_args_t;
ROCPROFILER_EXTERN_C_FINI
@@ -530,6 +530,27 @@ typedef enum rocprofiler_hip_runtime_api_id_t // NOLINT(performance-enum-size)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetHandleForAddressRange,
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleGetFunctionCount,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8Async,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16Async,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32Async,
ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetAttribute,
ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamSetAttribute,
ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleLoadFatBinary,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyBatchAsync,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DBatchAsync,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeer,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeerAsync,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint,
ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint_spt,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemPrefetchAsync_v2,
ROCPROFILER_HIP_RUNTIME_API_ID_hipMemAdvise_v2,
ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetId,
#endif
ROCPROFILER_HIP_RUNTIME_API_ID_LAST,
} rocprofiler_hip_runtime_api_id_t;
@@ -168,9 +168,11 @@ struct Parser
{
case 'd': return make_cls([](unsigned char x) { return std::isdigit(x) != 0; });
case 'D': return make_cls([](unsigned char x) { return std::isdigit(x) == 0; });
case 'w': return make_cls([](unsigned char x) { return std::isalnum(x) || x == '_'; });
case 'w':
return make_cls([](unsigned char x) { return (std::isalnum(x) != 0) || x == '_'; });
case 'W':
return make_cls([](unsigned char x) { return !(std::isalnum(x) || x == '_'); });
return make_cls(
[](unsigned char x) { return !((std::isalnum(x) != 0) || x == '_'); });
case 's': return make_cls([](unsigned char x) { return std::isspace(x) != 0; });
case 'S': return make_cls([](unsigned char x) { return std::isspace(x) == 0; });
case 'n': return Node('\n');
@@ -204,13 +206,30 @@ struct Parser
char e = get();
if(e == 'd' || e == 'D' || e == 'w' || e == 'W' || e == 's' || e == 'S')
{
special_preds.push_back(
e == 'd' ? [](unsigned char x) { return std::isdigit(x) != 0; }
: e == 'D' ? [](unsigned char x) { return std::isdigit(x) == 0; }
: e == 'w' ? [](unsigned char x) { return std::isalnum(x) || x == '_'; }
: e == 'W' ? [](unsigned char x) { return !(std::isalnum(x) || x == '_'); }
: e == 's' ? [](unsigned char x) { return std::isspace(x) != 0; }
: [](unsigned char x) { return std::isspace(x) == 0; });
switch(e)
{
case 'd':
special_preds.emplace_back(
[](unsigned char x) { return std::isdigit(x) != 0; });
break;
case 'D':
special_preds.emplace_back(
[](unsigned char x) { return std::isdigit(x) == 0; });
break;
case 'w':
special_preds.emplace_back(
[](unsigned char x) { return (std::isalnum(x) != 0) || x == '_'; });
break;
case 'W':
special_preds.emplace_back([](unsigned char x) {
return !((std::isalnum(x) != 0) || x == '_');
});
break;
case 's':
special_preds.emplace_back(
[](unsigned char x) { return std::isspace(x) != 0; });
break;
}
continue;
}
else
@@ -250,7 +269,7 @@ struct Parser
auto specials = std::move(special_preds);
auto pred = [rs, ss, specials, negate](unsigned char x) {
bool in = false;
for(auto& r : rs)
for(const auto& r : rs)
{
if(r.a <= x && x <= r.b)
{
@@ -271,7 +290,7 @@ struct Parser
}
if(!in)
{
for(auto& sp : specials)
for(const auto& sp : specials)
{
if(sp(x))
{
@@ -918,7 +937,9 @@ struct CaptureMatcher
}
};
static int
namespace
{
int
count_captures(const Node& n)
{
switch(n.kind)
@@ -938,7 +959,7 @@ count_captures(const Node& n)
}
// Expand replacement with captures for a single match span [b,e)
static std::string
std::string
expand_replacement(std::string_view text,
const std::vector<std::pair<size_t, size_t>>& groups,
size_t b,
@@ -983,12 +1004,12 @@ expand_replacement(std::string_view text,
}
// $1..$99 (ECMAScript semantics: if two digits are present, always consume both)
if(std::isdigit(static_cast<unsigned char>(n1)))
if(std::isdigit(static_cast<unsigned char>(n1)) != 0)
{
int idx = n1 - '0';
size_t j = i + 2;
if(j < repl.size() && std::isdigit(static_cast<unsigned char>(repl[j])))
if(j < repl.size() && (std::isdigit(static_cast<unsigned char>(repl[j])) != 0))
{
int d2 = repl[j] - '0';
idx = idx * 10 + d2; // ALWAYS consume the second digit if present
@@ -1014,6 +1035,7 @@ expand_replacement(std::string_view text,
return out;
}
} // namespace
// ============================ Public API ===========================
@@ -46,13 +46,22 @@ def check_function_availability(connection, function_name):
"""
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)
try:
# Try the modern approach first (SQLite 3.30.0+)
cursor.execute(
"SELECT EXISTS(SELECT 1 FROM pragma_function_list WHERE name=?)",
(function_name,),
)
result = cursor.fetchone()[0]
return bool(result)
except Exception:
# Fallback for older SQLite versions (Workaround for RHEL 8)
# Try to execute a simple query using the function to see if it exists
try:
cursor.execute(f"SELECT {function_name}(1)")
return True
except Exception:
return False
def get_temp_view_names(connection: RocpdImportData) -> List[str]:
@@ -165,7 +165,7 @@ struct SemaphoreGuard
sem_t* sem = nullptr;
std::string name;
SemaphoreGuard(const std::string& sem_name)
SemaphoreGuard(const std::string& sem_name) // NOLINT
: name(sem_name)
{}
@@ -571,6 +571,28 @@ ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipDrvLaunchKernelEx_fn, 475)
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemGetHandleForAddressRange_fn, 476)
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipModuleGetFunctionCount_fn, 477);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D8_fn, 478);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D8Async_fn, 479);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D16_fn, 480);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D16Async_fn, 481);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D32_fn, 482);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemsetD2D32Async_fn, 483);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipStreamGetAttribute_fn, 484);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipStreamSetAttribute_fn, 485);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipModuleLoadFatBinary_fn, 486);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemcpyBatchAsync_fn, 487);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemcpy3DBatchAsync_fn, 488);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemcpy3DPeer_fn, 489);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemcpy3DPeerAsync_fn, 490);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipGetDriverEntryPoint_fn, 491);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipGetDriverEntryPoint_spt_fn, 492);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemPrefetchAsync_v2_fn, 493);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipMemAdvise_v2_fn, 494);
ROCP_SDK_ENFORCE_ABI(::HipDispatchTable, hipStreamGetId_fn, 495);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION == 0
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 442)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 1
@@ -599,6 +621,8 @@ ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 476)
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 477)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 13
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 477)
#elif HIP_RUNTIME_API_TABLE_STEP_VERSION == 14
ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 496)
#else
INTERNAL_CI_ROCP_SDK_ENFORCE_ABI_VERSIONING(::HipDispatchTable, 0)
#endif
@@ -263,6 +263,9 @@ struct formatter<hipMemAllocationType> : rocprofiler::hip::details::base_formatt
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Invalid);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Pinned);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Max);
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemAllocationType, Uncached);
#endif
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipMemAllocationType);
}
return fmt::format_to(ctx.out(), "Unknown");
@@ -279,6 +282,11 @@ struct formatter<hipMemLocationType> : rocprofiler::hip::details::base_formatter
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemLocationType, Invalid);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemLocationType, Device);
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemLocationType, Host);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemLocationType, HostNuma);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemLocationType, HostNumaCurrent);
#endif
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipMemLocationType);
}
return fmt::format_to(ctx.out(), "Unknown");
@@ -428,6 +436,197 @@ ROCP_SDK_HIP_FORMATTER(HIP_LAUNCH_CONFIG_st,
v.numAttrs,
'}')
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
template <>
struct formatter<hipMemcpy3DOperand> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(const hipMemcpy3DOperand& v, Ctx& ctx) const
{
switch(v.type)
{
case hipMemcpyOperandTypePointer:
return fmt::format_to(
ctx.out(),
"{{type=Pointer, ptr={}, rowLength={}, layerHeight={}, locHint={}}}",
static_cast<void*>(v.op.ptr.ptr),
v.op.ptr.rowLength,
v.op.ptr.layerHeight,
v.op.ptr.locHint);
case hipMemcpyOperandTypeArray:
return fmt::format_to(ctx.out(),
"{{type=Array, array={}, offset={}}}",
static_cast<void*>(v.op.array.array),
v.op.array.offset);
default:
return fmt::format_to(ctx.out(), "{{type=UNKNOWN({})}}", static_cast<int>(v.type));
}
}
};
ROCP_SDK_HIP_FORMATTER(hipAccessPolicyWindow,
"{{base_ptr={}, hitProp={}, hitRatio={}, missProp={}, num_bytes={}}}",
static_cast<void*>(v.base_ptr),
v.hitProp,
v.hitRatio,
v.missProp,
v.num_bytes)
template <>
struct formatter<hipSynchronizationPolicy> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipSynchronizationPolicy v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipSyncPolicy, Auto);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipSyncPolicy, Spin);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipSyncPolicy, Yield);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipSyncPolicy, BlockingSync);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipSyncPolicy);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
ROCP_SDK_HIP_FORMATTER(hipLaunchMemSyncDomainMap, "{{default={}, remote={}}}", v.default_, v.remote)
template <>
struct formatter<hipLaunchMemSyncDomain> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipLaunchMemSyncDomain v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchMemSyncDomain, Default);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchMemSyncDomain, Remote);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipLaunchMemSyncDomain);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
template <>
struct formatter<hipMemcpySrcAccessOrder> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipMemcpySrcAccessOrder v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemcpySrcAccessOrder, Invalid);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemcpySrcAccessOrder, Stream);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemcpySrcAccessOrder, DuringApiCall);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemcpySrcAccessOrder, Any);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipMemcpySrcAccessOrder, Max);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipMemcpySrcAccessOrder);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
template <>
struct formatter<hipAccessProperty> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipAccessProperty v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipAccessProperty, Normal);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipAccessProperty, Streaming);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipAccessProperty, Persisting);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipAccessProperty);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
ROCP_SDK_HIP_FORMATTER(hipOffset3D, "{{x={}, y={}, z={}}}", v.x, v.y, v.z)
template <>
struct formatter<hipLaunchAttributeID> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipLaunchAttributeID v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, AccessPolicyWindow);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, Cooperative);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, SynchronizationPolicy);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, Priority);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, MemSyncDomainMap);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, MemSyncDomain);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipLaunchAttribute, Max);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipLaunchAttributeID);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
template <>
struct formatter<hipLaunchAttributeValue> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipLaunchAttributeValue v, Ctx& ctx) const
{
return fmt::format_to(
ctx.out(),
"{{accessPolicyWindow={}, cooperative={}, priority={}, syncPolicy={}, "
"memSyncDomainMap={}, memSyncDomain={}}}",
v.accessPolicyWindow,
v.cooperative,
v.priority,
v.syncPolicy,
v.memSyncDomainMap,
v.memSyncDomain);
}
};
ROCP_SDK_HIP_FORMATTER(hipMemcpyAttributes,
"{}srcAccessOrder={}, srcLocHint={}, dstLocHint={}, flags={}{}",
'{',
v.srcAccessOrder,
v.srcLocHint,
v.dstLocHint,
v.flags,
'}')
ROCP_SDK_HIP_FORMATTER(hipMemcpy3DBatchOp,
"{}src={}, dst={}, extent={}, srcAccessOrder={}, flags={}{}",
'{',
v.src,
v.dst,
v.extent,
v.srcAccessOrder,
v.flags,
'}')
ROCP_SDK_HIP_FORMATTER(hipMemcpy3DPeerParms,
"{}srcArray={}, srcPos={}, srcPtr={}, srcDevice={}, dstArray={}, dstPos={}, "
"dstPtr={}, dstDevice={}, extent={}{}",
'{',
static_cast<const void*>(v.srcArray),
v.srcPos,
v.srcPtr,
v.srcDevice,
static_cast<const void*>(v.dstArray),
v.dstPos,
v.dstPtr,
v.dstDevice,
v.extent,
'}')
template <>
struct formatter<hipDriverEntryPointQueryResult> : rocprofiler::hip::details::base_formatter
{
template <typename Ctx>
auto format(hipDriverEntryPointQueryResult v, Ctx& ctx) const
{
switch(v)
{
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipDriverEntryPoint, Success);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipDriverEntryPoint, SymbolNotFound);
ROCP_SDK_HIP_FORMAT_CASE_STMT(hipDriverEntryPoint, VersionNotSufficent);
ROCP_SDK_HIP_FORMAT_DFLT_CASE(hipDriverEntryPointQueryResult);
}
return fmt::format_to(ctx.out(), "Unknown");
}
};
#endif
} // namespace fmt
#undef ROCP_SDK_HIP_FORMATTER
@@ -597,6 +597,28 @@ HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNT
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 12
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemGetHandleForAddressRange, hipMemGetHandleForAddressRange, hipMemGetHandleForAddressRange_fn, handle, dptr, size, handleType, flags);
#endif
#if HIP_RUNTIME_API_TABLE_STEP_VERSION >= 14
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleGetFunctionCount, hipModuleGetFunctionCount, hipModuleGetFunctionCount_fn, count, mod);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8, hipMemsetD2D8, hipMemsetD2D8_fn, dst, dstPitch, value, width, height);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D8Async, hipMemsetD2D8Async, hipMemsetD2D8Async_fn, dst, dstPitch, value, width, height, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16, hipMemsetD2D16, hipMemsetD2D16_fn, dst, dstPitch, value, width, height);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D16Async, hipMemsetD2D16Async, hipMemsetD2D16Async_fn, dst, dstPitch, value, width, height, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32, hipMemsetD2D32, hipMemsetD2D32_fn, dst, dstPitch, value, width, height);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemsetD2D32Async, hipMemsetD2D32Async, hipMemsetD2D32Async_fn, dst, dstPitch, value, width, height, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetAttribute, hipStreamGetAttribute, hipStreamGetAttribute_fn, stream, attr, value_out);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamSetAttribute, hipStreamSetAttribute, hipStreamSetAttribute_fn, stream, attr, value);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipModuleLoadFatBinary, hipModuleLoadFatBinary, hipModuleLoadFatBinary_fn, module, fatbin);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpyBatchAsync, hipMemcpyBatchAsync, hipMemcpyBatchAsync_fn, dsts, srcs, sizes, attrs, attrsIdxs, numAttrs, failIdx, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DBatchAsync, hipMemcpy3DBatchAsync, hipMemcpy3DBatchAsync_fn, numOps, opList, failIdx, flags, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeer, hipMemcpy3DPeer, hipMemcpy3DPeer_fn, p);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemcpy3DPeerAsync, hipMemcpy3DPeerAsync, hipMemcpy3DPeerAsync_fn, p, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint, hipGetDriverEntryPoint, hipGetDriverEntryPoint_fn, symbol, funcPtr, flags, driverStatus);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipGetDriverEntryPoint_spt, hipGetDriverEntryPoint_spt, hipGetDriverEntryPoint_spt_fn, symbol, funcPtr, flags, driverStatus);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemPrefetchAsync_v2, hipMemPrefetchAsync_v2, hipMemPrefetchAsync_v2_fn, dev_ptr, count, location, flags, stream);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipMemAdvise_v2, hipMemAdvise_v2, hipMemAdvise_v2_fn, dev_ptr, count, advice, location);
HIP_API_INFO_DEFINITION_V(ROCPROFILER_HIP_TABLE_ID_Runtime, ROCPROFILER_HIP_RUNTIME_API_ID_hipStreamGetId, hipStreamGetId, hipStreamGetId_fn, stream, streamId);
#endif
// clang-format on
#else
@@ -21,7 +21,9 @@ struct StdRes
size_t e = 0;
};
static std::optional<bool>
namespace
{
std::optional<bool>
TryStdMatch(std::string_view text, std::string_view pat)
{
try
@@ -34,7 +36,7 @@ TryStdMatch(std::string_view text, std::string_view pat)
}
}
static std::optional<StdRes>
std::optional<StdRes>
TryStdSearch(std::string_view text, std::string_view pat)
{
try
@@ -55,7 +57,7 @@ TryStdSearch(std::string_view text, std::string_view pat)
}
}
static std::optional<std::string>
std::optional<std::string>
TryStdReplace(std::string_view text, std::string_view pat, std::string_view repl)
{
try
@@ -67,6 +69,7 @@ TryStdReplace(std::string_view text, std::string_view pat, std::string_view repl
return std::nullopt;
}
}
} // namespace
// ----------------------------- Tests -------------------------------
@@ -107,7 +110,7 @@ TEST(regex_parity, literals_and_escapes)
TEST(regex_parity, dot_and_anchors)
{
auto cmp = [&](std::string s, std::string p) {
auto cmp = [&](const std::string& s, const std::string& p) {
auto sm = TryStdMatch(s, p);
if(!sm) return;
EXPECT_EQ(R::regex_match(s, p), *sm);
@@ -279,7 +282,7 @@ TEST(regex_parity, env_patterns_from_issue)
"(.*)%q\\{([A-Z0-9_]+)\\}(.*)" // should NOT match here
};
for(auto& p : pats)
for(const auto& p : pats)
{
auto ss = TryStdSearch(fpath, p);
ASSERT_TRUE(ss.has_value());
@@ -650,7 +653,9 @@ TEST(regex_compatibility, thread_safety)
}
};
std::vector<std::thread> threads;
auto threads = std::vector<std::thread>{};
threads.reserve(4);
for(int i = 0; i < 4; ++i)
{
threads.emplace_back(worker);
@@ -14,8 +14,8 @@ import multiprocessing
# and default value for CTEST_SUBMIT_URL
# _PROJECT_NAME = "rocprofiler-v2-internal"
# _BASE_URL = "10.194.116.31/cdash"
_PROJECT_NAME = "rocprofiler-sdk"
_BASE_URL = "cdash.rocprofiler.amd.com"
_PROJECT_NAME = "rocprofiler-sdk-alt"
_BASE_URL = "my.cdash.org"
_GCOVR_GENERATE_CMD = None
# these are various default values
@@ -193,9 +193,9 @@ def generate_custom(args, cmake_args, ctest_args):
set(CTEST_PROJECT_NAME "{_PROJECT_NAME}")
set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_SUBMIT_URL "http://{SUBMIT_URL}")
set(CTEST_SUBMIT_URL "https://{SUBMIT_URL}")
set(CTEST_UPDATE_TYPE git)
set(CTEST_UPDATE_VERSION_ONLY TRUE)