[rocprof-sys] Add documentation for building with multiple Python versions (#1870)

* Adding support to build ROCm with Multiple Python Environments

* Update install.rst

* Update projects/rocprofiler-systems/docs/install/install.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update projects/rocprofiler-systems/docs/install/install.rst

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated documentation to align with instuctions in `profiling-python-scripts.rst`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: David Galiffi <David.Galiffi@amd.com>
Este commit está contenido en:
anujshuk-amd
2025-11-20 04:48:53 +05:30
cometido por GitHub
padre da6e939c6c
commit d36b8ec66d
@@ -111,6 +111,7 @@ while Dyninst requires TBB), and the CMake option to build the package alongside
"Dyninst", "13.0", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_DYNINST`` (default: OFF)"
"Libunwind", "", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_LIBUNWIND`` (default: ON)"
"Nlohmann/JSON", "", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_NLOHMANN_JSON`` (default: ON)"
"SQLite", "", "ROCm Systems Profiler", "``ROCPROFSYS_BUILD_SQLITE`` (default: OFF)"
"TBB", "2018.6", "Dyninst", "``ROCPROFSYS_BUILD_TBB`` (default: OFF)"
"ElfUtils", "0.178", "Dyninst", "``ROCPROFSYS_BUILD_ELFUTILS`` (default: OFF)"
@@ -126,6 +127,10 @@ Optional third-party packages
* AMD SMI Lib for GPU monitoring
* ROCprofiler SDK for GPU hardware counters and ROCm tracing
* Python
* ``ROCPROFSYS_USE_PYTHON`` enables Python support.
* `PAPI <https://icl.utk.edu/papi/>`_
* MPI
@@ -283,6 +288,23 @@ 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.
Python support within ROCm Systems Profiler
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ROCm Systems Profiler supports profiling Python code via the ``ROCPROFSYS_USE_PYTHON`` CMake option.
Python support is enabled via the ``ROCPROFSYS_USE_PYTHON`` and the
``ROCPROFSYS_PYTHON_VERSIONS="<MAJOR>.<MINOR>`` CMake options.
Alternatively, to build multiple Python versions, use
``ROCPROFSYS_PYTHON_VERSIONS="<MAJOR>.<MINOR>;[<MAJOR>.<MINOR>]"``,
and ``ROCPROFSYS_PYTHON_ROOT_DIRS="/path/to/version;[/path/to/version]"`` instead of just ``ROCPROFSYS_PYTHON_VERSIONS``.
When building multiple Python versions, the length of the ``ROCPROFSYS_PYTHON_VERSIONS``
and ``ROCPROFSYS_PYTHON_ROOT_DIRS`` lists must
be the same size.
.. code-block:: shell
cmake --preset release -D ROCPROFSYS_PYTHON_ROOT_DIRS="/usr/bin;/usr/bin" -D ROCPROFSYS_PYTHON_VERSIONS="3.10;3.12"
ROCm Systems Profiler without ROCm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^