From 0f875ef367bd2dbfa2e557eb2a2fc841bacdf6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Wed, 26 Feb 2020 14:19:35 +0800 Subject: [PATCH] update operator-list function, test=develop (#3003) --- lite/core/op_registry.cc | 4 ++++ lite/core/op_registry.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lite/core/op_registry.cc b/lite/core/op_registry.cc index b49670eefb..94474f6eac 100644 --- a/lite/core/op_registry.cc +++ b/lite/core/op_registry.cc @@ -19,6 +19,10 @@ namespace paddle { namespace lite { +const std::map &GetOp2PathDict() { + return OpKernelInfoCollector::Global().GetOp2PathDict(); +} + std::list> KernelRegistry::Create( const std::string &op_type, TargetType target, diff --git a/lite/core/op_registry.h b/lite/core/op_registry.h index a49682eea6..2c98289b85 100644 --- a/lite/core/op_registry.h +++ b/lite/core/op_registry.h @@ -72,6 +72,8 @@ class OpKernelInfoCollector { namespace paddle { namespace lite { +const std::map &GetOp2PathDict(); + using KernelFunc = std::function; using KernelFuncCreator = std::function()>; class LiteOpRegistry final : public Factory> { -- GitLab