Skip to content

Commit

Permalink
fix observer documentation, issue #205
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanwerkhoven committed Jun 1, 2023
1 parent 0ed2893 commit b3ff4cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 10 additions & 3 deletions doc/source/observers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ observer will be called when the event takes place.

Kernel Tuner implements an abstract BenchmarkObserver with methods that may be overwritten by classes extending
the BenchmarkObserver class, shown below. The only mandatory method to implement
is ``get\_results``, which is used to return the resulting observations at the end of benchmarking a
is ``get_results``, which is used to return the resulting observations at the end of benchmarking a
particular kernel configuration and usually returns aggregated results over multiple iterations of kernel
execution. Before tuning starts, each observer is given a reference to the lower-level backend that is used for
compiling and benchmarking the kernel configurations. In this way, the observer can inspect the compiled module,
Expand Down Expand Up @@ -53,7 +53,7 @@ the user to record power and/or energy consumption of kernel configurations duri
Kernel Tuner to accurately determine the power and energy consumption of all kernel configurations it benchmarks
during auto-tuning.

.. autoclass:: kernel_tuner.observers.PowerSensorObserver
.. autoclass:: kernel_tuner.observers.powersensor.PowerSensorObserver


NVMLObserver
Expand All @@ -74,7 +74,7 @@ time it takes to benchmark different kernel configurations. However, NVML can be
almost all Nvidia GPUs, so this method is much more accessible to end-users compared to solutions that require
custom hardware, such as PowerSensor2.

.. autoclass:: kernel_tuner.nvml.NVMLObserver
.. autoclass:: kernel_tuner.observers.nvml.NVMLObserver


Tuning execution parameters with NVML
Expand All @@ -101,7 +101,14 @@ the path where you are allowed to run nvidia-smi with privileges. This allows yo
limits will be done through nvidia-smi.


PMTObserver
~~~~~~~~~~~

The PMTObserver can be used to measure power and energy on various platforms including Nvidia Jetson, Nvidia NVML,
the RAPL interface, AMD ROCM, and Xilinx. It requires PMT to be installed, as well as the PMT's Python interface.
More information about PMT can be found here: https://git.astron.nl/RD/pmt/

.. autoclass:: kernel_tuner.observers.pmt.PMTObserver



6 changes: 5 additions & 1 deletion kernel_tuner/observers/pmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
class PMTObserver(BenchmarkObserver):
"""Observer that uses the PMT library to measure power
:param observables: One of:
:param observables:
One of:
- A string specifying a single power meter to use
- A list of string, specifying one or more power meters to use
- A dictionary, specifying one or more power meters to use,
including the device identifier. For arduino this should be for
instance "/dev/ttyACM0". For nvml, it should correspond to the GPU
id (e.g. '0', or '1'). For some sensors (such as rapl) the device
id is not used, it should be 'None' in those cases.
This observer will report "<platform>_energy>" and "<platform>_power" for
all specified platforms.
:type observables: string,list/dictionary
"""
Expand Down

0 comments on commit b3ff4cd

Please sign in to comment.