bump rocm-docs-core to 1.8.2
rm unused files
rm stale docs
fix sphinx conf
reorg docs
SWDEV-482203 -- add note to usage guides
update readmes
Change-Id: I9e0111ac8fe2a691ac964b27436ba47747c27904
Signed-off-by: Peter Park <Peter.Park@amd.com>
[ROCm/amdsmi commit: e196f98dba]
2.9 KiB
myst
| myst | ||||||
|---|---|---|---|---|---|---|
|
Building AMD SMI
This section describes the prerequisites and steps to build AMD SMI from source.
(build_reqs)=
Required software
To build the AMD SMI library, the following components are required. Note that the software versions specified were used during development; earlier versions are not guaranteed to work.
- CMake (v3.14.0 or later) --
python3 -m pip install cmake - g++ (v5.4.0 or later)
In order to build the AMD SMI Python package, the following components are required:
- Python (3.6.8 or later)
- prerequisite modules:
- python3-wheel
- python3-setuptools
- prerequisite modules:
- virtualenv --
python3 -m pip install virtualenv
Build steps
-
Clone the AMD SMI repository to your local Linux machine.
git clone https://github.com/ROCm/amdsmi.git -
The default installation location for the library and headers is
/opt/rocm. Before installation, any old ROCm directories should be deleted:/opt/rocm/opt/rocm-<version_number>
-
Build the library by following the typical CMake build sequence (run as root user or use
sudobeforemake installcommand); for instance:mkdir -p build cd build cmake .. make -j $(nproc) make installThe built library is located in the
build/directory. To build therpmanddebpackages use the following command:make package
(rebuild_py_wrapper)=
Rebuild the Python wrapper
The Python wrapper for the AMD SMI library is found in the auto-generated
file py-interface/amdsmi_wrapper.py. It is essential to
regenerate this wrapper whenever there are changes to the C++ API. It is not
regenerated automatically.
To regenerate the wrapper, use the following command.
./update_wrapper.sh
After this command, the file in py-interface/amdsmi_wrapper.py will be updated
on compile.
You need Docker installed on your system to regenerate the Python wrapper.
(build_tests)=
Build the tests
To verify the build and capabilities of AMD SMI on your system, as well as to see practical examples of its usage, you can build and run the available tests in the repository. Follow these steps to build the tests:
mkdir -p build
cd build
cmake -DBUILD_TESTS=ON ..
make -j $(nproc)
(run_tests)=
Run the tests
Once the tests are built, you can run them by executing the
amdsmitst program. The executable can be found at build/tests/amd_smi_test/.
(build_docs)=
Build the docs
To build the documentation, follow the instructions at Building documentation.