-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Conformance tests
Conformance suites certifies plugin functionality using a set of tests with plugin specificity independent parameters. There are 2 types of conformance validation.
The suite checks OpenVINO API the folowing entities a plugin implementation (Also there are test instantiations to validate hardware plugin functionality via software plugins (e.g. MULTI
, HETERO
and etc.) for the entities):
- plugin
- compiled model (executable network)
- infer request
The other part of API conformance suite is QueryModel validation:
-
ReadIR_queryModel
tests validatesquery_model
API using simple single operation graph (Conformance IR) based on model parameters. -
OpImplCheck
tests are simple syntetic checks toquery_model
and set implementation status per an operation.
A result of apiConformanceTests
run is 2 xml files: report_api.xml
and report_opset.xml
. The first one shows OpenVINO API entities test statistic (like passed/failed/creashed/skipped/hanged test number, passrates and implementation status) per OpenVINO API entity. The second one demonstrates query_model
results per operation.
The suite validates OpenVINO an operation plugin implemenatation using simple single operation graphs (Conformance IR) taken from models. The plugin inference output is compared with reference.
The suite contains:
-
ReadIR_compareWithRefs
set allows to read IRs from folders recursive, infer it and compare plugin results with reference. -
OpImplCheckTest
set checks an operation plugin implementation status using simple syntetic single operation graph (Implemented
/Not implemented
). The suite checks onlycompile_model
without comparation with the reference.
A result of conformanceTests
run is report_opset.xml
file. It demonstrates tests statistic like pass rate, passed, crashed, skipped failed tests and plugin implementation per operation for devices.
Run the following command in build directory:
- Generate CMake project:
cmake -DENABLE_TESTS=ON -DENABLE_FUNCTIONAL_TESTS=ON ..
- Build the targets:
make --jobs=$(nproc --all) subgraphsDumper make --jobs=$(nproc --all) conformanceTests make --jobs=$(nproc --all) apiConformanceTests
- Build plugins to validate
make --jobs=$(nproc --all) lib_plugin_name
Run the following commands:
- Clone
Open Model Zoo repo
- Download all possible models using Downloader tool from the repo.
- Convert downloaded models to IR files using Converter tool from the repo.
- Run Subgraph dumper to collect unique operation set from the models.
The target is able to take the following command-line arguments:
-
-h
prints target command-line options with description. -
--device
specifies target device. -
--input_folders
specifies the input folders with IRs or '.lst' file contains IRs path. Delimiter is,
symbol. -
--plugin_lib_name
is name of plugin library. The example isopenvino_intel_cpu_plugin
. Use only with unregistered in IE Core devices. -
--disable_test_config
allows to ignore all skipped tests with the exception ofDISABLED_
prefix using. -
--skip_config_path
allows to specify paths to files contain regular expressions list to skip tests. Examples -
--config_path
allows to specify path to file contains plugin config. Example -
--extend_report
allows not to re-write device results to the report (add results of this run to the existing). Mutually exclusive with --report_unique_name. -
--report_unique_name
allows to save report with unique name (report_pid_timestamp.xml). Mutually exclusive with --extend_report. -
--save_report_timeout
allows to try to save report in cycle using timeout (in seconds). -
--output_folder
Paths to the output folder to save report. -
--extract_body
allows to count extracted operation bodies to report. -
--shape_mode
Optional. Allows to runstatic
,dynamic
or both scenarios. Default value is empty string allows to run both scenarios. Possible values arestatic
,dynamic
, `` -
--test_timeout
Setup timeout for each test in seconds, default timeout 900seconds (15 minutes). - All
gtest
command-line parameters
NOTE:
Using of
GTest parallel
tool to run a conformance suite helps to report crashed tests and collect correct statistic after unexpected crashes.Use
Gtest parallel
from official repository with this fix.The example of usage is:
python3 gtest_parallel.py /path/to/openvino/bin/intel64/Debug/conformanceTests -d . --gtest_filter=*Add*:*BinaryConv* -- --input_folders=/path/to/ir_1,/path/to/ir_2 --device=CPU --report_unique_name --output_folder=/path/to/temp_output_report_folder
All arguments after
--
symbol is forwarding toconformanceTests
target.If you use
--report_unique_name
argument please run the merge xml script to aggregate the results to one xml file. Check command line argument before using (--help
)! The example of usage is:python3 merge_xmls.py --input_folders=/path/to/temp_output_report_folder --output_folder=/path/to/output_report_folder --output_filename=report_aggregated
Run the summarize script to generate html
and csv
report. Check command line argument before using (--help
)!
The example of using the script is:
python3 summarize.py --xml /opt/repo/infrastructure-master/thirdparty/gtest-parallel/report.xml --out /opt/repo/infrastructure-master/thirdparty/gtest-parallel/
NOTE:
Please, do not forget to copy styles folder to the output directory. It helps to provide report with the filters and other usable features.
Report contains statistic based on conformance results and filter fields at the top of the page.
There is simple python runner to complete whole conformance pipeline locally. Some steps could be excluded from the pipeline by command-line parameter configuration.
- (Optional) Download OMZ models
- (Optional) Convert models to IR or prepare folder with IRs
- (Optional) Run
SubgraphDumper
to generate simple single op graph based on models or downloadconformance_ir
folder - run conformance test executable files
- generate conformance reports
The script has the following srguments:
-
-h, --help
show this help message and exit -
-m MODELS_PATH, --models_path MODELS_PATH
Path to directory/ies contains models to dump subgraph (default way is download OMZ). If--s=0
specify Conformance IRs directory -
-d DEVICE, --device DEVICE
Specify target device. Default value is CPU -
-ov OV_PATH, --ov_path OV_PATH
OV binary files path. The default way is try to find installed OV byINTEL_OPENVINO_DIR
in environmet variables or to find the absolute path of OV repo (by using script path) -
-w WORKING_DIR, --working_dir WORKING_DIR
Specify working directory to save all artifacts as reports, model, conformance_irs and etc. -
-t TYPE, --type TYPE
Specify conformance type:OP
orAPI
. Default value isOP
-
-s DUMP_CONFORMANCE, --dump_conformance DUMP_CONFORMANCE
Set '1' if you want to create Conformance IRs from custom models/Downloaded models. In other case set0
. Default value is '1'
NOTE All arguments are optional and have default values to reproduce OMZ conformance results as a default way.
- Use default way to reproduce opset conformance results for OMZ on GPU:
python3 run_conformance.py -d GPU
- Use conformance pipeline to check new models support (as IRs) on CPU plugin and save results to custom directory:
python3 run_conformance.py -m /path/to/new/model_irs -s=1 -w /path/to/working/dir -d CPU
- Use custom OV build to check GNA conformance using pre-generated conformance_irs:
python3 run_conformance.py -m /path/to/conformance_irs -s=0 -ov /path/to/ov_repo_on_custom_branch -d GNA
IMPORTANT NOTE: If you need to debug some conformance tests use run of binary as a default method. If you want to get conformance results or reproduce CI behavior use the simple python runner.
© Copyright 2018-2024, OpenVINO team
- Home
- General resources
- How to build
-
Developer documentation
- Inference Engine architecture
- CPU plugin
- GPU plugin
- HETERO plugin architecture
- Snippets
- Sample for IE C++/C/Python API
- Proxy plugin (Concept)
- Tests