Software Version Query

Overview

The generated offline model could be affected if your ATC does not match the CANN package version used. In this case, re-convert your model by using ATC with a matched version. If you want to check the CANN package version used for an existing offline model, you can refer to this section.

Procedure

  1. Obtain an offline model, for example, tf_resnet50.om, and upload it to any directory (for example, $HOME/module) in the development environment as the CANN running user.
  2. Convert an offline model into a JSON file.
    atc --mode=1 --om=$HOME/module/tf_resnet50.om  --json=$HOME/module/out/tf_resnet50.json
    • --om: specifies the directory where the tf_resnet50.om offline model file is stored.
    • --json: specifies the path and name of the JSON file.

    In the JSON file, you can view the software version used. In the following example (a fragment of the JSON file), <version> indicates the version.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
       {
          "key": "opp_version",
          "value": {
            "s": "<version>"
          }
        },
        ... ...
        {
          "key": "atc_version",
          "value": {
            "s": "<version>"
          }
        },
        ... ...
        { 
           "key": "atc_cmdline",
           "value": {
             "s": "xxx/atc.bin --model ./resnet50_tensorflow.pb  --framework 3 --output ./out/tf_resnet50 --soc_version <soc_version>"
           }
         },
        ... ...
        {
          "key": "soc_version",
          "value": {
            "s": "<soc_version>"
           }
         },