Skip to content

Commit b3ff4cd

Browse files
fix observer documentation, issue #205
1 parent 0ed2893 commit b3ff4cd

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

doc/source/observers.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ observer will be called when the event takes place.
1212

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

56-
.. autoclass:: kernel_tuner.observers.PowerSensorObserver
56+
.. autoclass:: kernel_tuner.observers.powersensor.PowerSensorObserver
5757

5858

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

77-
.. autoclass:: kernel_tuner.nvml.NVMLObserver
77+
.. autoclass:: kernel_tuner.observers.nvml.NVMLObserver
7878

7979

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

103103

104+
PMTObserver
105+
~~~~~~~~~~~
104106

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

106113

107114

kernel_tuner/observers/pmt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@
1212
class PMTObserver(BenchmarkObserver):
1313
"""Observer that uses the PMT library to measure power
1414
15-
:param observables: One of:
15+
:param observables:
16+
One of:
17+
1618
- A string specifying a single power meter to use
1719
- A list of string, specifying one or more power meters to use
1820
- A dictionary, specifying one or more power meters to use,
1921
including the device identifier. For arduino this should be for
2022
instance "/dev/ttyACM0". For nvml, it should correspond to the GPU
2123
id (e.g. '0', or '1'). For some sensors (such as rapl) the device
2224
id is not used, it should be 'None' in those cases.
25+
2326
This observer will report "<platform>_energy>" and "<platform>_power" for
2427
all specified platforms.
28+
2529
:type observables: string,list/dictionary
2630
2731
"""

0 commit comments

Comments
 (0)