mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-25 22:26:24 +00:00
Extend lifetime of KernelDef when creating a standalone op (#12057)
place tmp kernel def as local variable to cover the lifetime of kernel creation
This commit is contained in:
parent
2e27a7e330
commit
b858c2f725
1 changed files with 2 additions and 1 deletions
|
|
@ -398,11 +398,12 @@ onnxruntime::Status CreateOp(const OrtKernelInfo* info,
|
|||
kernel_def_builder->SetName(op_name);
|
||||
kernel_def_builder->SetDomain(domain);
|
||||
kernel_def_builder->SinceVersion(version);
|
||||
auto kernel_def = kernel_def_builder->Build();
|
||||
|
||||
static std::unordered_map<int, OrtValue> kEmptyValueMap;
|
||||
static OrtValueNameIdxMap kEmptyNameMap;
|
||||
|
||||
OpKernelInfo tmp_kernel_info(*node_ptr.get(), *kernel_def_builder->Build(), *ep, kEmptyValueMap, kEmptyNameMap, kernel_info->GetDataTransferManager());
|
||||
OpKernelInfo tmp_kernel_info(*node_ptr.get(), *kernel_def, *ep, kEmptyValueMap, kEmptyNameMap, kernel_info->GetDataTransferManager());
|
||||
std::unique_ptr<onnxruntime::OpKernel> op_kernel;
|
||||
|
||||
static FuncManager kFuncMgr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue