Overview
Function Description
- 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.
- If an AI framework is required for performing operator ST, install the AI framework in advance.
For details about how to install TensorFlow, see "Environment Setup" > "Installing TensorFlow" in TensorFlow 2.6.5 Model Porting Guide.
For details about how to install the PyTorch framework, see Ascend Extension for PyTorch Configuration and Installation .
- If the version of Ascend AI Processor is
Atlas 200/300/500 Inference Product , ST in the PyTorch framework is not supported.
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. |