| @@ -35,7 +35,7 @@ option(ENABLE_VERBOSE "" off) | |||||
| option(ENABLE_SSE "if x86_64 support SSE instruction set" off) | option(ENABLE_SSE "if x86_64 support SSE instruction set" off) | ||||
| option(ENABLE_AVX "if x86_64 support SSE instruction set" off) | option(ENABLE_AVX "if x86_64 support SSE instruction set" off) | ||||
| option(ENABLE_MINDRT "if support mindrt" on) | option(ENABLE_MINDRT "if support mindrt" on) | ||||
| option(SUBGRAPH_SPLIT "if support sub graph split" on) | |||||
| option(SUBGRAPH_SPLIT "if support sub graph split" off) | |||||
| set(DIR_PREFIX mindspore-lite) | set(DIR_PREFIX mindspore-lite) | ||||
| set(MS_VERSION ${MS_VERSION_MAJOR}.${MS_VERSION_MINOR}.${MS_VERSION_REVISION}) | set(MS_VERSION ${MS_VERSION_MAJOR}.${MS_VERSION_MINOR}.${MS_VERSION_REVISION}) | ||||
| @@ -268,13 +268,18 @@ void SearchSubGraph::SubgraphFusion() { | |||||
| return; | return; | ||||
| } | } | ||||
| void SearchSubGraph::SubGraphSplitByOutput() { | |||||
| if (!context_->IsGpuEnabled() || output_nodes_.size() > 4) { | |||||
| return; | |||||
| bool SearchSubGraph::ModelValid() { | |||||
| if (context_->IsNpuEnabled()) { | |||||
| return false; | |||||
| } | |||||
| if (context_->IsGpuEnabled()) { | |||||
| return false; | |||||
| } | } | ||||
| return false; | |||||
| } | |||||
| if (context_->IsCpuFloat16Enabled() || context_->IsGpuFloat16Enabled()) { | |||||
| void SearchSubGraph::SubGraphSplitByOutput() { | |||||
| if (!ModelValid()) { | |||||
| return; | return; | ||||
| } | } | ||||
| @@ -63,6 +63,7 @@ class SearchSubGraph { | |||||
| void InitSubgraphDevice(); | void InitSubgraphDevice(); | ||||
| void SubgraphFusion(); | void SubgraphFusion(); | ||||
| void InitMainGraphDevice(); | void InitMainGraphDevice(); | ||||
| bool ModelValid(); | |||||
| private: | private: | ||||
| const InnerContext *context_ = nullptr; | const InnerContext *context_ = nullptr; | ||||