Update documentation and add python API documentation
Change-Id: Ibccf5b6a5fba81cea42e04a022deac8a3207b9b8
[ROCm/rocm_smi_lib commit: 50a079af0f]
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
====================
|
||||
C++ Tutorials
|
||||
====================
|
||||
|
||||
This chapter contains the ROCm SMI C++ API tutorials.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#include <stdint.h>
|
||||
#include "rocm_smi/rocm_smi.h"
|
||||
int main() {
|
||||
|
||||
rsmi_status_t ret;
|
||||
uint32_t num_devices;
|
||||
uint16_t dev_id;
|
||||
|
||||
// We will skip return code checks for this example, but it
|
||||
// is recommended to always check this as some calls may not
|
||||
// apply for some devices or ROCm releases
|
||||
|
||||
ret = rsmi_init(0);
|
||||
ret = rsmi_num_monitor_devices(&num_devices);
|
||||
|
||||
for (int i=0; i < num_devices; ++i) {
|
||||
ret = rsmi_dev_id_get(i, &dev_id);
|
||||
// dev_id holds the device ID of device i, upon a
|
||||
// successful call
|
||||
}
|
||||
ret = rsmi_shut_down();
|
||||
return 0;
|
||||
}
|
||||
|
||||
For more examples please check the `C++ example <https://github.com/ROCm/rocm_smi_lib/blob/develop/rocm_smi/example/rocm_smi_example.cc>`_
|
||||
or `tests. <https://github.com/ROCm/rocm_smi_lib/tree/develop/tests/rocm_smi_test/functional>`_
|
||||
@@ -0,0 +1,2 @@
|
||||
```{include} ../README.md
|
||||
```
|
||||
@@ -5,9 +5,18 @@
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import re
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from rocm_docs import ROCmDocs
|
||||
|
||||
# We need to add the location of the rocrand Python module to the PATH
|
||||
# in order to build the documentation of that module
|
||||
docs_dir_path = pathlib.Path(__file__).parent
|
||||
python_dir_path = docs_dir_path.parent / 'python_smi_tools'
|
||||
sys.path.append(str(python_dir_path))
|
||||
|
||||
with open('../CMakeLists.txt', encoding='utf-8') as f:
|
||||
match = re.search(r'get_package_version_number\(\"?([0-9.]+)[^0-9.]+', f.read())
|
||||
if not match:
|
||||
@@ -15,6 +24,8 @@ with open('../CMakeLists.txt', encoding='utf-8') as f:
|
||||
version_number = match[1]
|
||||
left_nav_title = f"ROCm SMI LIB {version_number} Documentation"
|
||||
|
||||
shutil.copy2('../CHANGELOG.md','./CHANGELOG.md')
|
||||
|
||||
# for PDF output on Read the Docs
|
||||
project = "ROCm SMI LIB Documentation"
|
||||
author = "Advanced Micro Devices, Inc."
|
||||
@@ -31,5 +42,9 @@ docs_core.setup()
|
||||
|
||||
external_projects_current_project = "rocm_smi_lib"
|
||||
|
||||
suppress_warnings = ["etoc.toctree"]
|
||||
|
||||
for sphinx_var in ROCmDocs.SPHINX_VARS:
|
||||
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
|
||||
|
||||
extensions += ['sphinx.ext.mathjax']
|
||||
@@ -81,17 +81,6 @@ OUTPUT_DIRECTORY = .
|
||||
|
||||
CREATE_SUBDIRS = NO
|
||||
|
||||
# Controls the number of sub-directories that will be created when
|
||||
# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
|
||||
# level increment doubles the number of directories, resulting in 4096
|
||||
# directories at level 8 which is the default and also the maximum value. The
|
||||
# sub-directories are organized in 2 levels, the first level always has a fixed
|
||||
# number of 16 directories.
|
||||
# Minimum value: 0, maximum value: 8, default value: 8.
|
||||
# This tag requires that the tag CREATE_SUBDIRS is set to YES.
|
||||
|
||||
CREATE_SUBDIRS_LEVEL = 8
|
||||
|
||||
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
||||
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
||||
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
|
||||
@@ -231,14 +220,6 @@ QT_AUTOBRIEF = NO
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
@@ -464,19 +445,6 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which effectively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -540,12 +508,6 @@ EXTRACT_LOCAL_METHODS = NO
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If this flag is set to YES, the name of an unnamed parameter in a declaration
|
||||
# will be determined by the corresponding definition. By default unnamed
|
||||
# parameters remain unnamed in the output.
|
||||
# The default value is: YES.
|
||||
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
@@ -616,12 +578,6 @@ HIDE_SCOPE_NAMES = NO
|
||||
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
|
||||
# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
|
||||
# will show which file needs to be included to use the class.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_HEADERFILE = YES
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
|
||||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
@@ -833,13 +789,6 @@ WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
|
||||
# function parameter documentation. If set to NO, doxygen will accept that some
|
||||
# parameters have no documentation without warning.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong parameter
|
||||
@@ -850,14 +799,6 @@ WARN_IF_INCOMPLETE_DOC = YES
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
|
||||
# undocumented enumeration values. If set to NO, doxygen will accept
|
||||
# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
|
||||
# will automatically be disabled.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_IF_UNDOC_ENUM_VAL = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
|
||||
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
|
||||
@@ -878,16 +819,6 @@ WARN_AS_ERROR = NO
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# In the $text part of the WARN_FORMAT command it is possible that a reference
|
||||
# to a more specific place is given. To make it easier to jump to this place
|
||||
# (outside of doxygen) the user can define a custom "cut" / "paste" string.
|
||||
# Example:
|
||||
# WARN_LINE_FORMAT = "'vi $file +$line'"
|
||||
# See also: WARN_FORMAT
|
||||
# The default value is: at line $line of file $file.
|
||||
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
||||
# messages should be written. If left blank the output is written to standard
|
||||
# error (stderr). In case the file specified cannot be opened for writing the
|
||||
@@ -907,8 +838,7 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = ../../README.md \
|
||||
../../include/rocm_smi/rocm_smi.h
|
||||
INPUT = ../../include/rocm_smi/rocm_smi.h
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -920,16 +850,6 @@ INPUT = ../../README.md \
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
|
||||
# character encoding on a per file pattern basis. Doxygen will compare the file
|
||||
# name with each pattern and apply the encoding instead of the default
|
||||
# INPUT_ENCODING) if there is a match. The character encodings are a list of the
|
||||
# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
|
||||
# "INPUT_ENCODING" for further information on supported encodings.
|
||||
|
||||
INPUT_FILE_ENCODING =
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories.
|
||||
@@ -1077,16 +997,7 @@ FILTER_SOURCE_PATTERNS =
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE = ../../README.md
|
||||
|
||||
# The Fortran standard specifies that for fixed formatted Fortran code all
|
||||
# characters from position 72 are to be considered as comment. A common
|
||||
# extension is to allow longer lines before the automatic comment starts. The
|
||||
# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
|
||||
# be processed before the automatic comment starts.
|
||||
# Minimum value: 7, maximum value: 10000, default value: 72.
|
||||
|
||||
FORTRAN_COMMENT_AFTER = 72
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
@@ -1288,19 +1199,6 @@ HTML_EXTRA_STYLESHEET = ../_doxygen/extra_stylesheet.css
|
||||
|
||||
HTML_EXTRA_FILES =
|
||||
|
||||
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
|
||||
# should be rendered with a dark or light theme.
|
||||
# Possible values are: LIGHT always generate light mode output, DARK always
|
||||
# generate dark mode output, AUTO_LIGHT automatically set the mode according to
|
||||
# the user preference, use light mode if no preference is set (the default),
|
||||
# AUTO_DARK automatically set the mode according to the user preference, use
|
||||
# dark mode if no preference is set and TOGGLE allow to user to switch between
|
||||
# light and dark mode via a button.
|
||||
# The default value is: AUTO_LIGHT.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE = AUTO_LIGHT
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a color-wheel, see
|
||||
@@ -1395,13 +1293,6 @@ GENERATE_DOCSET = NO
|
||||
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
|
||||
# This tag determines the URL of the docset feed. A documentation feed provides
|
||||
# an umbrella under which multiple documentation sets from a single provider
|
||||
# (such as a company or product suite) can be grouped.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_FEEDURL =
|
||||
|
||||
# This tag specifies a string that should uniquely identify the documentation
|
||||
# set bundle. This should be a reverse domain-name style string, e.g.
|
||||
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
|
||||
@@ -1601,18 +1492,6 @@ DISABLE_INDEX = NO
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
|
||||
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
|
||||
# area (value NO) or if it should extend to the full height of the window (value
|
||||
# YES). Setting this to YES gives a layout similar to
|
||||
# https://docs.readthedocs.io with more room for contents, but less room for the
|
||||
# project logo, title, and description. If either GENERATE_TREEVIEW or
|
||||
# DISABLE_INDEX is set to NO, this option has no effect.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FULL_SIDEBAR = NO
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
#
|
||||
@@ -1637,24 +1516,6 @@ TREEVIEW_WIDTH = 250
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
|
||||
# addresses.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
OBFUSCATE_EMAILS = YES
|
||||
|
||||
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
@@ -1681,17 +1542,6 @@ FORMULA_MACROFILE =
|
||||
|
||||
USE_MATHJAX = NO
|
||||
|
||||
# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
|
||||
# Note that the different versions of MathJax have different requirements with
|
||||
# regards to the different settings, so it is possible that also other MathJax
|
||||
# settings have to be changed when switching between the different MathJax
|
||||
# versions.
|
||||
# Possible values are: MathJax_2 and MathJax_3.
|
||||
# The default value is: MathJax_2.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_VERSION = MathJax_2
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. For more details about the output format see MathJax
|
||||
# version 2 (see:
|
||||
@@ -2379,36 +2229,6 @@ HAVE_DOT = NO
|
||||
|
||||
DOT_NUM_THREADS = 0
|
||||
|
||||
# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
|
||||
# subgraphs. When you want a differently looking font in the dot files that
|
||||
# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
|
||||
# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
|
||||
# Edge and Graph Attributes specification</a> You need to make sure dot is able
|
||||
# to find the font, which can be done by putting it in a standard location or by
|
||||
# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
|
||||
# directory containing the font. Default graphviz fontsize is 14.
|
||||
# The default value is: fontname=Helvetica,fontsize=10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
|
||||
|
||||
# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
|
||||
# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
|
||||
# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
|
||||
# arrows shapes.</a>
|
||||
# The default value is: labelfontname=Helvetica,labelfontsize=10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
|
||||
|
||||
# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
|
||||
# around nodes set 'shape=plain' or 'shape=plaintext' <a
|
||||
# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
|
||||
# The default value is: shape=box,height=0.2,width=0.4.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
|
||||
|
||||
# You can set the path where dot can find font specified with fontname in
|
||||
# DOT_COMMON_ATTR and others dot attributes.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
@@ -2464,28 +2284,6 @@ UML_LOOK = NO
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
|
||||
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
|
||||
# tag is set to YES, doxygen will add type and arguments for attributes and
|
||||
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
|
||||
# will not generate fields with class member information in the UML graphs. The
|
||||
# class diagrams will look similar to the default class diagrams but using UML
|
||||
# notation for the relationships.
|
||||
# Possible values are: NO, YES and NONE.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
DOT_UML_DETAILS = NO
|
||||
|
||||
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
|
||||
# to display on a single line. If the actual line length exceeds this threshold
|
||||
# significantly it will wrapped across multiple lines. Some heuristics are apply
|
||||
# to avoid ugly line breaks.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 17.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
# instances.
|
||||
@@ -2552,13 +2350,6 @@ GRAPHICAL_HIERARCHY = YES
|
||||
|
||||
DIRECTORY_GRAPH = YES
|
||||
|
||||
# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
|
||||
# of child directories generated in directory dependency graphs by dot.
|
||||
# Minimum value: 1, maximum value: 25, default value: 1.
|
||||
# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
|
||||
|
||||
DIR_GRAPH_MAX_DEPTH = 1
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
# output formats in the documentation of the dot tool (Graphviz (see:
|
||||
|
||||
@@ -0,0 +1,269 @@
|
||||
====================
|
||||
Python API Reference
|
||||
====================
|
||||
|
||||
This chapter describes the ROCm SMI Python module API.
|
||||
|
||||
.. default-domain:: py
|
||||
.. py:currentmodule:: rocm_smi
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
.. autofunction:: rocm_smi.driverInitialized
|
||||
|
||||
.. autofunction:: rocm_smi.formatJson
|
||||
|
||||
.. autofunction:: rocm_smi.formatCsv
|
||||
|
||||
.. autofunction:: rocm_smi.formatMatrixToJSON
|
||||
|
||||
.. autofunction:: rocm_smi.getBus
|
||||
|
||||
.. autofunction:: rocm_smi.getFanSpeed
|
||||
|
||||
.. autofunction:: rocm_smi.getGpuUse
|
||||
|
||||
.. autofunction:: rocm_smi.getDRMDeviceId
|
||||
|
||||
.. autofunction:: rocm_smi.getSubsystemId
|
||||
|
||||
.. autofunction:: rocm_smi.getVendor
|
||||
|
||||
.. autofunction:: rocm_smi.getGUID
|
||||
|
||||
.. autofunction:: rocm_smi.getTargetGfxVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getNodeId
|
||||
|
||||
.. autofunction:: rocm_smi.getDeviceName
|
||||
|
||||
.. autofunction:: rocm_smi.getRev
|
||||
|
||||
.. autofunction:: rocm_smi.getMaxPower
|
||||
|
||||
.. autofunction:: rocm_smi.getMemInfo
|
||||
|
||||
.. autofunction:: rocm_smi.getProcessName
|
||||
|
||||
.. autofunction:: rocm_smi.getPerfLevel
|
||||
|
||||
.. autofunction:: rocm_smi.getPid
|
||||
|
||||
.. autofunction:: rocm_smi.getPidList
|
||||
|
||||
.. autofunction:: rocm_smi.getPower
|
||||
|
||||
.. autofunction:: rocm_smi.getRasEnablement
|
||||
|
||||
.. autofunction:: rocm_smi.getTemp
|
||||
|
||||
.. autofunction:: rocm_smi.findFirstAvailableTemp
|
||||
|
||||
.. autofunction:: rocm_smi.getTemperatureLabel
|
||||
|
||||
.. autofunction:: rocm_smi.getPowerLabel
|
||||
|
||||
.. autofunction:: rocm_smi.getVbiosVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.getMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.print2DArray
|
||||
|
||||
.. autofunction:: rocm_smi.printEmptyLine
|
||||
|
||||
.. autofunction:: rocm_smi.printErrLog
|
||||
|
||||
.. autofunction:: rocm_smi.printInfoLog
|
||||
|
||||
.. autofunction:: rocm_smi.printEventList
|
||||
|
||||
.. autofunction:: rocm_smi.printLog
|
||||
|
||||
.. autofunction:: rocm_smi.printListLog
|
||||
|
||||
.. autofunction:: rocm_smi.printLogSpacer
|
||||
|
||||
.. autofunction:: rocm_smi.printSysLog
|
||||
|
||||
.. autofunction:: rocm_smi.printTableLog
|
||||
|
||||
.. autofunction:: rocm_smi.printTableRow
|
||||
|
||||
.. autofunction:: rocm_smi.checkIfSecondaryDie
|
||||
|
||||
.. autofunction:: rocm_smi.resetClocks
|
||||
|
||||
.. autofunction:: rocm_smi.resetFans
|
||||
|
||||
.. autofunction:: rocm_smi.resetPowerOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.resetProfile
|
||||
|
||||
.. autofunction:: rocm_smi.resetXgmiErr
|
||||
|
||||
.. autofunction:: rocm_smi.resetPerfDeterminism
|
||||
|
||||
.. autofunction:: rocm_smi.resetComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.resetMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.setClockRange
|
||||
|
||||
.. autofunction:: rocm_smi.setClockExtremum
|
||||
|
||||
.. autofunction:: rocm_smi.setVoltageCurve
|
||||
|
||||
.. autofunction:: rocm_smi.setPowerPlayTableLevel
|
||||
|
||||
.. autofunction:: rocm_smi.setClockOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.setClocks
|
||||
|
||||
.. autofunction:: rocm_smi.setPerfDeterminism
|
||||
|
||||
.. autofunction:: rocm_smi.resetGpu
|
||||
|
||||
.. autofunction:: rocm_smi.isRasControlAvailable
|
||||
|
||||
.. autofunction:: rocm_smi.setRas
|
||||
|
||||
.. autofunction:: rocm_smi.setFanSpeed
|
||||
|
||||
.. autofunction:: rocm_smi.setPerformanceLevel
|
||||
|
||||
.. autofunction:: rocm_smi.setPowerOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.setProfile
|
||||
|
||||
.. autofunction:: rocm_smi.setComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.progressbar
|
||||
|
||||
.. autofunction:: rocm_smi.showProgressbar
|
||||
|
||||
.. autofunction:: rocm_smi.setMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.showVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showAllConcise
|
||||
|
||||
.. autofunction:: rocm_smi.showAllConciseHw
|
||||
|
||||
.. autofunction:: rocm_smi.showBus
|
||||
|
||||
.. autofunction:: rocm_smi.showClocks
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentClocks
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentFans
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentTemps
|
||||
|
||||
.. autofunction:: rocm_smi.showFwInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showGpusByPid
|
||||
|
||||
.. autofunction:: rocm_smi.getCoarseGrainUtil
|
||||
|
||||
.. autofunction:: rocm_smi.showGpuUse
|
||||
|
||||
.. autofunction:: rocm_smi.showEnergy
|
||||
|
||||
.. autofunction:: rocm_smi.showId
|
||||
|
||||
.. autofunction:: rocm_smi.showMaxPower
|
||||
|
||||
.. autofunction:: rocm_smi.showMemInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showMemUse
|
||||
|
||||
.. autofunction:: rocm_smi.showMemVendor
|
||||
|
||||
.. autofunction:: rocm_smi.showOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.showPcieBw
|
||||
|
||||
.. autofunction:: rocm_smi.showPcieReplayCount
|
||||
|
||||
.. autofunction:: rocm_smi.showPerformanceLevel
|
||||
|
||||
.. autofunction:: rocm_smi.showPids
|
||||
|
||||
.. autofunction:: rocm_smi.showPower
|
||||
|
||||
.. autofunction:: rocm_smi.showPowerPlayTable
|
||||
|
||||
.. autofunction:: rocm_smi.showProduct
|
||||
|
||||
.. autofunction:: rocm_smi.showProfile
|
||||
|
||||
.. autofunction:: rocm_smi.showRange
|
||||
|
||||
.. autofunction:: rocm_smi.showRasInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showRetiredPages
|
||||
|
||||
.. autofunction:: rocm_smi.showSerialNumber
|
||||
|
||||
.. autofunction:: rocm_smi.showUId
|
||||
|
||||
.. autofunction:: rocm_smi.showVbiosVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showEvents
|
||||
|
||||
.. autofunction:: rocm_smi.showDriverVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showVoltage
|
||||
|
||||
.. autofunction:: rocm_smi.showVoltageCurve
|
||||
|
||||
.. autofunction:: rocm_smi.showXgmiErr
|
||||
|
||||
.. autofunction:: rocm_smi.showAccessibleTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showWeightTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showHopsTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showTypeTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showNumaTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showHwTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showNodesBw
|
||||
|
||||
.. autofunction:: rocm_smi.showComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.showMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.checkAmdGpus
|
||||
|
||||
.. autofunction:: rocm_smi.component_str
|
||||
|
||||
.. autofunction:: rocm_smi.confirmOutOfSpecWarning
|
||||
|
||||
.. autofunction:: rocm_smi.doesDeviceExist
|
||||
|
||||
.. autofunction:: rocm_smi.initializeRsmi
|
||||
|
||||
.. autofunction:: rocm_smi.isAmdDevice
|
||||
|
||||
.. autofunction:: rocm_smi.listDevices
|
||||
|
||||
.. autofunction:: rocm_smi.load
|
||||
|
||||
.. autofunction:: rocm_smi.padHexValue
|
||||
|
||||
.. autofunction:: rocm_smi.profileString
|
||||
|
||||
.. autofunction:: rocm_smi.relaunchAsSudo
|
||||
|
||||
.. autofunction:: rocm_smi.rsmi_ret_ok
|
||||
|
||||
.. autofunction:: rocm_smi.save
|
||||
@@ -0,0 +1,29 @@
|
||||
====================
|
||||
Python Tutorials
|
||||
====================
|
||||
|
||||
This chapter is the rocm_smi Python api tutorials.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
sys.path.append("/opt/rocm/libexec/rocm_smi/")
|
||||
try:
|
||||
import rocm_smi
|
||||
except ImportError:
|
||||
raise ImportError("Could not import /opt/rocm/libexec/rocm_smi/rocm_smi.py")
|
||||
|
||||
class prof_utils:
|
||||
def __init__(self, mode) -> None:
|
||||
rocm_smi.initializeRsmi()
|
||||
|
||||
def getPower(self, device):
|
||||
return rocm_smi.getPower(device)
|
||||
|
||||
def listDevices(self):
|
||||
return rocm_smi.listDevices()
|
||||
|
||||
def getMemInfo(self, device):
|
||||
(memUsed, memTotal) = rocm_smi.getMemInfo(device, "vram")
|
||||
return round(float(memUsed)/float(memTotal) * 100, 2)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
```{include} ../python_smi_tools/README.md
|
||||
```
|
||||
@@ -5,9 +5,27 @@ defaults:
|
||||
maxdepth: 6
|
||||
root: index
|
||||
subtrees:
|
||||
- caption: API
|
||||
- caption: Tutorials
|
||||
entries:
|
||||
- file: doxygen/html/index
|
||||
- file: c++_tutorials
|
||||
title: C++ Tutorials
|
||||
- file: python_tutorials
|
||||
title: Python Tutorials
|
||||
- caption: How to Guide
|
||||
entries:
|
||||
- file: c++_usage
|
||||
title: C++ How to Guide
|
||||
- file: python_usage
|
||||
title: Python How to Guide
|
||||
- caption: Reference
|
||||
entries:
|
||||
- file: doxygen/html/index
|
||||
title: C++ Reference
|
||||
- file: python_api
|
||||
title: Python Reference
|
||||
- caption: About
|
||||
entries:
|
||||
- file: license
|
||||
title: License
|
||||
- file: CHANGELOG
|
||||
title: Changelog
|
||||
@@ -1 +1 @@
|
||||
rocm-docs-core[api_reference]>=0.30.3
|
||||
rocm-docs-core[api_reference]>=0.31.0
|
||||
|
||||
@@ -41,7 +41,7 @@ docutils==0.16
|
||||
# myst-parser
|
||||
# pydata-sphinx-theme
|
||||
# sphinx
|
||||
doxysphinx==3.3.4
|
||||
doxysphinx==3.3.7
|
||||
# via rocm-docs-core
|
||||
fastjsonschema==2.18.0
|
||||
# via rocm-docs-core
|
||||
@@ -116,7 +116,7 @@ requests==2.28.2
|
||||
# via
|
||||
# pygithub
|
||||
# sphinx
|
||||
rocm-docs-core[api_reference]>=0.30.3
|
||||
rocm-docs-core[api_reference]>=0.31.0
|
||||
# via -r requirements.in
|
||||
smmap==5.0.0
|
||||
# via gitdb
|
||||
|
||||
Reference in New Issue
Block a user