Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] add link to unit test readme and use correct github team names for maintainers #520

Merged
merged 9 commits into from
Jun 21, 2024
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,6 @@ for (int i = 0; i < loop_size; i++) ...;

## Unit Tests

oneMKL uses GoogleTest for functional testing.
oneMKL uses GoogleTest for functional testing. For more information about how to build and run Unit Tests please see [Building and Running Tests](https://oneapi-src.github.io/oneMKL/building_and_running_tests.html)
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved

Be sure to extend the existing tests when fixing an issue, adding a new interface or new implementation under existing interfaces.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,14 @@ For GitHub questions, issues, RFCs, or PRs you can contact maintainers via one o

| GitHub team name | Description |
:-----------|:------------|
| [oneMKL-maintain](https://github.com/orgs/oneapi-src/teams/onemkl-maintain) | All oneMKL maintainers |
| [oneMKL-arch-write](https://github.com/orgs/oneapi-src/teams/onemkl-arch-write) | oneMKL Architecture maintainers |
| [oneMKL-blas-write](https://github.com/orgs/oneapi-src/teams/onemkl-blas-write) | oneMKL BLAS maintainers |
| [oneMKL-dft-write](https://github.com/orgs/oneapi-src/teams/onemkl-dft-write) | oneMKL DFT maintainers |
| [oneMKL-lapack-write](https://github.com/orgs/oneapi-src/teams/onemkl-lapack-write) | oneMKL LAPACK maintainers |
| [oneMKL-rng-write](https://github.com/orgs/oneapi-src/teams/onemkl-rng-write) | oneMKL RNG maintainers |
| [oneMKL-sparse-write](https://github.com/orgs/oneapi-src/teams/onemkl-sparse-write) | oneMKL Sparse Algebra maintainers |
| [oneMKL-vm-write](https://github.com/orgs/oneapi-src/teams/onemkl-vm-write) | oneMKL Vector Math maintainers |
| @oneapi-src/onemkl-maintain | All oneMKL maintainers |
| @oneapi-src/onemkl-arch-write | oneMKL Architecture maintainers |
| @oneapi-src/onemkl-blas-write | oneMKL BLAS maintainers |
| @oneapi-src/onemkl-dft-write | oneMKL DFT maintainers |
| @oneapi-src/onemkl-lapack-write) | oneMKL LAPACK maintainers |
| @oneapi-src/onemkl-rng-write | oneMKL RNG maintainers |
| @oneapi-src/onemkl-sparse-write | oneMKL Sparse Algebra maintainers |
| @oneapi-src/onemkl-vm-write | oneMKL Vector Math maintainers |

---

Expand Down
16 changes: 14 additions & 2 deletions docs/building_and_running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,20 @@ following:
and then used in oneMKL by setting ``-REF_BLAS_ROOT=/path/to/lapack/install``
and ``-DREF_LAPACK_ROOT=/path/to/lapack/install``.

To run the tests, either use the CMake test driver, by running ``ctest``, or run
individual test binaries individually.
You can re-run tests without re-building the entire project.

To run the tests, either run test binaries individually, or use `ctest` CMake test driver program.
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: bash

# Run all tests
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved
ctest
# Run only Gpu specific tests
ctest -R Gpu
# Exclude Cpu tests
ctest -E Cpu

For more `ctest` options, refer to `ctest manual page <https://cmake.org/cmake/help/v3.13/manual/ctest.1.html>`_.
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved

When running tests you may encounter the issue ``BACKEND NOT FOUND EXCEPTION``,
you may need to add your ``<oneMKL build directory>/lib`` to your
Expand Down
34 changes: 2 additions & 32 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,9 @@
## Overview
Inside the `unit_tests` directory, there are domain-level directories which contain domain-specific tests, usually per function or per configuration.

## Steps
Functional testing is enabled by default, so all relevant functional tests will run automatically after the project is built successfully.
See [Building and Running Tests](https://oneapi-src.github.io/oneMKL/building_and_running_tests.html) documentation for more information about how to build and run the tests.

*Note: A set of `build options` define a `build configuration`. `CMake` builds and runs different set of tests depending on your `build configuration`. This is because `CMake` generates an export header file (config.hpp) for the selected build configuration. Check `<path to onemkl>/src/config.hpp.in` and `<path to onemkl>/src/CMakeLists.txt` for details. For details on how `CMake` performs export header generation, refer to [CMake documentation](https://cmake.org/cmake/help/v3.13/module/GenerateExportHeader.html).*

You can re-run tests without re-building the entire project.

#### The `CMake` Approach Works for any Generator
```bash
cmake --build . --target test
```

#### To use Generator-specific Commands:

```bash
# For ninja
ninja test
```

```bash
# For GNU Makefiles
ctest
# Test filter use case - runs only Gpu specific tests
ctest -R Gpu
# Exclude filtering use case - excludes Cpu tests
ctest -E Cpu
```

For more `ctest` options, refer to [ctest manual page](https://cmake.org/cmake/help/v3.13/manual/ctest.1.html).

## BLAS

The tests in the level\<x> directories are for the corresponding level\<x> BLAS routines. [GoogleTest](https://github.com/google/googletest) is used as the unit-testing framework.
[GoogleTest](https://github.com/google/googletest) is used as the unit-testing framework.


*Refer to `<path to onemkl>/deps/googletest/LICENSE` for GoogleTest license.*