Overview

Function

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 cases.
  • 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.

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.
  • For details about how to install the PyTorch framework, see Ascend Extension for PyTorch Software Installation Guide.

Supplementary Notes

For details about other parameters of the msOpST tool, see Table 1.

Table 1 Parameters

Parameter

Description

Remarks

get_shape

Obtains the shape.

Machine-machine interface, which can be ignored by users.

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.

-h,

--help

Indicates the help information.

This parameter is optional.