Merge 'amd-staging' into 'amd-mainline'

[ROCm/rocprofiler-systems commit: 27f210ea5d]
This commit is contained in:
David Galiffi
2024-12-19 10:08:36 -05:00
melakukan c3e2315ce8
98 mengubah file dengan 4084 tambahan dan 6292 penghapusan
@@ -58,6 +58,7 @@ GPU metrics
* Power usage
* Temperature
* Utilization
* VCN activity
CPU metrics
========================================
Binary file not shown.

After

Width:  |  Height:  |  Ukuran: 96 KiB

@@ -228,7 +228,7 @@ Generating a default configuration file
ROCPROFSYS_PROFILE = false
ROCPROFSYS_USE_SAMPLING = false
ROCPROFSYS_USE_PROCESS_SAMPLING = true
ROCPROFSYS_USE_ROCTRACER = true
ROCPROFSYS_USE_ROCM = true
ROCPROFSYS_USE_ROCM_SMI = true
ROCPROFSYS_USE_KOKKOSP = false
ROCPROFSYS_USE_CODE_COVERAGE = false
@@ -248,9 +248,6 @@ Generating a default configuration file
ROCPROFSYS_PERFETTO_FILE = perfetto-trace.proto
ROCPROFSYS_PERFETTO_FILL_POLICY = discard
ROCPROFSYS_PERFETTO_SHMEM_SIZE_HINT_KB = 4096
ROCPROFSYS_ROCTRACER_HSA_ACTIVITY = false
ROCPROFSYS_ROCTRACER_HSA_API = false
ROCPROFSYS_ROCTRACER_HSA_API_TYPES =
ROCPROFSYS_SAMPLING_CPUS =
ROCPROFSYS_SAMPLING_DELAY = 0.5
ROCPROFSYS_SAMPLING_FREQ = 10
@@ -363,13 +360,10 @@ Viewing the setting descriptions
| ROCPROFSYS_PERFETTO_FILL_POLICY | Behavior when perfetto buffer is ful... |
| ROCPROFSYS_PERFETTO_SHMEM_SIZE_HINT_KB | Hint for shared-memory buffer size i... |
| ROCPROFSYS_PRECISION | Set the global output precision for ... |
| ROCPROFSYS_ROCTRACER_HSA_ACTIVITY | Enable HSA activity tracing support |
| ROCPROFSYS_ROCTRACER_HSA_API | Enable HSA API tracing support |
| ROCPROFSYS_ROCTRACER_HSA_API_TYPES | HSA API type to collect |
| ROCPROFSYS_SAMPLING_CPUS | CPUs to collect frequency informatio... |
| ROCPROFSYS_SAMPLING_DELAY | Number of seconds to wait before the... |
| ROCPROFSYS_SAMPLING_FREQ | Number of software interrupts per se... |
| ROCPROFSYS_SAMPLING_GPUS | Devices to query when ROCPROFSYS_USE_... |
| ROCPROFSYS_SAMPLING_GPUS | Devices to query when ROCPROFSYS_USE... |
| ROCPROFSYS_SCIENTIFIC | Set the global numerical reporting t... |
| ROCPROFSYS_STRICT_CONFIG | Throw errors for unknown setting nam... |
| ROCPROFSYS_SUPPRESS_CONFIG | Disable processing of setting config... |
@@ -391,13 +385,13 @@ Viewing the setting descriptions
| ROCPROFSYS_TRACE | Enable perfetto backend |
| ROCPROFSYS_USE_PID | Enable tagging filenames with proces... |
| ROCPROFSYS_USE_ROCM_SMI | Enable sampling GPU power, temp, uti... |
| ROCPROFSYS_USE_ROCTRACER | Enable ROCM tracing |
| ROCPROFSYS_USE_ROCM | Enable ROCM tracing |
| ROCPROFSYS_USE_SAMPLING | Enable statistical sampling of call-... |
| ROCPROFSYS_USE_PROCESS_SAMPLING | Enable a background thread which sam... |
| ROCPROFSYS_PROFILE | Enable timemory backend |
| ROCPROFSYS_VERBOSE | Verbosity level |
| ROCPROFSYS_WIDTH | Set the global output width for comp... |
|-----------------------------------------|-----------------------------------------|
|------------------------------------------|-----------------------------------------|
Viewing components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -470,6 +464,7 @@ Viewing components
| sampling_gpu_power | GPU Power Usage via ROCm-SMI. Derived fro... |
| sampling_gpu_temp | GPU Temperature via ROCm-SMI. Derived fro... |
| sampling_gpu_busy | GPU Utilization (% busy) via ROCm-SMI. De... |
| sampling_vcn_busy | GPU VCN Utilization (% activity) via ROCm... |
| sampling_gpu_memory_usage | GPU Memory Usage via ROCm-SMI. Derived fr... |
|-----------------------------------|----------------------------------------------|
@@ -268,8 +268,6 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
$ rocprof-sys-sample -- ./parallel-overhead-locks 30 4 100
HSA_TOOLS_LIB=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
HSA_TOOLS_REPORT_LOAD_FAILURE=1
LD_PRELOAD=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
ROCPROFSYS_USE_PROCESS_SAMPLING=false
ROCPROFSYS_USE_SAMPLING=true
@@ -283,8 +281,6 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
$ rocprof-sys-sample -PTDH -I all -- ./parallel-overhead-locks 30 4 100
HSA_TOOLS_LIB=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
HSA_TOOLS_REPORT_LOAD_FAILURE=1
KOKKOS_PROFILE_LIBRARY=/opt/rocprofiler-systems/lib/librocprof-sys.so.1.7.1
LD_PRELOAD=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
ROCPROFSYS_CPU_FREQ_ENABLED=true
@@ -298,9 +294,7 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_RCCLP=true
ROCPROFSYS_USE_ROCM_SMI=true
ROCPROFSYS_USE_ROCPROFILER=true
ROCPROFSYS_USE_ROCTRACER=true
ROCPROFSYS_USE_ROCTX=true
ROCPROFSYS_USE_ROCM=true
ROCPROFSYS_USE_SAMPLING=true
ROCPROFSYS_PROFILE=true
OMP_TOOL_LIBRARIES=/opt/rocprofiler-systems/lib/librocprof-sys-dl.so.1.7.1
@@ -330,9 +324,7 @@ The following snippets show how ``rocprof-sys-sample`` runs with various environ
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_RCCLP=false
ROCPROFSYS_USE_ROCM_SMI=false
ROCPROFSYS_USE_ROCPROFILER=false
ROCPROFSYS_USE_ROCTRACER=false
ROCPROFSYS_USE_ROCTX=false
ROCPROFSYS_USE_ROCM=false
ROCPROFSYS_USE_SAMPLING=true
ROCPROFSYS_PROFILE=true
...
@@ -363,9 +355,7 @@ Here is the full output from the previous
ROCPROFSYS_USE_PROCESS_SAMPLING=true
ROCPROFSYS_USE_RCCLP=false
ROCPROFSYS_USE_ROCM_SMI=false
ROCPROFSYS_USE_ROCPROFILER=false
ROCPROFSYS_USE_ROCTRACER=false
ROCPROFSYS_USE_ROCTX=false
ROCPROFSYS_USE_ROCM=false
ROCPROFSYS_USE_SAMPLING=true
[rocprof-sys][dl][1785877] rocprofsys_main
[rocprof-sys][1785877][rocprofsys_init_tooling] Instrumentation mode: Sampling
@@ -325,15 +325,23 @@ this file.
.. image:: ../data/rocprof-sys-perfetto.png
:alt: Visualization of a performance graph in Perfetto
:width: 800
.. image:: ../data/rocprof-sys-rocm.png
:alt: Visualization of ROCm data in Perfetto
:width: 800
.. image:: ../data/rocprof-sys-rocm-flow.png
:alt: Visualization of ROCm flow data in Perfetto
:width: 800
.. image:: ../data/rocprof-sys-user-api.png
:alt: Visualization of ROCm API calls in Perfetto
:width: 800
.. image:: ../data/rocprof-sys-gpu-metrics.png
:alt: Visualization of ROCm GPU metrics in Perfetto
:width: 800
Timemory output
========================================
@@ -70,7 +70,7 @@ Other modes of use, such as sampling and causal profiling, are not dependent on
might be more portable.
Installing ROCm Systems Profiler from binary distributions
================================================
==========================================================
Every ROCm Systems Profiler release provides binary installer scripts of the form:
@@ -112,11 +112,11 @@ To install ROCm Systems Profiler using a binary installer script, follow these s
./rocprofiler-systems-1.0.0-ubuntu-18.04-ROCm-405000-OMPT-PAPI.sh --prefix=/opt/rocprofiler-systems --exclude-subdir
Installing ROCm Systems Profiler from source
========================================
Building ROCm Systems Profiler from source
==========================================
ROCm Systems Profiler needs a GCC compiler with full support for C++17 and CMake v3.16 or higher.
The Clang compiler may be used in lieu of the GCC compiler if `Dyninst <https://github.com/dyninst/dyninst>`_
The Clang compiler may be used instead of the GCC compiler if `Dyninst <https://github.com/dyninst/dyninst>`_
is already installed.
Build requirements
@@ -160,7 +160,6 @@ while Dyninst requires TBB), and the CMake option to build the package alongside
.. csv-table::
:header: "Third-Party Library", "Minimum Version", "Required By", "CMake Option"
:widths: 15, 10, 12, 40
"Dyninst", "12.0", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_DYNINST`` (default: OFF)"
"Libunwind", "", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_LIBUNWIND`` (default: ON)"
@@ -176,9 +175,8 @@ Optional third-party packages
* `ROCm <https://rocm.docs.amd.com/projects/install-on-linux/en/latest>`_
* HIP
* Roctracer for HIP API and kernel tracing
* ROCM-SMI for GPU monitoring
* Rocprofiler for GPU hardware counters
* ROCm SMI Lib for GPU monitoring
* ROCprofiler SDK for GPU hardware counters and ROCm tracing
* `PAPI <https://icl.utk.edu/papi/>`_
* MPI
@@ -237,12 +235,14 @@ Installing Dyninst via Spack
spack install --reuse dyninst
spack load -r dyninst
Installing ROCm Systems Profiler
-----------------------------------
.. _cmake-options:
Building and installing ROCm Systems Profiler
---------------------------------------------
ROCm Systems Profiler has CMake configuration options for MPI support (``ROCPROFSYS_USE_MPI`` or
``ROCPROFSYS_USE_MPI_HEADERS``), HIP kernel tracing (``ROCPROFSYS_USE_ROCTRACER``),
ROCm device sampling (``ROCPROFSYS_USE_ROCM_SMI``), OpenMP-Tools (``ROCPROFSYS_USE_OMPT``),
``ROCPROFSYS_USE_MPI_HEADERS``),
ROCm tracing and sampling (``ROCPROFSYS_USE_ROCM``), OpenMP-Tools (``ROCPROFSYS_USE_OMPT``),
hardware counters via PAPI (``ROCPROFSYS_USE_PAPI``), among other features.
Various additional features can be enabled via the
``TIMEMORY_USE_*`` `CMake options <https://timemory.readthedocs.io/en/develop/installation.html#cmake-options>`_.
@@ -256,27 +256,56 @@ in `the Perfetto UI <https://ui.perfetto.dev>`_.
.. code-block:: shell
git clone https://github.com/ROCm/rocprofiler-systems.git rocprof-sys-source
cmake \
-B rocprof-sys-build \
cmake \
-B rocprof-sys-build \
-D CMAKE_INSTALL_PREFIX=/opt/rocprofiler-systems \
-D ROCPROFSYS_USE_HIP=ON \
-D ROCPROFSYS_USE_ROCM_SMI=ON \
-D ROCPROFSYS_USE_ROCTRACER=ON \
-D ROCPROFSYS_USE_PYTHON=ON \
-D ROCPROFSYS_USE_OMPT=ON \
-D ROCPROFSYS_USE_MPI_HEADERS=ON \
-D ROCPROFSYS_BUILD_PAPI=ON \
-D ROCPROFSYS_BUILD_LIBUNWIND=ON \
-D ROCPROFSYS_BUILD_DYNINST=ON \
-D DYNINST_BUILD_TBB=ON \
-D DYNINST_BUILD_BOOST=ON \
-D DYNINST_BUILD_ELFUTILS=ON \
-D DYNINST_BUILD_LIBIBERTY=ON \
-D ROCPROFSYS_USE_ROCM=ON \
-D ROCPROFSYS_USE_PYTHON=ON \
-D ROCPROFSYS_USE_OMPT=ON \
-D ROCPROFSYS_USE_MPI_HEADERS=ON \
-D ROCPROFSYS_BUILD_PAPI=ON \
-D ROCPROFSYS_BUILD_LIBUNWIND=ON \
-D ROCPROFSYS_BUILD_DYNINST=ON \
-D DYNINST_BUILD_TBB=ON \
-D DYNINST_BUILD_BOOST=ON \
-D DYNINST_BUILD_ELFUTILS=ON \
-D DYNINST_BUILD_LIBIBERTY=ON \
rocprof-sys-source
cmake --build rocprof-sys-build --target all --parallel 8
cmake --build rocprof-sys-build --target install
source /opt/rocprofiler-systems/share/rocprofiler-systems/setup-env.sh
.. _build-script:
Using the build script
^^^^^^^^^^^^^^^^^^^^^^
This method automates the CMake process with a script that wraps the CMake
commands and handles build logic, environment variables, and packaging. Run
``./scripts/build-release.sh`` with your desired options to generate packages.
Use ``./scripts/build-release.sh --help`` for more information.
.. code-block:: shell-session
./scripts/build-release.sh --help
Options:
--core [+nopython] [+python] Core (Use '+nopython' to build w/o python, use '+python' to python build with python)
--mpi [+nopython] [+python] MPI (Use '+nopython' to build w/o python, use '+python' to python build with python)
--rocm [+nopython] [+python] ROCm (Use '+nopython' to build w/o python, use '+python' to python build with python)
--rocm-mpi [+nopython] [+python] ROCm + MPI (Use '+nopython' to build w/o python, use '+python' to python build with python)
--mpi-impl [openmpi|mpich] MPI implementation
--lto [on|off] Enable LTO (default: off)
--strip [on|off] Strip libraries (default: off)
--perfetto-tools [on|off] Install perfetto tools (default: on)
--static-libgcc [on|off] Build with static libgcc (default: on)
--static-libstdcxx [on|off] Build with static libstdc++ (default: on)
--hidden-visibility [on|off] Build with hidden visibility (default: on)
--max-threads N Max number of threads supported (default: 2048)
--parallel N Number of parallel build jobs (default: 12)
--generators [STGZ][DEB][RPM][+others] CPack generators (default: stgz deb rpm)
.. _mpi-support-rocprof-sys:
MPI support within ROCm Systems Profiler
@@ -306,6 +335,20 @@ ROCm Systems Profiler on an application built against OpenMPI causes a segmentat
This happens because the value of the ``MPI_COMM_WORLD`` is truncated
during the function wrapping before being passed along to the underlying MPI function.
ROCm Systems Profiler without ROCm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To build ROCm Systems Profiler for use on systems without a GPU or the ROCm runtime, disable ROCm
support using the CMake configuration option ``ROCPROFSYS_USE_ROCM=OFF``. See :ref:`cmake-options`
for more information.
Alternatively, use the provided build script with the appropriate options. See :ref:`build-script`.
For example, to build without ROCm support and create a STGZ installer, use the following command:
.. code-block:: shell
./scripts/build-release.sh --core +python --generators STGZ
.. _post-installation-steps:
Post-installation steps
@@ -410,4 +453,5 @@ Configuring PAPI to collect hardware counters
To use PAPI to collect the majority of hardware counters, ensure
the ``/proc/sys/kernel/perf_event_paranoid`` setting has a value less than or equal to ``2``.
For more information, see the :ref:`rocprof-sys_papi_events` section.
For more information, see the :ref:`rocprof-sys_papi_events` section.
@@ -1 +1 @@
rocm-docs-core[api_reference]==1.11.0
rocm-docs-core[api_reference]==1.12.0
@@ -129,7 +129,7 @@ requests==2.32.3
# via
# pygithub
# sphinx
rocm-docs-core[api-reference]==1.11.0
rocm-docs-core[api-reference]==1.12.0
# via -r requirements.in
six==1.16.0
# via python-dateutil