#include <kernel_def_builder.h>
|
| KernelDefBuilder () |
|
KernelDefBuilder & | SetName (const std::string &op_name) |
|
KernelDefBuilder & | SetName (const char *op_name) |
|
KernelDefBuilder & | SetDomain (const std::string &domain) |
|
KernelDefBuilder & | SetDomain (const char *domain) |
|
KernelDefBuilder & | SinceVersion (int since_version) |
|
KernelDefBuilder & | SinceVersion (int since_version_start, int since_version_end) |
|
KernelDefBuilder & | Provider (ProviderType provider_type) |
|
KernelDefBuilder & | Provider (const char *provider_type) |
|
KernelDefBuilder & | TypeConstraint (const std::string &arg_name, std::vector< MLDataType > types) |
|
KernelDefBuilder & | TypeConstraint (const char *arg_name, std::vector< MLDataType > types) |
|
KernelDefBuilder & | TypeConstraint (const std::string &arg_name, MLDataType type) |
|
KernelDefBuilder & | TypeConstraint (const char *arg_name, MLDataType type) |
|
KernelDefBuilder & | MayInplace (const std::vector< std::pair< int, int >> &inplaces) |
|
KernelDefBuilder & | MayInplace (int input_index, int output_index) |
|
KernelDefBuilder & | Alias (const std::vector< std::pair< int, int >> &aliases) |
|
KernelDefBuilder & | Alias (int input_index, int output_index) |
|
KernelDefBuilder & | VariadicAlias (int input_offset, int output_offset) |
|
KernelDefBuilder & | AllocateInputsContiguously () |
|
KernelDefBuilder & | ExternalOutputs () |
|
KernelDefBuilder & | InputMemoryType (OrtMemType type, int input_index) |
|
KernelDefBuilder & | InputMemoryType (OrtMemType type, const std::vector< int > &input_indexes) |
|
KernelDefBuilder & | OutputMemoryType (OrtMemType type, int output_index) |
|
KernelDefBuilder & | OutputMemoryType (OrtMemType type, const std::vector< int > &output_indexes) |
|
KernelDefBuilder & | ExecQueueId (int queue_id) |
|
KernelDefBuilder & | SetDefaultInputsMemoryType (OrtMemType mem_type) |
|
KernelDefBuilder & | SetDefaultOutputMemoryType (OrtMemType mem_type) |
|
std::unique_ptr< KernelDef > | Build () |
|
Definition at line 164 of file kernel_def_builder.h.
onnxruntime::KernelDefBuilder::KernelDefBuilder |
( |
| ) |
|
|
inlineexplicit |
Alias mapping from inputs to outputs. Different from Inplace that the content of the tensor is not changed. This is to take care of operators such as Identity and Reshape.
Specify that this kernel requires input tensors to be allocated contiguously. This allows kernels to execute as a single large computation, rather than numerous smaller computations.
Definition at line 248 of file kernel_def_builder.h.
std::unique_ptr<KernelDef> onnxruntime::KernelDefBuilder::Build |
( |
| ) |
|
|
inline |
static std::unique_ptr<KernelDefBuilder> onnxruntime::KernelDefBuilder::Create |
( |
| ) |
|
|
inlinestatic |
Specify that this kernel runs on which execution queue in the provider
Definition at line 318 of file kernel_def_builder.h.
Specify that this kernel's output buffers are passed from external, i.e. not created or managed by ORT's memory allocator.
Definition at line 257 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::InputMemoryType |
( |
OrtMemType |
type, |
|
|
int |
input_index |
|
) |
| |
|
inline |
Specify that this kernel requires an input arg in certain memory type (instead of the default, device memory).
Definition at line 279 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::InputMemoryType |
( |
OrtMemType |
type, |
|
|
const std::vector< int > & |
input_indexes |
|
) |
| |
|
inline |
Specify that this kernel requires input arguments in certain memory type (instead of the default, device memory).
Definition at line 288 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::MayInplace |
( |
const std::vector< std::pair< int, int >> & |
inplaces | ) |
|
Inplace mapping from inputs to outputs allowed. It means that uplayer runtime could do memory in-place optimization as it will not impact the correctness of this kernel.
KernelDefBuilder& onnxruntime::KernelDefBuilder::OutputMemoryType |
( |
OrtMemType |
type, |
|
|
int |
output_index |
|
) |
| |
|
inline |
Specify that this kernel provides an output arg in certain memory type (instead of the default, device memory).
Definition at line 299 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::OutputMemoryType |
( |
OrtMemType |
type, |
|
|
const std::vector< int > & |
output_indexes |
|
) |
| |
|
inline |
Specify that this kernel provides an output arguments in certain memory type (instead of the default, device memory).
Definition at line 308 of file kernel_def_builder.h.
The execution provider type of the kernel.
KernelDefBuilder& onnxruntime::KernelDefBuilder::Provider |
( |
const char * |
provider_type | ) |
|
KernelDefBuilder& onnxruntime::KernelDefBuilder::SetDefaultInputsMemoryType |
( |
OrtMemType |
mem_type | ) |
|
|
inline |
Specify the default inputs memory type, if not specified, it is DefaultMemory
Definition at line 326 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::SetDefaultOutputMemoryType |
( |
OrtMemType |
mem_type | ) |
|
|
inline |
Specify the default outputs memory type, if not specified, it is DefaultMemory
Definition at line 334 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::SetDomain |
( |
const char * |
domain | ) |
|
KernelDefBuilder& onnxruntime::KernelDefBuilder::SetName |
( |
const char * |
op_name | ) |
|
This kernel supports operator definition since <since_version> (to latest).
Definition at line 180 of file kernel_def_builder.h.
KernelDefBuilder& onnxruntime::KernelDefBuilder::SinceVersion |
( |
int |
since_version_start, |
|
|
int |
since_version_end |
|
) |
| |
|
inline |
The start and end version should be set accordingly per version range for each domain registered in OpSchemaRegistry::DomainToVersionRange in .h as below. Key: domain. Value: <lowest version, highest version> pair. std::unordered_map<std::string, std::pair<int, int>> map_;
Definition at line 192 of file kernel_def_builder.h.
Specify the set of types that this kernel supports. A further restriction of the set of types specified in the op schema.
- Parameters
-
arg_name | The arg name can be either op formal parameter name, say "X", or type argument name specified in op schema, say "T". |
types | The types that are supported in this build. |
Like TypeConstraint but supports just a single type.
Apply variadic number of alias mapping from inputs to outputs. This is effectively applying Alias(i + input_offset, i + output_offset) for i >= 0
The documentation for this class was generated from the following file: