Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/rocprofiler-sdk-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ jobs:
git config --global --add safe.directory '*'
git submodule update --init --recursive --jobs 16 -- ${SUBMODULE_PATHS}

# This is a separate step because the checkout action requires git to be already installed,
# but we need the checkout action to fetch requirements.txt
- name: Install pip requirements
timeout-minutes: 5
shell: bash
run: |
python3 -m pip install -U --user -r projects/rocprofiler-sdk/requirements.txt
# Add pip packages to path
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
Comment thread
MythreyaK marked this conversation as resolved.
Resolved

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
cd projects/rocprofiler-sdk
git config --global --add safe.directory '*'
apt update
apt install -y wget build-essential cmake g++-11 g++-12 python3-pip libdw-dev libsqlite3-dev libdrm-dev pkg-config
apt install -y wget build-essential g++-11 g++-12 python3-pip libdw-dev libsqlite3-dev libdrm-dev pkg-config

# Older ROCm versions don't provide these packages.
apt install -y rccl-dev rccl-unittests || true
Expand All @@ -90,6 +90,9 @@ jobs:
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
python3 -m pip install -U --user -r requirements.txt
Comment thread
MythreyaK marked this conversation as resolved.
Resolved

# Add pip packages to path
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: List Files
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion projects/rocprofiler-sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND CMAKE_CURRENT_SOURCE_DIR STREQUAL
CMAKE_SOURCE_DIR)
Expand Down
2 changes: 1 addition & 1 deletion projects/rocprofiler-sdk/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Integration tests
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(COMMAND rocprofiler_deactivate_clang_tidy)
rocprofiler_deactivate_clang_tidy()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# prepend a custom search path.
# (https://cmake.org/cmake/help/latest/policy/CMP0074.html)

cmake_minimum_required(VERSION 3.20...4.1)
cmake_minimum_required(VERSION 3.24...4.1)

include(FindPackageHandleStandardArgs)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Wrapper used to create individual CTest tests from Pytest tests.
cmake_minimum_required(VERSION 3.20...4.1)
cmake_minimum_required(VERSION 3.24...4.1)

if(CMAKE_SCRIPT_MODE_FILE)

Expand Down
6 changes: 6 additions & 0 deletions projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ rocprofiler_add_option(ROCPROFILER_BUILD_GOTCHA
"Enable building gotcha library internally" ON)
rocprofiler_add_option(ROCPROFILER_BUILD_YAML_CPP
"Enable building yaml-cpp library internally" ON)
rocprofiler_add_option(ROCPROFILER_BUILD_ELFIO "Enable building ELFIO library internally"
ON)
rocprofiler_add_option(ROCPROFILER_BUILD_OTF2 "Enable building OTF2 library internally"
ON)
rocprofiler_add_option(ROCPROFILER_BUILD_JSON "Enable building JSON library internally"
ON)
if(ROCPROFILER_BUILD_TESTS)
rocprofiler_add_option(
ROCPROFILER_BUILD_GTEST
Expand Down
76 changes: 47 additions & 29 deletions projects/rocprofiler-sdk/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if(ROCPROFILER_BUILD_TESTS)
mark_as_advanced(BUILD_GMOCK)
mark_as_advanced(GTEST_HAS_ABSL)
else()
find_package(GTest REQUIRED)
find_package(GTest REQUIRED GLOBAL)
target_link_libraries(rocprofiler-sdk-gtest INTERFACE GTest::gtest)
endif()
endif()
Expand Down Expand Up @@ -118,7 +118,7 @@ if(ROCPROFILER_BUILD_FMT)
rocprofiler-sdk-fmt SYSTEM
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/fmt/include>)
else()
find_package(fmt REQUIRED)
find_package(fmt REQUIRED GLOBAL)
target_link_libraries(rocprofiler-sdk-fmt INTERFACE fmt::fmt)
endif()

Expand Down Expand Up @@ -154,7 +154,7 @@ if(ROCPROFILER_BUILD_YAML_CPP)
rocprofiler-sdk-yaml-cpp
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/yaml-cpp/include>)
else()
find_package(yaml-cpp 0.8.0 REQUIRED)
find_package(yaml-cpp 0.8.0 REQUIRED GLOBAL)
target_link_libraries(rocprofiler-sdk-yaml-cpp INTERFACE yaml-cpp::yaml-cpp)
endif()

Expand Down Expand Up @@ -208,41 +208,59 @@ target_link_libraries(
INTERFACE $<BUILD_INTERFACE:rocprofiler-sdk-perfetto-static-library>)

# ELFIO
rocprofiler_checkout_git_submodule(
RECURSIVE
RELATIVE_PATH external/elfio
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
REPO_URL https://github.com/serge1/ELFIO.git
REPO_BRANCH "Release_3.12")

set(ELFIO_BUILD_EXAMPLES OFF)
set(ELFIO_BUILD_TESTS OFF)
add_subdirectory(elfio EXCLUDE_FROM_ALL)
if(TARGET rocprofiler-sdk-elfio)
get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(rocprofiler-sdk-elfio SYSTEM
INTERFACE ${ELFIO_INCLUDE_DIR})
if(ROCPROFILER_BUILD_ELFIO)
rocprofiler_checkout_git_submodule(
RECURSIVE
RELATIVE_PATH external/elfio
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
REPO_URL https://github.com/serge1/ELFIO.git
REPO_BRANCH "Release_3.12")

set(ELFIO_BUILD_EXAMPLES OFF)
set(ELFIO_BUILD_TESTS OFF)
add_subdirectory(elfio EXCLUDE_FROM_ALL)
if(TARGET rocprofiler-sdk-elfio)
get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(rocprofiler-sdk-elfio SYSTEM
INTERFACE ${ELFIO_INCLUDE_DIR})
endif()
else()
find_package(elfio REQUIRED GLOBAL)
target_link_libraries(rocprofiler-sdk-elfio INTERFACE elfio::elfio)
endif()

#
# OTF2
#
add_subdirectory(otf2)

rocprofiler_checkout_git_submodule(
RECURSIVE
RELATIVE_PATH external/json
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
REPO_URL https://github.com/nlohmann/json.git
REPO_BRANCH "develop")
if(ROCPROFILER_BUILD_OTF2)
add_subdirectory(otf2)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(OTF2 REQUIRED IMPORTED_TARGET otf2)
add_library(otf2 INTERFACE)
add_library(otf2::otf2 ALIAS otf2)
target_link_libraries(otf2 INTERFACE PkgConfig::OTF2)
endif()
Comment thread
MythreyaK marked this conversation as resolved.
Resolved

#
# JSON
#
add_subdirectory(json)
target_include_directories(
rocprofiler-sdk-json SYSTEM
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/json/include>)
if(ROCPROFILER_BUILD_JSON)
rocprofiler_checkout_git_submodule(
RECURSIVE
RELATIVE_PATH external/json
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
REPO_URL https://github.com/nlohmann/json.git
REPO_BRANCH "develop")

add_subdirectory(json)
target_include_directories(
rocprofiler-sdk-json SYSTEM
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/json/include>)
else()
find_package(nlohmann_json REQUIRED GLOBAL)
target_link_libraries(rocprofiler-sdk-json INTERFACE nlohmann_json::nlohmann_json)
endif()

#
# SQLite3
Expand Down
2 changes: 1 addition & 1 deletion projects/rocprofiler-sdk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black
clang-format>=11.0.0,<12.0.0
clang-tidy>=15.0.0,<20.0.0
cmake>=3.21.0
cmake>=3.24.0
cmake-format
dataclasses
flake8
Expand Down
2 changes: 1 addition & 1 deletion projects/rocprofiler-sdk/samples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

project(rocprofiler-sdk-samples LANGUAGES C CXX)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT OMP_TARGET_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)

if(NOT CMAKE_HIP_COMPILER)
find_program(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
#include <rocprofiler-sdk/experimental/thread-trace/trace_decoder.h>

#include <algorithm>
#include <array>
#include <fstream>
#include <iostream>
#include <map>
#include <memory>
#include <vector>

namespace rocprofiler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ target_link_libraries(
rocprofiler-sdk::rocprofiler-sdk-common-library
rocprofiler-sdk::rocprofiler-sdk-abseil
rocprofiler-sdk::rocprofiler-sdk-static-library
rocprofiler-sdk::rocprofiler-sdk-amd-comgr
GTest::gtest
GTest::gtest_main)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ function(rocprofiler_rocpd_python_bindings _VERSION)
rocprofiler-sdk::rocprofiler-sdk-gotcha
rocprofiler-sdk::rocprofiler-sdk-dw
rocprofiler-sdk::rocprofiler-sdk-static-library
rocprofiler-sdk::rocprofiler-sdk-rocpd-library)
rocprofiler-sdk::rocprofiler-sdk-rocpd-library
rocprofiler-sdk::rocprofiler-sdk-amd-comgr)

# if "Development" is specified instead of "Development.Module", we need to link to
# python libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "auxv.hpp"

#include <fstream>
#include <vector>

namespace fs = rocprofiler::common::filesystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <unistd.h>

#include <algorithm>
#include <array>
#include <cctype>
#include <cerrno>
#include <cstddef>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

#include <dlfcn.h>
#include <cstddef>
#include <fstream>
#include <initializer_list>
#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <dlfcn.h> // for dladdr
#include <cstdint>
#include <cstdlib>
#include <fstream>
#include <map>
#include <memory>
#include <system_error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ target_sources(
target_link_libraries(
counter_test_constants
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
rocprofiler-sdk::rocprofiler-sdk-amd-comgr
rocprofiler-sdk::rocprofiler-sdk-static-library
rocprofiler-sdk::rocprofiler-sdk-hip
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime)
Expand All @@ -77,6 +78,7 @@ target_link_libraries(
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
rocprofiler-sdk::rocprofiler-sdk-hip
rocprofiler-sdk::rocprofiler-sdk-common-library
rocprofiler-sdk::rocprofiler-sdk-amd-comgr
rocprofiler-sdk::rocprofiler-sdk-static-library
GTest::gtest
GTest::gtest_main)
Expand Down
Loading
Loading