Overview
Function Description
The msopst tool available in CANN Toolkit is used to generate ST cases and test your operators in the hardware environment. It provides the following functions:
- Generates an operator test case definition file (.json) based on the operator information library definition file (.ini), as the input of operator ST.
- Generates the ST data and test case execution code based on the operator test case definition file, for running the test cases in the hardware environment.
- Generates an ST report (st_report.json) that records information about test cases and phase-by-phase execution states.
- Constructs a user-defined function for generating expected operator output and displays the comparison result between the expected operator output and the actual output.
Tool Path
Performs an ST by using the executable file msopst whose function and installation path are as follows.
Name |
Description |
Path |
|---|---|---|
msopst |
ST tool. |
python/site-packages/bin under the CANN component directory. |
Prerequisites
- Before using this tool to generate operator test cases, ensure that the operator to be tested has been deployed into the operator library in advance.
Supplementary Notes
For details about other parameters of the msopst tool, see Table 2.
Parameter |
Description |
Remarks |
|---|---|---|
mi |
This parameter is used only on MindStudio. |
Machine-machine interface, which can be ignored by users. |
get_shape |
Obtains the shape. |
|
change_shape |
Modifies the shape. |
|
gen |
Generates acl_op.json. |
|
gen_testcase |
Generates test files and data. |
|
compare |
Compares the results. |
|
compare_by_path |
Compares the results of files in specified paths. |
Parent topic: Using the msopst Tool