tvm
Loading...
Searching...
No Matches
Namespaces | Functions
support.h File Reference

Shared helpers for implementing TVMScript translation hooks. More...

#include <tvm/ffi/extra/dataclass.h>
#include <tvm/ffi/extra/visit_error_context.h>
#include <tvm/ffi/reflection/registry.h>
#include <tvm/ir/expr.h>
#include <tvm/script/printer/config.h>
#include <tvm/script/printer/doc_translator.h>
Include dependency graph for support.h:

Go to the source code of this file.

Namespaces

namespace  tvm
 An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
 
namespace  tvm::script
 
namespace  tvm::script::printer
 

Functions

TVM_TIRX_DLL ffi::String tvm::script::printer::RedirectReprPrinterMethod (const ffi::ObjectRef &obj)
 Render an IR object for its registered repr callback.
 
TVM_TIRX_DLL ffi::Error tvm::script::printer::RedirectVisitErrorEnrichMethod (const ffi::Error &error, const ffi::ObjectRef &root)
 Render visit-error context through the shared IR error renderer.
 
template<typename ObjectType >
void tvm::script::printer::RegisterScriptRepr ()
 Register TVMScript repr and visit-error rendering for ObjectType.
 
TVM_TIRX_DLL IdDoc tvm::script::printer::VarDoc (DocTranslatorObj *d, const Var &var, bool explicit_def=true)
 Allocate or retrieve a variable identifier and record its origin.
 
TVM_TIRX_DLL ffi::Optional< ExprDoc > tvm::script::printer::VarDocTranslate (DocTranslatorObj *d, ffi::AnyView input, const ffi::Object *destination)
 Translate a Var using the normal translation-hook signature.
 
TVM_TIRX_DLL ExprDoc tvm::script::printer::AddMetadata (DocTranslatorObj *d, ffi::Any value)
 Store a non-null value in the initialized metadata table.
 
TVM_TIRX_DLL ExprDoc tvm::script::printer::RawCallDocTranslate (DocTranslatorObj *d, const CallObj *call, ffi::Optional< ffi::Array< ExprDoc > > translated_args=std::nullopt)
 Emit an explicit Call constructor preserving all call fields.
 
TVM_TIRX_DLL ffi::Optional< ExprDoc > tvm::script::printer::StandardCallDocTranslate (DocTranslatorObj *d, const CallObj *call)
 Translate named Op-call syntax, falling back to an explicit call as needed.
 

Detailed Description

Shared helpers for implementing TVMScript translation hooks.