Skip to content

Adds ROCmProfilerService and fixes NVProfilerService. - #49580

Open
ericcano wants to merge 9 commits into
cms-sw:masterfrom
ericcano:NV-ROCm-ProfilerService
Open

Adds ROCmProfilerService and fixes NVProfilerService.#49580
ericcano wants to merge 9 commits into
cms-sw:masterfrom
ericcano:NV-ROCm-ProfilerService

Conversation

@ericcano

@ericcano ericcano commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

PR description:

Splits the NVProfilerService into a generic framework activity annotation base and an NVTX specific customization. A ROCm customization is added. Another one for VTune should be easily derivable.

This commit also adds thread safety wit spinlocks to avoid thread scheduling effects. Some ranges experience double start of double end. This is now indicated with a mark, instead of failing on an assertion.

Support added for ES modules execution, path ranges, source and event cleanup (which is are the most important contributions to the inter event gap).

This could still be polished a lot, by adding configurable content or message, coloring by event/EDM stream, etc...

The support for EDM events is also not complete and could still be expanded.

PR validation:

The two services have been tested on NVIDIA and AMD GPUs and showed expected results:

Here with the PyTorch test:
image

image

This was also tested with HLT configurations.

@cmsbuild

cmsbuild commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

cms-bot internal usage

@cmsbuild

cmsbuild commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/47110

ERROR: Build errors found during clang-tidy run.

src/HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc:14:10: error: 'rocprofiler-sdk-roctx/roctx.h' file not found [clang-diagnostic-error]
   14 | #include <rocprofiler-sdk-roctx/roctx.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 326 warnings (326 in non-user code).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild

cmsbuild commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/47111

ERROR: Build errors found during clang-tidy run.

src/HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc:14:10: error: 'rocprofiler-sdk-roctx/roctx.h' file not found [clang-diagnostic-error]
   14 | #include <rocprofiler-sdk-roctx/roctx.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 326 warnings (326 in non-user code).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@ericcano

Copy link
Copy Markdown
Contributor Author

This PR is dependent on cms-sw/cmsdist#10238

@cmsbuild

Copy link
Copy Markdown
Contributor

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #49580 was updated.

@cmsbuild

Copy link
Copy Markdown
Contributor

Milestone for this pull request has been moved to CMSSW_16_1_X. Please open a backport if it should also go in to CMSSW_16_0_X.

@cmsbuild cmsbuild modified the milestones: CMSSW_16_0_X, CMSSW_16_1_X Dec 18, 2025
@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

please test

@cmsbuild

cmsbuild commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

-1

Failed Tests: ClangBuild
Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fa145b/55123/summary.html
COMMIT: 5c8c78e
CMSSW: CMSSW_20_1_X_2026-08-05-2300/el9_amd64_gcc13
Additional Tests: GPU,AMD_MI300X,AMD_W7900,NVIDIA_H100,NVIDIA_L40S,NVIDIA_T4
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49580/55123/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed Clang Build

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' /usr/bin/time -v scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@ericcano can you make clang happy ?

https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fa145b/55123/clang-new-warnings.log

@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@ericcano can you move

using namespace std::string_literals;

from the header file back to the .cc files ?

@cmsbuild

cmsbuild commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/50473

Code check has found code style and quality issues which could be resolved by applying following patch(s)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the existing NVIDIA profiling service into a backend-agnostic, range/mark-based ProfilerService framework and adds a ROCm/ROCTX-backed implementation, aiming to provide consistent CMSSW activity annotations across GPU profiling stacks.

Changes:

  • Introduces ProfilerServiceBase (shared utilities) and a templated ProfilerService<Backend> that registers ActivityRegistry watchers and manages in-flight ranges.
  • Reimplements NVProfilerService as a thin wrapper around a new NVTX backend.
  • Adds ROCmProfilerService using rocprofiler-sdk ROCTX APIs and updates relevant BuildFiles for dependencies.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
PerfTools/ProfilerService/interface/ProfilerServiceBase.h Adds shared utilities (colors, spinlocks, range pooling, in-flight range tracking).
PerfTools/ProfilerService/interface/ProfilerService.h Adds the backend-agnostic templated service registering EDM watchers and emitting ranges/marks.
PerfTools/ProfilerService/BuildFile.xml Exports dependencies needed by the new header-only profiling service framework.
HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc Adds a ROCTX/rocprofiler-sdk backend and the ROCm profiler service plugin.
HeterogeneousCore/ROCmServices/plugins/BuildFile.xml Adds rocprofiler-sdk dependency and links the new ROCmProfilerService plugin.
HeterogeneousCore/ROCmServices/BuildFile.xml Adds a source-only dependency on the new ProfilerService headers.
HeterogeneousCore/CUDAServices/plugins/NVProfilerService.cc Replaces the old implementation with a backend-based NVTX implementation.
HeterogeneousCore/CUDAServices/plugins/BuildFile.xml Adds dependency on PerfTools/ProfilerService for the new NVProfilerService implementation.
Suppressed comments (1)

PerfTools/ProfilerService/interface/ProfilerServiceBase.h:235

  • This header prints warnings directly to std::cout on range bookkeeping issues. Writing to stdout from framework services can spam logs and add synchronization/IO overhead; the profiler backend mark already records the warning in the timeline.
        std::cout << fullmsg << std::endl;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h
Comment thread PerfTools/ProfilerService/interface/ProfilerService.h Outdated
Comment thread HeterogeneousCore/CUDAServices/plugins/NVProfilerService.cc
Comment thread HeterogeneousCore/CUDAServices/plugins/NVProfilerService.cc
Comment thread HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc
Comment thread HeterogeneousCore/CUDAServices/plugins/NVProfilerService.cc
@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Copilot uses AI. Check for mistakes.

Indeed.

Reviewing code is time-consuming enough that I don't need to spend time to read also correct-looking-but-possibly- wrong auto-generated pseudo-review comments.

@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

-heterogeneous

I refuse to review PRs with Copilot-generated comments.

@cmsbuild

cmsbuild commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/50474

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild

cmsbuild commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@cmsbuild

cmsbuild commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again.

@ericcano

ericcano commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Apologies, I had turned this automatic AI review feature on some time ago. It's now off.
@fwyzard, indeed I had looked up exactly what it made you point out before committing. Sorry about that.

@fwyzard

fwyzard commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

please test

1 similar comment
@smuzaffar

Copy link
Copy Markdown
Contributor

please test

@cmsbuild

Copy link
Copy Markdown
Contributor

-1

Failed Tests: Build ClangBuild
Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fa145b/55442/summary.html
COMMIT: a7794d3
CMSSW: CMSSW_20_1_X_2026-08-17-2300/el9_amd64_gcc14
Additional Tests: GPU,AMD_MI300X,AMD_W7900,NVIDIA_H100,NVIDIA_L40S,NVIDIA_T4
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/49580/55442/install.sh to create a dev area with all the needed externals and cmssw changes.

Failed Build

I found compilation error when building:

/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/gcc/14.3.1-724da22786638848892aa9ded8fcd995/bin/c++ -c -DCMS_MICRO_ARCH='x86-64-v3' -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=140301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DBOOST_MPL_IGNORE_PARENTHESES_WARNING -D__HIP_PLATFORM_HCC__ -D__HIP_PLATFORM_AMD__ -DCMSSW_GIT_HASH='CMSSW_20_1_X_2026-08-17-2300' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_20_1_X_2026-08-17-2300' -Isrc -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/cms/cmssw-patch/CMSSW_20_1_X_2026-08-17-2300/src -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/pcre/8.43-b1efa343d62cf66cc5cafcce5ddcf5b0/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-hip/7.14-7f2dec530de8715894eaa38d9d02337d/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/boost/1.91.0-69d2f6d010ebd6581aa6b7ae1c4d6dd7/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/bz2lib/1.0.8-59f9cf2f694ed1cbcfd89fedefa58cc3/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/libuuid/2.40-30397f5d4641a42f70e122f23e043a5a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocr-runtime/7.14-2924950508623cb3499ea900c5f293e6/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/lcg/root/6.36.13-15104c8b817845d1891e93d3b5a4fbfe/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/tbb/v2022.3.0-fc86502c2a3e05fe0a93b7701254cc8e/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/xz/5.8.3-227f994f587b0d5d8ef0de48972ee444/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/zlib/1.3.2-611ad6ca171d38fc22fbd2e9579e0775/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/fmt/10.2.1-94b5da68daf94c2ef846640fd869fdc9/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/hiprand/7.14-2625b93445d63767683bb7b6f47c3073/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/md5/1.0.0-4c04fac6c42256d53fbdabb58aa703f3/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/numactl/2.0.19-cd4812a8566d36bb2870143cdf8cdb1a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rccl/7.14-06bd9762a327720a29e7b268576cbfd7/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-comgr/7.14-ef8503d776b88c7af8ec79a54273b639/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-core/7.14-5e95e6c59661f0bce6ec4348e0f42ba4/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-rocprofiler-sdk/7.14-f54783ceb18779e33deb3e157c9c7759/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-smi-lib/7.14-be7a4a0bd360cac3f127cead2bc0f833/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocprim/7.14-569215d2bf917aea39a0791c4162305f/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocprofiler-register/7.14-eba767829a32897e4b6c9d8a0e022b69/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocrand/7.14-656099cbec33f54b2ec8c897a9887711/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocthrust/7.14-b0d0bc1eea1ea5d341d7ad97a0a2b5c9/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/tinyxml2/6.2.0-c4563d5fb92fc6565e3044fafb0c97d1/include -O3 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -Wno-error=array-bounds -Warray-bounds -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=unused-value -Werror=unused-result -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC -MMD -MF tmp/el9_amd64_gcc14/src/HeterogeneousCore/ROCmServices/plugins/HeterogeneousCoreROCmServicesPlugins/ROCmProfilerService.cc.d src/HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc -o tmp/el9_amd64_gcc14/src/HeterogeneousCore/ROCmServices/plugins/HeterogeneousCoreROCmServicesPlugins/ROCmProfilerService.cc.o
>> Compiling edm plugin src/HeterogeneousCore/ROCmServices/plugins/ROCmService.cc
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/gcc/14.3.1-724da22786638848892aa9ded8fcd995/bin/c++ -c -DCMS_MICRO_ARCH='x86-64-v3' -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=140301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DBOOST_MPL_IGNORE_PARENTHESES_WARNING -D__HIP_PLATFORM_HCC__ -D__HIP_PLATFORM_AMD__ -DCMSSW_GIT_HASH='CMSSW_20_1_X_2026-08-17-2300' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_20_1_X_2026-08-17-2300' -Isrc -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/cms/cmssw-patch/CMSSW_20_1_X_2026-08-17-2300/src -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/pcre/8.43-b1efa343d62cf66cc5cafcce5ddcf5b0/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-hip/7.14-7f2dec530de8715894eaa38d9d02337d/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/boost/1.91.0-69d2f6d010ebd6581aa6b7ae1c4d6dd7/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/bz2lib/1.0.8-59f9cf2f694ed1cbcfd89fedefa58cc3/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/libuuid/2.40-30397f5d4641a42f70e122f23e043a5a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocr-runtime/7.14-2924950508623cb3499ea900c5f293e6/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/lcg/root/6.36.13-15104c8b817845d1891e93d3b5a4fbfe/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/tbb/v2022.3.0-fc86502c2a3e05fe0a93b7701254cc8e/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/xz/5.8.3-227f994f587b0d5d8ef0de48972ee444/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/zlib/1.3.2-611ad6ca171d38fc22fbd2e9579e0775/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/fmt/10.2.1-94b5da68daf94c2ef846640fd869fdc9/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/hiprand/7.14-2625b93445d63767683bb7b6f47c3073/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/md5/1.0.0-4c04fac6c42256d53fbdabb58aa703f3/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/numactl/2.0.19-cd4812a8566d36bb2870143cdf8cdb1a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rccl/7.14-06bd9762a327720a29e7b268576cbfd7/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-comgr/7.14-ef8503d776b88c7af8ec79a54273b639/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-core/7.14-5e95e6c59661f0bce6ec4348e0f42ba4/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-rocprofiler-sdk/7.14-f54783ceb18779e33deb3e157c9c7759/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocm-smi-lib/7.14-be7a4a0bd360cac3f127cead2bc0f833/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocprim/7.14-569215d2bf917aea39a0791c4162305f/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocprofiler-register/7.14-eba767829a32897e4b6c9d8a0e022b69/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocrand/7.14-656099cbec33f54b2ec8c897a9887711/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/rocthrust/7.14-b0d0bc1eea1ea5d341d7ad97a0a2b5c9/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02955/el9_amd64_gcc14/external/tinyxml2/6.2.0-c4563d5fb92fc6565e3044fafb0c97d1/include -O3 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -Wno-error=array-bounds -Warray-bounds -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=unused-value -Werror=unused-result -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC -MMD -MF tmp/el9_amd64_gcc14/src/HeterogeneousCore/ROCmServices/plugins/HeterogeneousCoreROCmServicesPlugins/ROCmService.cc.d src/HeterogeneousCore/ROCmServices/plugins/ROCmService.cc -o tmp/el9_amd64_gcc14/src/HeterogeneousCore/ROCmServices/plugins/HeterogeneousCoreROCmServicesPlugins/ROCmService.cc.o
In file included from src/HeterogeneousCore/ROCmServices/plugins/ROCmProfilerService.cc:5:
src/PerfTools/ProfilerService/interface/ProfilerService.h: In constructor 'ProfilerService::ProfilerService(const edm::ParameterSet&, edm::ActivityRegistry&)':
src/PerfTools/ProfilerService/interface/ProfilerService.h:491:12: error: 'class edm::ActivityRegistry' has no member named 'watchJobFailure'
  491 |   registry.watchJobFailure(this, &ProfilerService::jobFailure);
      |            ^~~~~~~~~~~~~~~
src/PerfTools/ProfilerService/interface/ProfilerService.h:557:12: error: 'class edm::ActivityRegistry' has no member named 'watchPostESModuleRegistration'; did you mean 'watchPostESModuleConstruction'?
  557 |   registry.watchPostESModuleRegistration(this, &ProfilerService::postESModuleRegistration);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Failed Clang Build

I found compilation error while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' /usr/bin/time -v scram build -k -j 32 COMPILER='llvm compile'

>> Local Products Rules ..... done
>> Creating project symlinks
>> Entering Package HeterogeneousCore/CUDAServices
>> Entering Package HeterogeneousCore/ROCmServices
>> Compile sequence completed for CMSSW CMSSW_20_1_X_2026-08-17-2300
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 1
Command exited with non-zero status 1
	Command being timed: "scram build -k -j 32 COMPILER=llvm compile BUILD_LOG=yes"
	User time (seconds): 29.39
	System time (seconds): 5.57
	Percent of CPU this job got: 373%


REGISTER_SIGNAL_WATCHER(BeginStream)
REGISTER_SIGNAL_WATCHER(EndStream)

registry.watchJobFailure(this, &ProfilerService::jobFailure);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This signal was removed in #51626 (it has never been issued by the framework, and only in a unit test up to April 2007).

REGISTER_SIGNAL_WATCHER(ESModuleConstruction)

// ES signal watchers
registry.watchPostESModuleRegistration(this, &ProfilerService::postESModuleRegistration);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This signal was also removed in #51626. The PostESModuleConstruction signal (which apparently is already being watched above) serves the same purpose as this signal did.

Eric Cano added 8 commits August 26, 2026 15:29
Splits the NVProfilerService into a generic framework activity annotation base and an NVTX specific
customization. A ROCm customization is added. Another one for VTune should be easily derivable.
This commit also creates TBB container based trackers for in flight
ranges, that match be begin/end of the range and wrap the undelying
range implementation. Coloring has been added (only supported in
NSight).

An option to annotate the ranges with may details is provided to beeter
accomodate a timeline view (full detail) and a statictical approach
(only the name of modules is added).
@cmsbuild

Copy link
Copy Markdown
Contributor

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again.

@m-fila m-fila left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Eric, I have a few comments and curiosities if you don't mind

Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread PerfTools/ProfilerService/interface/ProfilerServiceBase.h Outdated
Comment thread HeterogeneousCore/CUDAServices/plugins/NVProfilerService.cc Outdated
Also uniformizes to std::size_t, removes unneeded nvtx3 header and cleans up build files.
@cmsbuild

Copy link
Copy Markdown
Contributor

@cmsbuild

Copy link
Copy Markdown
Contributor

Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants