Skip to content

Commit

Permalink
modularize modes and global options
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Jun Park <peter.park@amd.com>
  • Loading branch information
peterjunpark committed Jun 17, 2024
1 parent 265d92b commit 96f7305
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 83 deletions.
20 changes: 20 additions & 0 deletions docs/how-to/includes/global-options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _global-options:

Global options
==============

The Omniperf command line tool has a set of *global* utility options that are
available across all modes.

``-v``, ``--version``
Prints the Omniperf version and exits.

``-V``, ``--verbose``
Increases output verbosity. Use multiple times for higher levels of
verbosity.

``-q``, ``--quiet``
Reduces output verbosity and runs quietly.

``-s``, ``--specs``
Prints system specs and exits.
Empty file added docs/how-to/includes/modes.rst
Empty file.
85 changes: 2 additions & 83 deletions docs/how-to/use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,90 +104,9 @@ To interact with Grafana data, stored in the Omniperf database, enter
$ omniperf database --import [CONNECTION OPTIONS]
.. _modes:
.. include:: ./includes/modes.rst

Modes
=====

Modes change the fundamental behavior of the Omniperf command line tool.
Depending on which mode you choose, different command line options become
available.

.. _modes-profile:

Profile mode
------------

``profile``
Launches the target application on the local system using
:doc:`ROCProfiler <rocprofiler:index>`. Depending on the profiling options
chosen, selected kernels, dispatches, and or hardware components used by the
application are profiled. It stores results locally in an output folder:
``./workloads/\<name>``.

.. code-block:: shell
$ omniperf profile --help
.. _modes-analyze:

Analyze mode
------------

``analyze``
Loads profiling data from the ``--path`` (``-p``) directory into the Omniperf
CLI analyzer where you have immediate access to profiling results and
generated metrics. It generates metrics from the entirety of your profiled
application or a subset identified through the Omniperf CLI analysis filters.

To generate a lightweight GUI interface, you can add the `--gui` flag to your
analysis command.

This mode is a middle ground to the highly detailed Omniperf Grafana GUI and
is great if you want immediate access to a hardware component you’re already
familiar with.

.. code-block:: shell
$ omniperf analyze --help
.. _modes-database:

Database mode
-------------

``database``
The :doc:`Grafana GUI dashboard <../install/grafana-setup>` is built on a
MongoDB database. ``--import`` profiling results to the DB to interact with
the workload in Grafana or `--remove` the workload from the DB.

Connection options need to be specified. See :ref:`grafana-gui-import` for
more details.

.. code-block:: shell
$ omniperf database --help
.. _global-options:

Global options
==============

The Omniperf command line tool has a set of *global* utility options that are
available across all modes.

``-v``, ``--version``
Prints the Omniperf version and exits.

``-V``, ``--verbose``
Increases output verbosity. Use multiple times for higher levels of
verbosity.

``-q``, ``--quiet``
Reduces output verbosity and runs quietly.

``-s``, ``--specs``
Prints system specs and exits.
.. include:: ./includes/global-options.rst

.. note::

Expand Down

0 comments on commit 96f7305

Please sign in to comment.