!20556 rm ENABLE_MSLITE

Merge pull request !20556 from zhaodezan/master
This commit is contained in:
i-robot 2021-07-21 02:44:42 +00:00 committed by Gitee
commit bfe77c1dbc
2 changed files with 0 additions and 9 deletions

View File

@ -19,9 +19,7 @@
#include <vector>
#include <string>
#include <utility>
#ifdef ENABLE_MSLITE
#include "schema/model_generated.h"
#endif
#include "include/api/types.h"
#include "include/api/context.h"
@ -29,7 +27,6 @@ namespace mindspore::kernel {
class Kernel {
public:
Kernel() = default;
#ifdef ENABLE_MSLITE
Kernel(const std::vector<mindspore::MSTensor> &inputs, const std::vector<mindspore::MSTensor> &outputs,
const schema::Primitive *primitive, const mindspore::Context *ctx)
: context_(ctx), inputs_(std::move(inputs)), outputs_(std::move(outputs)), primitive_(primitive) {
@ -37,7 +34,6 @@ class Kernel {
type_ = primitive->value_type();
}
}
#endif
virtual ~Kernel() = default;
virtual int Prepare() = 0;
@ -63,20 +59,16 @@ class Kernel {
void set_name(const std::string &name) { this->name_ = name; }
const mindspore::Context *context() const { return this->context_; }
#ifdef ENABLE_MSLITE
virtual schema::PrimitiveType type() const { return type_; }
const schema::Primitive *primitive() const { return this->primitive_; }
#endif
protected:
std::string name_;
const mindspore::Context *context_ = nullptr;
std::vector<mindspore::MSTensor> inputs_;
std::vector<mindspore::MSTensor> outputs_;
#ifdef ENABLE_MSLITE
schema::PrimitiveType type_ = schema::PrimitiveType_NONE;
const schema::Primitive *primitive_ = nullptr;
#endif
};
} // namespace mindspore::kernel

View File

@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.14)
project(Lite)
set(BUILD_LITE "on")
add_compile_definitions(ENABLE_MSLITE)
if(TOOLCHAIN_NAME STREQUAL "himix200")
set(TARGET_HIMIX200 on)
add_compile_definitions(SUPPORT_NNIE)