Skip to content

calibrate-model-for.qaic

Automatically generated README for this automation recipe: calibrate-model-for.qaic

Category: AI/ML optimization

License: Apache 2.0

  • 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 "qaic calibrate profile qaic-profile qaic-calibrate" --help

Run this script

Run this script via CLI
cm run script --tags=qaic,calibrate,profile,qaic-profile,qaic-calibrate[,variations] 
Run this script via CLI (alternative)
cmr "qaic calibrate profile qaic-profile qaic-calibrate [variations]" 
Run this script from Python
import cmind

r = cmind.access({'action':'run'
              'automation':'script',
              'tags':'qaic,calibrate,profile,qaic-profile,qaic-calibrate'
              'out':'con',
              ...
              (other input keys for this script)
              ...
             })

if r['return']>0:
    print (r['error'])
Run this script via Docker (beta)
cm docker script "qaic calibrate profile qaic-profile qaic-calibrate[variations]" 

Variations

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

    Click here to expand this section.

    • _first.#
  • Group "batch-size"

    Click here to expand this section.

    • _bs.#
      • ENV variables:
        • CM_QAIC_MODEL_BATCH_SIZE: #
        • CM_CREATE_INPUT_BATCH: yes
    • _bs.1
      • ENV variables:
        • CM_QAIC_MODEL_BATCH_SIZE: 1
        • CM_CREATE_INPUT_BATCH: yes
  • Group "calib-dataset-filter-size"

    Click here to expand this section.

    • _filter-size.#
  • Group "calibration-option"

    Click here to expand this section.

    • _mlperf.option1
    • _mlperf.option2
  • Group "model"

    Click here to expand this section.

    • _bert-99
      • ENV variables:
        • CM_CALIBRATE_SQUAD: yes
        • CM_QAIC_COMPILER_ARGS: ``
        • CM_QAIC_COMPILER_PARAMS: -onnx-define-symbol=batch_size,1 -onnx-define-symbol=seg_length,<<<CM_DATASET_SQUAD_TOKENIZED_MAX_SEQ_LENGTH>>> -input-list-file=<<<CM_DATASET_SQUAD_TOKENIZED_PACKED_FILENAMES_FILE>>> -num-histogram-bins=512 -profiling-threads=<<<CM_HOST_CPU_PHYSICAL_CORES_PER_SOCKET>>>
        • CM_QAIC_MODEL_TO_CONVERT: calibrate_bert_mlperf
    • _resnet50
      • ENV variables:
        • CM_QAIC_MODEL_NAME: resnet50
        • CM_CALIBRATE_IMAGENET: yes
        • CM_QAIC_COMPILER_ARGS: ``
        • CM_QAIC_COMPILER_PARAMS: -output-node-name=ArgMax -profiling-threads=<<<CM_HOST_CPU_PHYSICAL_CORES_PER_SOCKET>>>
        • CM_QAIC_OUTPUT_NODE_NAME: -output-node-name=ArgMax
        • CM_QAIC_MODEL_TO_CONVERT: calibrate_resnet50_tf
    • _retinanet
      • ENV variables:
        • CM_QAIC_MODEL_NAME: retinanet
        • CM_CALIBRATE_OPENIMAGES: yes
        • CM_QAIC_COMPILER_ARGS: ``
        • CM_QAIC_COMPILER_PARAMS: -enable-channelwise -profiling-threads=<<<CM_HOST_CPU_PHYSICAL_CORES_PER_SOCKET>>> -onnx-define-symbol=batch_size,<<<CM_QAIC_MODEL_BATCH_SIZE>>> -node-precision-info=<<<CM_ML_MODEL_RETINANET_QAIC_NODE_PRECISION_INFO_FILE_PATH>>>
        • CM_QAIC_MODEL_TO_CONVERT: calibrate_retinanet_no_nms_mlperf
  • Group "model-framework"

    Click here to expand this section.

    • _tf
  • Group "seq-length"

    Click here to expand this section.

    • _seq.#
      • ENV variables:
        • CM_DATASET_SQUAD_TOKENIZED_MAX_SEQ_LENGTH: #
    • _seq.384
      • ENV variables:
        • CM_DATASET_SQUAD_TOKENIZED_MAX_SEQ_LENGTH: #

Native script being run

No run file exists for Windows


Script output

cmr "qaic calibrate profile qaic-profile qaic-calibrate [variations]"  -j