qai_hub.submit_profile_job

submit_profile_job(model, device, name=None, options='', retry=True)

Submits a profile job.

パラメータ:
  • model (Model | bytes | str | Path | None) -- Model to profile. Must not be a PyTorch model.

  • device (Union[Device, List[Device]]) -- Devices on which to run the profile job.

  • name (Optional[str]) -- Optional name for the job. Job names need not be unique.

  • options (str) -- Cli-like flag options. See Profile & Inference Options.

  • retry (bool) -- If job creation fails due to rate-limiting, keep retrying periodically until creation succeeds.

戻り値:

job -- Returns the profile jobs.

戻り値の型:

ProfileJob | List[ProfileJob]

サンプル

Submit a tflite model for profiling on a Samsung Galaxy S23:

import qai_hub as hub

model = hub.upload_model("mobilenet.tflite")

job = hub.submit_profile_job(model,
                             device=hub.Device("Samsung Galaxy S23"),
                             name="mobilenet (1, 3, 224, 224)")

For more examples, see モデルのプロファイリング.