Generating Operator Model Files in Batches

Usage

python3 run_generate_model.py -m <mode> -t <npu_type> -p <pipeline> -pool <pool_size>

Parameter

<mode>: algorithm mode. The value can be All, PCAR, Flat, IVFPQ, SQ8, IVFSQ8, INT8, or IVFINT8. Use commas (,) to separate multiple values, for example, python3 run_generate_model.py -m PCAR,IVFSQ8. By default, all modes are selected. You can directly run the python3 run_generate_model.py command.

<npu_type>: hardware type. Currently, <npu_type> supports the Ascend 310 AI Processor and Atlas inference products (Atlas 300I Pro inference card). The default value is 310.

<pipeline>: whether to use multi-thread parallel pipeline to generate an operator model. The default value is true.

<pool_size>: size of the process pool for multi-process scheduling of operators generated in batches.

Description

  • Run the command to obtain multiple groups of operator model files. Before running the command, you need to modify the para_table.xml file in the current directory and fill the required parameters in the table.
  • 0 ≤ pool_size ≤ 32

Restrictions in the operator generation description table are applicable to the parameter combinations that are frequently used in services. They may run properly in other scripts. For details about other parameter exceptions, see the CANN ATC Instructions.