hidet.ir.task
hidet.ir.task¶
Classes:
|
A task defines the operator computation. |
- class hidet.ir.task.Task(name, inputs, outputs, *, params=None, inverse_map=None, attributes=None)[source]¶
A task defines the operator computation.
Methods:
specialize_for
(inputs)Specialize this task for the given inputs.
generate_arguments
(inputs, outputs)Generate arguments for the compiled function of this task given the tensor parameters.
dummy_arguments
(device)Generate dummy arguments for the compiled function of this task.
build
(target)Build the task for the given target to a callable function.
- specialize_for(inputs)[source]¶
Specialize this task for the given inputs.
- Parameters
inputs (Sequence[hidet.graph.Tensor]) – The input tensors.
- Returns
task – Self task specialized for the given inputs.
- Return type
hidet.ir.Task
- generate_arguments(inputs, outputs)[source]¶
Generate arguments for the compiled function of this task given the tensor parameters.
- dummy_arguments(device)[source]¶
Generate dummy arguments for the compiled function of this task.
- Parameters
device (str) – The target device.
- Returns
args – The arguments for the compiled function.
- Return type
Sequence[Tensor or int]