Skip to content

get-tvm-model

Automatically generated README for this automation recipe: get-tvm-model

Category: AI/ML models

License: Apache 2.0

  • Notes from the authors, contributors and users: README-extra

  • CM meta description for this script: _cm.json

  • Output cached? True

Reuse this script in your project

Install MLCommons CM automation meta-framework

Pull CM repository with this automation recipe (CM script)

cm pull repo mlcommons@cm4mlops

cmr "get ml-model-tvm tvm-model" --help

Run this script

Run this script via CLI
cm run script --tags=get,ml-model-tvm,tvm-model[,variations] 
Run this script via CLI (alternative)
cmr "get ml-model-tvm tvm-model [variations]" 
Run this script from Python
import cmind

r = cmind.access({'action':'run'
              'automation':'script',
              'tags':'get,ml-model-tvm,tvm-model'
              'out':'con',
              ...
              (other input keys for this script)
              ...
             })

if r['return']>0:
    print (r['error'])
Run this script via Docker (beta)
cm docker script "get ml-model-tvm tvm-model[variations]" 

Variations

  • No group (any combination of variations can be selected)

    Click here to expand this section.

    • _tune-model
      • ENV variables:
        • CM_TUNE_TVM_MODEL: yes
  • Group "batchsize"

    Click here to expand this section.

    • _batch_size.#
      • ENV variables:
        • CM_ML_MODEL_MAX_BATCH_SIZE: #
  • Group "frontend"

    Click here to expand this section.

    • _onnx (default)
      • ENV variables:
        • CM_TVM_FRONTEND_FRAMEWORK: onnx
    • _pytorch
      • Aliases: _torch
      • ENV variables:
        • CM_TVM_FRONTEND_FRAMEWORK: pytorch
    • _tensorflow
      • Aliases: _tf
      • ENV variables:
        • CM_TVM_FRONTEND_FRAMEWORK: tensorflow
    • _tflite
      • ENV variables:
        • CM_TVM_FRONTEND_FRAMEWORK: tflite
  • Group "model"

    Click here to expand this section.

    • _model.#
      • ENV variables:
        • CM_ML_MODEL: #
  • Group "precision"

    Click here to expand this section.

    • _fp32 (default)
    • _int8
    • _uint8
  • Group "runtime"

    Click here to expand this section.

    • _graph_executor
      • ENV variables:
        • CM_TVM_USE_VM: no
    • _virtual_machine (default)
      • ENV variables:
        • CM_TVM_USE_VM: yes
Default variations

_fp32,_onnx,_virtual_machine

Default environment

These keys can be updated via --env.KEY=VALUE or env dictionary in @input.json or using script flags.

  • CM_ML_MODEL_MAX_BATCH_SIZE: 1
  • CM_TUNE_TVM_MODEL: no
  • CM_TVM_USE_VM: yes
  • CM_TVM_FRONTEND_FRAMEWORK: onnx

Native script being run

No run file exists for Windows


Script output

cmr "get ml-model-tvm tvm-model [variations]"  -j