tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Variables
tvm::attr Namespace Reference

Generic attribute names that can be attached to any function. More...

Variables

constexpr const char * kCallingConv = "calling_conv"
 Indicates the special calling convention. More...
 
constexpr const char * kTarget = "target"
 Compilation target of the function. More...
 
constexpr const char * kGlobalSymbol = "global_symbol"
 Global linker symbol of the function in generated code. More...
 
constexpr const char * kModuleName = "mod_name"
 Name of the module. More...
 
constexpr const char * kExecutor = "executor"
 Executor targeted by the module. More...
 
constexpr const char * kRuntime = "runtime"
 Runtime target of the module. More...
 
constexpr const char * kWorkspaceMemoryPools = "workspace_memory_pools"
 workspace memory pools of the module More...
 
constexpr const char * kConstantMemoryPools = "constant_memory_pools"
 constant memory pools of the module More...
 
constexpr const char * kConstants = "constants"
 
constexpr const char * kExternalMods = "external_mods"
 All the runtime::Modules accumulated during compilation by external codegen. These modules must be either directly linked or captured in the final compilation artifact. More...
 
constexpr const char * kConstNameToConstant = "const_name_to_constant"
 All the named runtime::NDArrays accumulated during compilation by external codegen. Generally the associated runtime::Module will indicate it requires bindings for these names, and during module initialization these bindings will be recovered from a ConstLoaderModule. See also kConstantsArray above, which is the analog for PrimFuncs. More...
 
constexpr const char * kIsExternalCodegen = "is_external_codegen"
 A TargetKind attribute of type Bool. If true, then the target kind name also corresponds to an external codegen 'compiler' name. That name may be used: More...
 
constexpr const char * kRelayToTIR = "RelayToTIR"
 A TargetKind attribute of type FTVMRelayToTIR. If set, then the target kind name also corresponds to an external codegen 'compiler' name, and the bound value is a Pass to apply before the TVM lowering. More...
 

Detailed Description

Generic attribute names that can be attached to any function.

See also
tvm::tir::attr, tvm::relay::attr

Variable Documentation

◆ kCallingConv

constexpr const char* tvm::attr::kCallingConv = "calling_conv"

Indicates the special calling convention.

Type: Integer

See also
tvm::CallingConv

◆ kConstantMemoryPools

constexpr const char* tvm::attr::kConstantMemoryPools = "constant_memory_pools"

constant memory pools of the module

Type: ConstantMemoryPools

See also
tvm::ConstantMemoryPools

◆ kConstants

constexpr const char* tvm::attr::kConstants = "constants"

◆ kConstNameToConstant

constexpr const char* tvm::attr::kConstNameToConstant = "const_name_to_constant"

All the named runtime::NDArrays accumulated during compilation by external codegen. Generally the associated runtime::Module will indicate it requires bindings for these names, and during module initialization these bindings will be recovered from a ConstLoaderModule. See also kConstantsArray above, which is the analog for PrimFuncs.

Type: Map<String, runtime::NDArray>

◆ kExecutor

constexpr const char* tvm::attr::kExecutor = "executor"

Executor targeted by the module.

Type: Executor

See also
tvm::relay::Executor

◆ kExternalMods

constexpr const char* tvm::attr::kExternalMods = "external_mods"

All the runtime::Modules accumulated during compilation by external codegen. These modules must be either directly linked or captured in the final compilation artifact.

Type: Array<runtime::Module>

◆ kGlobalSymbol

constexpr const char* tvm::attr::kGlobalSymbol = "global_symbol"

Global linker symbol of the function in generated code.

This option forces the code generator to name the function with the given.

For example, we could set a global_symbol of a function early to make sure that we can always refer to it by the symbol name in the generated DLL.

We should not set the attribute for local functions, so that the compiler can freely rename them.

A unique global symbol will be automatically assigned to each function in the module before the target code generation phase.

Type: String

◆ kIsExternalCodegen

constexpr const char* tvm::attr::kIsExternalCodegen = "is_external_codegen"

A TargetKind attribute of type Bool. If true, then the target kind name also corresponds to an external codegen 'compiler' name. That name may be used:

  • To retrieve partitioning rules using get_partition_table.
  • To attach to Relay Functions under the attr::kCompiler attribute to indicate the function is to be compiled by the external codegen path.

The CollagePartition pass uses this attribute to guide it's search over candidate partitions using external codegen.

See also Target::IsExternalCodegenFor

◆ kModuleName

constexpr const char* tvm::attr::kModuleName = "mod_name"

Name of the module.

Type: String

See also
tvm::runtime::String

◆ kRelayToTIR

constexpr const char* tvm::attr::kRelayToTIR = "RelayToTIR"

A TargetKind attribute of type FTVMRelayToTIR. If set, then the target kind name also corresponds to an external codegen 'compiler' name, and the bound value is a Pass to apply before the TVM lowering.

See also Target::IsExternalCodegenFor

◆ kRuntime

constexpr const char* tvm::attr::kRuntime = "runtime"

Runtime target of the module.

Type: Runtime

See also
tvm::relay::Runtime

◆ kTarget

constexpr const char* tvm::attr::kTarget = "target"

Compilation target of the function.

Type: Target

See also
tvm::Target

◆ kWorkspaceMemoryPools

constexpr const char* tvm::attr::kWorkspaceMemoryPools = "workspace_memory_pools"

workspace memory pools of the module

Type: WorkspaceMemoryPools

See also
tvm::WorkspaceMemoryPools