hidet.ir.task

Classes:

Task(name, inputs, outputs, *[, params, ...])

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.

Parameters
  • inputs (Sequence[Tensor]) – The input tensors.

  • outputs (Sequence[Tensor]) – The output tensors.

Returns

args – The arguments for the compiled function.

Return type

Sequence[Tensor or int]

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]

build(target)[source]

Build the task for the given target to a callable function.

Parameters

target (Union[str, Target]) – The target device.

Returns

func – The compiled function.

Return type

hidet.runtime.CompiledFunction