Workload¶
AutoTVM Workload Definition.
- class lorien.dialect.tvm_dial.autotvm_dial.workload.AutoTVMWorkload¶
The workload for an op. A workload can be used to created an AutoTVM task for tuning.
- classmethod from_task(task: tvm.autotvm.task.task.Task) lorien.dialect.tvm_dial.autotvm_dial.workload.AutoTVMWorkload ¶
Create a workload from an AutoTVM task.
- Parameters
task (Task) -- The AutoTVM task for the workload.
- Returns
workload -- The initialized workload.
- Return type
- get_workload_key() str ¶
Get the primary key of this workload in DB.
- Returns
key -- The primary key of this workload to index the records in DB.
- Return type
str
- mutate(rules: Dict[Tuple[int, ...], str]) Sequence[lorien.workload.Workload] ¶
Mutate workload arguments with the given rules.
- Parameters
workload (Workload) -- The workload to be mutated.
rules (Dict[Tuple[int, ...], str]) -- Mapping from argument index to a mutation rule. For example, a rule to mutate conv2d batch size would be (0, 1, 0): "[1, 2, 4, 8, 16]".
- Returns
workloads -- The mutated workloads.
- Return type
Sequence[AutoTVMWorkload]
- to_job() lorien.tune.job.Job ¶
Create a job to tune this workload.
- Returns
job -- The created job.
- Return type
- to_task() tvm.autotvm.task.task.Task ¶
Create an AutoTVM task from this workload. Note that task may not be created if this workload violates the rules defined in the schedule. For example, a schedule may only work for the conv2d with 4n channel numbers. In this case, the task cannot be created if this workload has 18 channels.
- Returns
task -- Return the created task, or raise RuntimeError if failed.
- Return type
Task