Skip to content
Braden Stefanuk edited this page Sep 30, 2024 · 11 revisions

This page is deprecated as of 2024-06-14 and will be removed for ROCm 6.4. New documentation is being created to replace it.

Tensile offers multiple test suites- Host Library Tests, and Unit Tests. There's also support for linting and format checking.

Required Dependencies

To build and run the tests, you need to install googletest (libgtest-dev), tox, python3-setuptools, python3-yaml, python3-pytest

Linting and Format Checking

Format checking is done via a pre-commit Perl script available in .githooks/pre-commit. Linting can be done by running lint inside of tox, or running pylint.

tox --workdir /tmp/.tensile-tox -e lint

Host Library Tests

Host Library Tests can be built and ran using the following commands:

 mkdir build && cd build
 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc -DCODE_OBJECT_VERSION=default -DTensile_ROOT=$(pwd)/../Tensile ../HostLibraryTests
 make -j
 ./TensileTests 

Unit Tests

Unit Tests are ran using the virtual testing environment tool called tox. There are 2 main filters: pre_checkin, and extended. Be sure to run pre_checkin tests locally before opening a PR.

tox --workdir test_dir -e ci -- -m pre_checkin