Skip to content

Commit

Permalink
Merge branch 'SWDEV-479652-perfetto-based-tests-are-failing'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanicijamd committed Aug 27, 2024
2 parents 5f55b23 + 837af7c commit c49f41a
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 49 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/cpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "6.1"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "6.2"
# ubuntu 22.04
- os-distro: "ubuntu"
os-version: "22.04"
Expand All @@ -76,6 +79,9 @@ jobs:
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "6.1"
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "6.2"
# opensuse 15.3
- os-distro: "opensuse"
os-version: "15.3"
Expand Down Expand Up @@ -130,6 +136,9 @@ jobs:
- os-distro: "opensuse"
os-version: "15.5"
rocm-version: "6.1"
- os-distro: "opensuse"
os-version: "15.5"
rocm-version: "6.2"
# RHEL 8.7
- os-distro: "rhel"
os-version: "8.7"
Expand Down Expand Up @@ -175,6 +184,9 @@ jobs:
- os-distro: "rhel"
os-version: "8.9"
rocm-version: "6.1"
- os-distro: "rhel"
os-version: "8.9"
rocm-version: "6.2"
# RHEL 9.1
- os-distro: "rhel"
os-version: "9.1"
Expand Down Expand Up @@ -211,6 +223,9 @@ jobs:
- os-distro: "rhel"
os-version: "9.3"
rocm-version: "6.1"
- os-distro: "rhel"
os-version: "9.3"
rocm-version: "6.2"

steps:
- name: Free Disk Space
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: opensuse-15

on:
push:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand All @@ -15,7 +15,7 @@ on:
- '.github/workflows/formatting.yml'
- 'docker/**'
pull_request:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: redhat

on:
push:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand All @@ -15,7 +15,7 @@ on:
- '.github/workflows/formatting.yml'
- 'docker/**'
pull_request:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-focal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: ubuntu-focal

on:
push:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand All @@ -15,7 +15,7 @@ on:
- '.github/workflows/formatting.yml'
- 'docker/**'
pull_request:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-jammy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: ubuntu-jammy

on:
push:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand All @@ -15,7 +15,7 @@ on:
- '.github/workflows/formatting.yml'
- 'docker/**'
pull_request:
branches: [ main, develop ]
branches: [ main, develop, release/** ]
paths-ignore:
- '*.md'
- 'docs/**'
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.3
1.11.4
4 changes: 2 additions & 2 deletions cmake/Perfetto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ if(CMAKE_CXX_COMPILER_IS_CLANG)
else()
set(PERFETTO_IS_CLANG false)
set(OMNITRACE_PERFETTO_C_FLAGS
"-static-libgcc -Wno-maybe-uninitialized"
"-static-libgcc -Wno-maybe-uninitialized -Wno-stringop-overflow"
CACHE STRING "Perfetto C flags")
set(OMNITRACE_PERFETTO_CXX_FLAGS
"-static-libgcc -Wno-maybe-uninitialized"
"-static-libgcc -Wno-maybe-uninitialized -Wno-stringop-overflow"
CACHE STRING "Perfetto C++ flags")
endif()

Expand Down
6 changes: 3 additions & 3 deletions cmake/Templates/args.gn.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ is_clang = @PERFETTO_IS_CLANG@
is_hermetic_clang = false

enable_perfetto_benchmarks = false
enable_perfetto_integration_tests = false
enable_perfetto_integration_tests = true
enable_perfetto_unittests = false
enable_perfetto_fuzzers = false

# enable_perfetto_stderr_crash_dump = false
enable_perfetto_heapprofd = false
enable_perfetto_tools = false
enable_perfetto_trace_processor = false
enable_perfetto_trace_processor = true
enable_perfetto_trace_processor_httpd = false
enable_perfetto_trace_processor_json = false
enable_perfetto_trace_processor_linenoise = false
enable_perfetto_trace_processor_percentile = false
enable_perfetto_trace_processor_sqlite = false
enable_perfetto_trace_processor_sqlite = true
enable_perfetto_ui = false

extra_cflags = "@OMNITRACE_PERFETTO_C_FLAGS@"
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ENV PATH /usr/local/bin:${PATH}
ENV LIBRARY_PATH ${LIBRARY_PATH}:/opt/amdgpu/lib64

RUN yum groupinstall -y "Development Tools" && \
yum install -y epel-release && \
yum install -y --allowerasing curl dpkg-devel numactl-devel openmpi-devel papi-devel python3-pip wget zlib-devel which && \
yum install -y epel-release && crb enable && \
yum install -y --allowerasing curl dpkg-devel numactl-devel openmpi-devel papi-devel python3-pip texinfo wget which zlib-devel && \
yum clean all && \
python3 -m pip install 'cmake==3.21.4'

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.rhel.ci
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ARG ELFUTILS_DOWNLOAD_VERSION="0.186"
ARG NJOBS="12"

RUN yum groupinstall -y "Development Tools" && \
yum install -y epel-release && \
yum install -y --allowerasing curl dpkg-devel numactl-devel openmpi-devel papi-devel python3-pip wget zlib-devel which && \
yum install -y epel-release && crb enable && \
yum install -y --allowerasing curl dpkg-devel numactl-devel openmpi-devel papi-devel python3-pip texinfo wget which zlib-devel && \
yum clean all && \
python3 -m pip install 'cmake==3.21.4'

Expand Down
18 changes: 5 additions & 13 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,19 @@ ARG ROCM_REPO_VERSION="debian"
ARG ROCM_VERSION="0.0"
ARG ROCM_REPO_DIST="ubuntu"
ARG PYTHON_VERSIONS="6 7 8 9 10 11 12"
ARG AMDGPU_DEB=6.0/ubuntu/focal/amdgpu-install_6.0.60000-1_all.deb
ENV PATH ${HOME}/.local/bin:${PATH}

RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y build-essential cmake libnuma1 wget gnupg2 m4 bash-completion git-core autoconf libtool autotools-dev python3-pip lsb-release libpapi-dev libpfm4-dev libudev1 libopenmpi-dev rpm librpm-dev curl apt-utils && \
apt-get install -y apt-utils autoconf autotools-dev bash-completion bison build-essential cmake curl git-core gnupg2 libnuma1 libopenmpi-dev libpapi-dev libpfm4-dev librpm-dev libtool libudev1 lsb-release m4 python3-pip rpm texinfo wget && \
python3 -m pip install 'cmake==3.21.4'

RUN if [ "${ROCM_VERSION}" != "0.0" ]; then \
if [ -d /etc/apt/trusted.gpg.d ]; then \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/rocm.gpg; \
else \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -; \
fi && \
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${ROCM_REPO_VERSION}/ ${ROCM_REPO_DIST} main" | tee /etc/apt/sources.list.d/rocm.list && \
wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/${ROCM_REPO_DIST}/${AMDGPU_DEB} && \
apt-get install -y ./${AMDGPU_DEB} && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y hsa-amd-aqlprofile hsa-rocr-dev hsakmt-roct-dev && \
apt-get install -y hip-base hip-runtime-amd hip-dev && \
apt-get install -y rocm-llvm rocm-core rocm-smi-lib rocm-device-libs && \
apt-get install -y roctracer-dev rocprofiler-dev rccl-dev ${EXTRA_PACKAGES} && \
if [ "$(echo ${ROCM_VERSION} | awk -F '.' '{print $1}')" -lt "5" ]; then apt-get install -y rocm-dev; fi && \
apt-get install -y rocm-dev rocm-smi-lib roctracer-dev rocprofiler-dev rccl-dev libpciaccess0 ${EXTRA_PACKAGES} && \
apt-get autoclean; \
fi

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.ubuntu.ci
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY ./dyninst-source /tmp/dyninst

RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y autoconf autotools-dev bash-completion build-essential bzip2 cmake curl environment-modules git-core gnupg2 gzip libiberty-dev libpapi-dev libpfm4-dev libtool locales lsb-release m4 python3-pip unzip wget zip zlib1g-dev && \
apt-get install -y autoconf autotools-dev bash-completion bison build-essential bzip2 cmake curl environment-modules git-core gnupg2 gzip libiberty-dev libpapi-dev libpfm4-dev libtool locales lsb-release m4 python3-pip texinfo unzip wget zip zlib1g-dev && \
python3 -m pip install 'cmake==3.18.4' && \
apt-get autoclean && \
locale -a && \
Expand Down
11 changes: 3 additions & 8 deletions docker/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,23 @@ do
ROCM_REPO_DIST="ubuntu"
ROCM_REPO_VERSION=${ROCM_VERSION}
case "${ROCM_VERSION}" in
4.1* | 4.0*)
ROCM_REPO_DIST="xenial"
;;
5.3 | 5.3.* | 5.4 | 5.4.* | 5.5 | 5.5.* | 5.6 | 5.6.* | 5.7 | 5.7.* | 6.*)
case "${VERSION}" in
22.04)
ROCM_REPO_DIST="ubuntu"
ROCM_REPO_DIST="jammy"
;;
20.04)
ROCM_REPO_DIST="focal"
;;
18.04)
ROCM_REPO_DIST="bionic"
;;
*)
;;
esac
ROCM_DEB=amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb
;;
*)
;;
esac
verbose-build docker build . ${PULL} --progress plain -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
verbose-build docker build . ${PULL} --progress plain -f ${DOCKER_FILE} --tag ${CONTAINER} --build-arg DISTRO=${DISTRO} --build-arg VERSION=${VERSION} --build-arg ROCM_VERSION=${ROCM_VERSION} --build-arg ROCM_REPO_VERSION=${ROCM_REPO_VERSION} --build-arg ROCM_REPO_DIST=${ROCM_REPO_DIST} --build-arg AMDGPU_DEB=${ROCM_DEB} --build-arg PYTHON_VERSIONS=\"${PYTHON_VERSIONS}\"
elif [ "${DISTRO}" = "rhel" ]; then
if [ -z "${VERSION_MINOR}" ]; then
send-error "Please provide a major and minor version of the OS. Supported: >= 8.7, <= 9.3"
Expand Down
2 changes: 1 addition & 1 deletion source/lib/core/perfetto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ perfetto_counter_track<Tp>::emplace(size_t _idx, const std::string& _v,
auto _index = _track_data.size();
auto& _name = _name_data.emplace_back(std::make_unique<std::string>(_v));
const char* _unit_name = (_units && strlen(_units) > 0) ? _units : nullptr;
_track_data.emplace_back(::perfetto::CounterTrack{ _name->c_str() }
_track_data.emplace_back(::perfetto::CounterTrack{ ::perfetto::DynamicString{_name->c_str()} }
.set_unit_name(_unit_name)
.set_category(_category)
.set_unit_multiplier(_mult)
Expand Down
7 changes: 1 addition & 6 deletions source/lib/omnitrace/library/components/roctracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,7 @@ void
roctracer::shutdown()
{
auto_lock_t _lk{ type_mutex<roctracer>() };
if(!roctracer_is_setup())
{
if(!roctracer_is_init() && tim::storage<comp::roctracer_data>::instance())
tim::storage<comp::roctracer_data>::instance()->reset();
return;
}
if(!roctracer_is_setup()) return;

roctracer_is_setup() = false;

Expand Down
4 changes: 2 additions & 2 deletions source/lib/omnitrace/library/tracing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,13 @@ mark_perfetto_ts(CategoryT, const char* name, uint64_t _ts, Args&&... args)

template <typename CategoryT, typename... Args>
inline void
mark_perfetto_track(CategoryT, const char*, ::perfetto::Track _track, uint64_t _ts,
mark_perfetto_track(CategoryT, const char* name, ::perfetto::Track _track, uint64_t _ts,
Args&&... args)
{
// skip if category is disabled
if(category_mark_disabled<CategoryT>()) return;

TRACE_EVENT_INSTANT(trait::name<CategoryT>::value, _track, _ts,
TRACE_EVENT_INSTANT(trait::name<CategoryT>::value, ::perfetto::DynamicString{name}, _track, _ts,
std::forward<Args>(args)...);
}
} // namespace tracing
Expand Down

0 comments on commit c49f41a

Please sign in to comment.