Skip to content

Commit

Permalink
[LITE][NPU][XPU] Move subgraph bridge registry and engine to kernels/…
Browse files Browse the repository at this point in the history
…npu to fix the compiling error on tiny publish mode

test=develop
  • Loading branch information
hong19860320 committed Dec 11, 2019
1 parent 2b5a8a9 commit 843c6fb
Show file tree
Hide file tree
Showing 47 changed files with 465 additions and 575 deletions.
9 changes: 0 additions & 9 deletions lite/core/mir/subgraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,5 @@ if (WITH_TESTING)
set_target_properties(test_subgraph_pass PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
endif()

if(LITE_WITH_NPU OR LITE_WITH_XPU)
lite_cc_library(subgraph_bridge_registry
SRCS subgraph_bridge_registry.cc
DEPS op)
lite_cc_library(subgraph_engine_base
SRCS subgraph_engine_base.cc
DEPS tensor op scope program)
endif()

set(mir_subgraphs subgraph_pass CACHE INTERNAL "mir_subgraphs")
message(STATUS "----> mir_subgraphs: ${mir_subgraphs}")
118 changes: 0 additions & 118 deletions lite/core/mir/subgraph/subgraph_engine_base.cc

This file was deleted.

76 changes: 0 additions & 76 deletions lite/core/mir/subgraph/subgraph_engine_base.h

This file was deleted.

2 changes: 1 addition & 1 deletion lite/kernels/npu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_subdirectory(bridges)

add_kernel(subgraph_compute_npu NPU basic SRCS subgraph_compute.cc DEPS ${lite_kernel_deps} subgraph_engine_npu)
add_kernel(subgraph_compute_npu NPU basic SRCS subgraph_compute.cc DEPS ${lite_kernel_deps} device_npu subgraph_bridge_engine ${npu_subgraph_bridges})
13 changes: 11 additions & 2 deletions lite/kernels/npu/bridges/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
if(NOT LITE_WITH_NPU AND NOT LITE_WITH_XPU)
return()
endif()

lite_cc_library(subgraph_bridge_registry
SRCS registry.cc
DEPS op)
lite_cc_library(subgraph_bridge_engine
SRCS engine.cc
DEPS tensor op scope program)

if(NOT LITE_WITH_NPU)
return()
endif()
Expand Down Expand Up @@ -59,5 +70,3 @@ set(npu_subgraph_bridges
CACHE INTERNAL "npu_subgraph_bridges")

message(STATUS "+++++ npu_subgraph_bridges: ${npu_subgraph_bridges}")

lite_cc_library(subgraph_engine_npu SRCS engine.cc DEPS subgraph_engine_base device_npu ${npu_subgraph_bridges})
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/act_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/argmax_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/batch_norm_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/concat_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/conv_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.

#include "lite/operators/conv_op.h"
#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/conv_transpose_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
2 changes: 1 addition & 1 deletion lite/kernels/npu/bridges/elementwise_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "lite/core/mir/subgraph/subgraph_bridge_registry.h"
#include "lite/kernels/npu/bridges/graph.h"
#include "lite/kernels/npu/bridges/registry.h"
#include "lite/kernels/npu/bridges/utility.h"

namespace paddle {
Expand Down
Loading

0 comments on commit 843c6fb

Please sign in to comment.