Skip to content

Commit 092480a

Browse files
committed
doc: extend instructions on benchdnn validation
1 parent abcaee1 commit 092480a

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

CONTRIBUTING.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,17 @@ following information:
137137
oneDNN uses gtests for lightweight functional testing and benchdnn for
138138
performance and functional testing.
139139

140-
Be sure to extend the existing tests when fixing an issue.
140+
Verify the modified code is covered by existing tests. If not, update the
141+
coverage to validate the change and sumbit it as a part of the PR.
141142

142-
Developing new benchdnn tests can be hard, so it is a good idea to start with
143-
gtests first.
143+
Use the following command to run tests selected by a build configuration:
144+
``` sh
145+
ctest
146+
```
147+
148+
To modify the coverage, use the
149+
[`ONEDNN_TEST_SET`](https://oneapi-src.github.io/oneDNN/dev_guide_build_options.html#onednn-test-set)
150+
build option.
151+
152+
More details on how to run benchdnn can be found in
153+
[benchdnn documentation](tests/benchdnn/doc/benchdnn_general_info.md#running-tests).

tests/benchdnn/doc/benchdnn_general_info.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ Returns `1` if any submitted tests returned status `FAILED` or `UNIMPLEMENTED`,
1616

1717
## Running Tests
1818

19-
oneDNN comes with its own testing infrastructure enabled through CMake. Tests
20-
can be executed via the command:
19+
oneDNN comes with its own testing infrastructure enabled through CMake.
20+
If the project is built with `DNNL_BUILD_TESTS` set to `TRUE`, then Cmake will
21+
add test targets automatically.
22+
Targets can be triggered by the following command:
2123
``` sh
22-
make test_<test-name>
24+
ctest [-R ".*benchdnn.*"]
2325
```
24-
This instructs CMake to build a deployable project and run the specific test.
25-
26-
These tests target specific oneDNN features and are based on benchdnn
27-
configurable executions.
26+
, where the content in brackets is optional and limits testing to benchdnn only.
27+
The pattern can be extended further for finer granularity.
2828

2929
The available tests can be found in the oneDNN directory:
30-
tests/benchdnn/inputs/<driver>/<test-name>.
30+
tests/benchdnn/inputs/
3131

3232
## Glossary
3333

0 commit comments

Comments
 (0)