fix lite run android env populate register bug
This commit is contained in:
parent
456ca8ad89
commit
a77110b254
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Copyright 2019-2021 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "src/ops/populate/populate_register.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
PopulateRegistry *PopulateRegistry::GetInstance() {
|
||||
static PopulateRegistry registry;
|
||||
return ®istry;
|
||||
}
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef LITE_MINDSPORE_LITE_C_OPS_OP_POPULATE_REGISTER_H
|
||||
#define LITE_MINDSPORE_LITE_C_OPS_OP_POPULATE_REGISTER_H
|
||||
#ifndef MINDSPORE_LITE_SRC_OPS_POPULATE_POPULATE_REGISTER_H_
|
||||
#define MINDSPORE_LITE_SRC_OPS_POPULATE_POPULATE_REGISTER_H_
|
||||
|
||||
#include <map>
|
||||
#include "schema/model_generated.h"
|
||||
|
@ -28,12 +28,10 @@
|
|||
namespace mindspore {
|
||||
namespace lite {
|
||||
typedef OpParameter *(*ParameterGen)(const void *prim);
|
||||
|
||||
class PopulateRegistry {
|
||||
public:
|
||||
static PopulateRegistry *GetInstance() {
|
||||
static PopulateRegistry registry;
|
||||
return ®istry;
|
||||
}
|
||||
static PopulateRegistry *GetInstance();
|
||||
|
||||
void InsertParameterMap(int type, ParameterGen creator, int version) {
|
||||
parameters_[GenPrimVersionKey(type, version)] = creator;
|
||||
|
@ -69,4 +67,4 @@ class Registry {
|
|||
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
||||
#endif
|
||||
#endif // MINDSPORE_LITE_SRC_OPS_POPULATE_POPULATE_REGISTER_H_
|
||||
|
|
|
@ -166,6 +166,7 @@ getCommonFile() {
|
|||
"${MINDSPORE_HOME}"/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/nnacl_utils.c
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/runtime/kernel/arm/fp16/common_fp16.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/runtime/infer_manager.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/lite/src/ops/populate/populate_register.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/infer_register.c
|
||||
"${MINDSPORE_HOME}"/mindspore/core/utils/status.cc
|
||||
"${MINDSPORE_HOME}"/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
|
||||
|
|
Loading…
Reference in New Issue