qai_hub.submit_profile_job
- submit_profile_job(model, device, name=None, options='', retry=True)
Submits a profile job.
- Parameters:
model (
Union
[Model
,MLModel
,bytes
,str
,Path
]) – Model to profile. Must not be a PyTorch, an ONNX, or an ORT modeldevice (
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 Options.retry (
bool
) – If job creation fails due to rate-limiting, keep retrying periodically until creation succeeds.
- Returns:
job – Returns the profile jobs.
- Return type:
ProfileJob | List[ProfileJob]
Examples
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 Profiling Models.