tvm
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 * kParamDeviceTypes = "param_device_types"
 The device type which will hold each of the functions parameters. More...
 
constexpr const char * kResultDeviceType = "result_device_type"
 The device type which will hold the function result. 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

◆ 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

◆ kParamDeviceTypes

constexpr const char* tvm::attr::kParamDeviceTypes = "param_device_types"

The device type which will hold each of the functions parameters.

Only supported on Relay Functions. Generally added by the PlanDevices pass, but may be included as an annotation on user programs.

Type: Array<Integer> (but interpreted as Array<DLDeviceType>)

◆ kResultDeviceType

constexpr const char* tvm::attr::kResultDeviceType = "result_device_type"

The device type which will hold the function result.

Only supported on Relay Functions. Generally added by the PlanDevices pass, but may be included as an annotation on user programs.

Type: Integer (but interpreted as DLDeviceType)

◆ kTarget

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

Compilation target of the function.

Type: Target

See also
tvm::Target