mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Fix a bug in KernelRegistry::Register function
This commit is contained in:
parent
bca8daf762
commit
82b4ec3d42
1 changed files with 2 additions and 2 deletions
|
|
@ -161,14 +161,14 @@ Status KernelRegistry::Register(KernelCreateInfo&& create_info) {
|
|||
if (i->second.kernel_def &&
|
||||
i->second.status.IsOK() &&
|
||||
i->second.kernel_def->IsConflict(*create_info.kernel_def)) {
|
||||
create_info.status =
|
||||
auto st = create_info.status =
|
||||
Status(ONNXRUNTIME, FAIL,
|
||||
"Failed to add kernel for " + op_name +
|
||||
": Conflicting with a registered kernel with op versions.");
|
||||
// For invalid entries, we keep them in the map now. Must check for status
|
||||
// when using the entries from the map.
|
||||
kernel_creator_fn_map_.emplace(op_name, std::move(create_info));
|
||||
return create_info.status;
|
||||
return st;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue