Adds ROCmProfilerService and fixes NVProfilerService. - #49580
Conversation
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/47110 ERROR: Build errors found during clang-tidy run. |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/47111 ERROR: Build errors found during clang-tidy run. |
|
This PR is dependent on cms-sw/cmsdist#10238 |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/47203 |
|
Pull request #49580 was updated. |
|
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. |
|
please test |
|
-1 Failed Tests: ClangBuild Failed Clang BuildI found compilation warning while trying to compile with clang. Command used: See details on the summary page. |
|
@ericcano can you move using namespace std::string_literals;from the header file back to the .cc files ? |
|
-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)
|
There was a problem hiding this comment.
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 templatedProfilerService<Backend>that registers ActivityRegistry watchers and manages in-flight ranges. - Reimplements
NVProfilerServiceas a thin wrapper around a new NVTX backend. - Adds
ROCmProfilerServiceusing 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::couton 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.
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. |
|
-heterogeneous I refuse to review PRs with Copilot-generated comments. |
|
-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)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/50475 |
|
Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again. |
|
Apologies, I had turned this automatic AI review feature on some time ago. It's now off. |
|
please test |
1 similar comment
|
please test |
|
-1 Failed Tests: Build ClangBuild Failed BuildI 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 BuildI found compilation error while trying to compile with clang. Command used: >> 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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
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).
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/50726 |
|
Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again. |
m-fila
left a comment
There was a problem hiding this comment.
Hi Eric, I have a few comments and curiosities if you don't mind
Also uniformizes to std::size_t, removes unneeded nvtx3 header and cleans up build files.
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49580/50737 |
|
Pull request #49580 was updated. @Dr15Jones, @cmsbuild, @fwyzard, @makortel, @smuzaffar can you please check and sign again. |
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:

This was also tested with HLT configurations.