tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::te::OperationObj Class Referenceabstract

Base class of all operation nodes. More...

#include <operation.h>

Inheritance diagram for tvm::te::OperationObj:
Collaboration diagram for tvm::te::OperationObj:

Public Member Functions

virtual ~OperationObj ()
 
virtual int num_outputs () const =0
 
virtual PrimType output_dtype (size_t i) const =0
 Get the primitive element type of the i-th output tensor.
 
virtual ffi::Array< PrimExpr > output_shape (size_t i) const =0
 Get shape of i-th output tensor.
 
virtual ffi::Array< Tensor > InputTensors () const =0
 List all the input Tensors.
 
 TVM_FFI_DECLARE_OBJECT_INFO ("te.Operation", OperationObj, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

std::string name
 optional name of the operation
 
std::string tag
 optional tag of the operation
 
ffi::Map< ffi::String, ffi::Any > attrs
 additional attributes of the operation
 

Detailed Description

Base class of all operation nodes.

Constructor & Destructor Documentation

◆ ~OperationObj()

virtual tvm::te::OperationObj::~OperationObj ( )
inlinevirtual

Member Function Documentation

◆ InputTensors()

virtual ffi::Array< Tensor > tvm::te::OperationObj::InputTensors ( ) const
pure virtual

List all the input Tensors.

Returns
List of input tensors.

Implemented in tvm::te::PlaceholderOpObj, tvm::te::ComputeOpObj, tvm::te::ScanOpObj, and tvm::te::ExternOpObj.

◆ num_outputs()

virtual int tvm::te::OperationObj::num_outputs ( ) const
pure virtual

◆ output_dtype()

virtual PrimType tvm::te::OperationObj::output_dtype ( size_t  i) const
pure virtual

Get the primitive element type of the i-th output tensor.

Parameters
iThe output index.
Returns
primitive element type of i-th output.

Implemented in tvm::te::PlaceholderOpObj, tvm::te::ComputeOpObj, tvm::te::ScanOpObj, and tvm::te::ExternOpObj.

◆ output_shape()

virtual ffi::Array< PrimExpr > tvm::te::OperationObj::output_shape ( size_t  i) const
pure virtual

Get shape of i-th output tensor.

Parameters
iThe output index.
Returns
shape of i-th output.

Implemented in tvm::te::PlaceholderOpObj, tvm::te::ScanOpObj, tvm::te::ExternOpObj, and tvm::te::BaseComputeOpObj.

◆ RegisterReflection()

static void tvm::te::OperationObj::RegisterReflection ( )
inlinestatic

◆ TVM_FFI_DECLARE_OBJECT_INFO()

tvm::te::OperationObj::TVM_FFI_DECLARE_OBJECT_INFO ( "te.Operation"  ,
OperationObj  ,
ffi::Object   
)

Member Data Documentation

◆ attrs

ffi::Map<ffi::String, ffi::Any> tvm::te::OperationObj::attrs

additional attributes of the operation

◆ name

std::string tvm::te::OperationObj::name

optional name of the operation

◆ tag

std::string tvm::te::OperationObj::tag

optional tag of the operation


The documentation for this class was generated from the following file: