|
tvm
|
Namespaces | |
| namespace | op_attr |
| namespace | type_attr |
Classes | |
| class | AssertDoc |
| Reference type of AssertDocNode. More... | |
| class | AssertDocNode |
| Doc that represents assert statement. More... | |
| class | AssignDoc |
| Reference type of AssignDocNode. More... | |
| class | AssignDocNode |
| Doc that represents assign statement. More... | |
| class | AttrAccessDoc |
| Reference type of AttrAccessDocNode. More... | |
| class | AttrAccessDocNode |
| Doc that represents attribute access on another expression. More... | |
| class | BreakDoc |
| Reference type of BreakDocNode. More... | |
| class | BreakDocNode |
| Doc that represents break statement. More... | |
| class | CallDoc |
| Reference type of CallDocNode. More... | |
| class | CallDocNode |
| Doc that represents function call. More... | |
| class | ClassDoc |
| Reference type of ClassDocNode. More... | |
| class | ClassDocNode |
| Doc that represents class definition. More... | |
| class | CommentDoc |
| Reference type of CommentDocNode. More... | |
| class | CommentDocNode |
| Doc that represents comment. More... | |
| class | ContinueDoc |
| Reference type of ContinueDocNode. More... | |
| class | ContinueDocNode |
| Doc that represents continue statement. More... | |
| class | DictDoc |
| Reference type of DictDocNode. More... | |
| class | DictDocNode |
| Doc that represents dictionary literal. More... | |
| class | Doc |
| Reference type of DocNode. More... | |
| class | DocNode |
| The base class of all Doc. More... | |
| class | DocStringDoc |
| Reference type of DocStringDocNode. More... | |
| class | DocStringDocNode |
| Doc that represents docstring. More... | |
| class | DocTranslator |
| Owning reference to a hook translation context. More... | |
| class | DocTranslatorObj |
| Eager translation context shared by registered hooks. Hooks construct Docs, use explicit lexical scopes, and attach origins when emitting. More... | |
| struct | DocTranslatorVTable |
| Engine callbacks borrowed for the translator's lifetime. More... | |
| class | ExprDoc |
| Reference type of ExprDocNode. More... | |
| class | ExprDocNode |
| The base class of expression doc. More... | |
| class | ExprStmtDoc |
| Reference type of ExprStmtDocNode. More... | |
| class | ExprStmtDocNode |
| Doc that represents an expression as statement. More... | |
| class | ExprStringDoc |
| Reference type of ExprStringDocNode. More... | |
| class | ExprStringDocNode |
| Doc that renders an expression as a Python string literal. More... | |
| class | ForDoc |
| Reference type of ForDocNode. More... | |
| class | ForDocNode |
| Doc that represents for statement. More... | |
| class | FunctionDoc |
| Reference type of FunctionDocNode. More... | |
| class | FunctionDocNode |
| Doc that represents function definition. More... | |
| class | IdDoc |
| Reference type of IdDocNode. More... | |
| class | IdDocNode |
| Doc that represents identifier. More... | |
| class | IfDoc |
| Reference type of IfDocNode. More... | |
| class | IfDocNode |
| Doc that represent if-then-else statement. More... | |
| class | IndexDoc |
| Reference type of IndexDocNode. More... | |
| class | IndexDocNode |
| Doc that represents index access on another expression. More... | |
| class | LambdaDoc |
| Reference type of LambdaDocNode. More... | |
| class | LambdaDocNode |
| Doc that represents anonymous function. More... | |
| class | ListDoc |
| Reference type of ListDocNode. More... | |
| class | ListDocNode |
| Doc that represents list literal. More... | |
| class | LiteralDoc |
| Reference type of LiteralDocNode. More... | |
| class | LiteralDocNode |
| Doc that represents literal value. More... | |
| class | NamespaceDoc |
| An owning reference to a deferred script namespace. More... | |
| class | NamespaceDocNode |
| A reference to a canonical script namespace. More... | |
| class | OperationDoc |
| Reference type of OperationDocNode. More... | |
| class | OperationDocNode |
| Doc that represents operation. More... | |
| class | ReturnDoc |
| Reference type of ReturnDocNode. More... | |
| class | ReturnDocNode |
| Doc that represents return statement. More... | |
| class | ScopeDoc |
| Reference type of ScopeDocNode. More... | |
| class | ScopeDocNode |
| Doc that represents special scopes. More... | |
| class | SliceDoc |
| Reference type of SliceDocNode. More... | |
| class | SliceDocNode |
| Doc that represents slice in Index expression. More... | |
| class | StmtBlockDoc |
| Reference type of StmtBlockDocNode. More... | |
| class | StmtBlockDocNode |
| The container doc that holds a list of StmtDoc. More... | |
| class | StmtDoc |
| Reference type of StmtDocNode. More... | |
| class | StmtDocNode |
| The base class of statement doc. More... | |
| class | TupleDoc |
| Reference type of TupleDocNode. More... | |
| class | TupleDocNode |
| Doc that represents tuple literal. More... | |
| class | WhileDoc |
| Reference type of WhileDocNode. More... | |
| class | WhileDocNode |
| Doc that represents while statement. More... | |
Typedefs | |
| using | AccessPath = ffi::reflection::AccessPath |
| using | FDocTranslate = ffi::reflection::NativeFunctionView< ffi::Optional< ExprDoc >(DocTranslatorObj *translator, ffi::AnyView value, const ffi::Object *destination)> |
| Native translation hook with borrowed inputs and an owning result. | |
Functions | |
| ffi::Array< StmtDoc > | ToStmtDocArray (const ffi::List< Doc > &docs) |
| Convert collected Docs to statements in their original order. | |
| TVM_TIRX_DLL Doc | DocTranslate (ffi::AnyView ir, ffi::Dict< Doc, ffi::ObjectRef > *doc_origins=nullptr, ffi::Map< ffi::String, ffi::Any > extra_config={}) |
| Translate IR into a complete Doc including declarations and metadata setup. | |
| TVM_TIRX_DLL void | RegisterNamespaceAlias (const ffi::String &key, const ffi::String &default_alias) |
| Register a namespace alias during dialect static initialization. | |
| TVM_TIRX_DLL const ffi::Map< ffi::String, ffi::String > & | GetNamespaceAliases () |
| Read the registered namespace aliases. | |
| using tvm::script::printer::AccessPath = typedef ffi::reflection::AccessPath |
| using tvm::script::printer::FDocTranslate = typedef ffi::reflection::NativeFunctionView<ffi::Optional<ExprDoc>( DocTranslatorObj* translator, ffi::AnyView value, const ffi::Object* destination)> |
Native translation hook with borrowed inputs and an owning result.
| translator | Translation context borrowed for the duration of the call. |
| value | Input value borrowed for the duration of the call. |
| destination | Optional binding variable borrowed for the duration of the call. |
| TVM_TIRX_DLL Doc tvm::script::printer::DocTranslate | ( | ffi::AnyView | ir, |
| ffi::Dict< Doc, ffi::ObjectRef > * | doc_origins = nullptr, |
||
| ffi::Map< ffi::String, ffi::Any > | extra_config = {} |
||
| ) |
Translate IR into a complete Doc including declarations and metadata setup.
| ir | The input IR value. |
| doc_origins | Optional output replaced with the owned origins only on success. |
| extra_config | The translation configuration snapshot. |
| TVM_TIRX_DLL const ffi::Map< ffi::String, ffi::String > & tvm::script::printer::GetNamespaceAliases | ( | ) |
Read the registered namespace aliases.
| TVM_TIRX_DLL void tvm::script::printer::RegisterNamespaceAlias | ( | const ffi::String & | key, |
| const ffi::String & | default_alias | ||
| ) |
Register a namespace alias during dialect static initialization.
| key | The existing prefix configuration key, such as "tirx.prefix". |
| default_alias | The alias reserved before translation assigns variable names. |
Convert collected Docs to statements in their original order.
| docs | The Docs to convert, without modifying the collection. |
| ffi::Error | If a Doc is neither a StmtBlockDoc nor a StmtDoc. |