heterocl.tvm.tensor module

Tensor and Operation class for computation declaration.

class ComputeOp(handle)[source]

Bases: heterocl.tvm.tensor.Operation

Compute operation.

axis

Represent axis of IterVar, only defined when it is a ComputeOp

reduce_axis

Represent axis of reductions, only defined when it is a ComputeOp

class ExternOp(handle)[source]

Bases: heterocl.tvm.tensor.Operation

Extern operation.

class Operation(handle)[source]

Bases: heterocl.tvm._ffi.node.NodeBase

Represent an operation that generate a tensor

input_tensors

List of input tensors to this op.

num_outputs

Number of outputs of this op.

output(index)[source]

Get the index-th output of the operation

Parameters

index (int) – The index size.

Returns

out – The i-th output.

Return type

Tensor

class PlaceholderOp(handle)[source]

Bases: heterocl.tvm.tensor.Operation

Placeholder operation.