hidet.ir.task

Classes:

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

A task defines the operator computation.

class hidet.ir.task.Task(name, inputs, outputs, *, inverse_map=None, attributes=None)[source]

A task defines the operator computation.

Methods:

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[, load])

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

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, load=True)[source]

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

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

  • load (bool) – Whether to load the task

Returns:

func – The compiled module.

Return type:

hidet.runtime.CompiledTask