Instructions

Command-line Options

Table 1 Command-line options

Option

Description

-t

--type

Query type. This option is mandatory.
  • op: operator query
  • model: model query

--opp_path

Installation path of the OPP in CANN Toolkit. This parameter is mandatory for querying operators.

/home/xxx/Ascend/ascend-toolkit/latest/opp

-o

--output

Path for storing conversion results (in .json format). This option is mandatory.

  • op: /home/opp/xxx/op.json
  • model: /home/model/xxx/model.json

-h

--help

Help information. This option is optional.

  1. Go to the path where the tool is located.
    cd $HOME/Ascend/ascend-toolkit/latest/tools/ms_fast_query
  2. Query operators and models.
    • Run the following command to query the operators:
      python ms_fast_query.py -t op --opp_path /home/xxx/Ascend/ascend-toolkit/latest/opp -o /home/opp/xxx.json
    • Run the following command to query the models:
      python ms_fast_query.py -t model -o /home/model/xxx.json
  3. Check the value of the result field in the output file. If the value is success, your query is successful. The command output is as follows:
    • Successful operator query:
      1
      {"result": "success", "ops": xxx}
      
    • Successful model query:
      1
      {"result": "success", "count": xxx, "models": xxx}
      

      xxx indicates the detailed information about the queried operators or models. Refer to the actual query result.