How Do I Convert a Single-Operator Description File into an Offline Model?

This section details how to convert a single-operator description file into an offline model.

  1. Create a single-operator description file by referring to Configuration File Templates and Description File Parameters. This section describes how to construct an Add operator in ND format.
  2. Upload the single-operator description file constructed in 1 as the CANN running user to any directory in the development environment, for example, $HOME/singleop/.
  3. Run the following command (the path and file arguments in the command are for reference only).
    atc --singleop=$HOME/singleop/add.json --output=$HOME/singleop/out/op_model --soc_version=<soc_version>

    For details about the command-line options, see --singleop.

  4. Check that your model is converted successfully.
    1
    ATC run success
    

    Find the generated offline model (.om) in the directory specified by the output argument.