From 9cfe223953a6523bf59d5b12eea362e1106b1c2b Mon Sep 17 00:00:00 2001 From: YdrMaster Date: Wed, 19 Apr 2023 11:15:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E5=91=BD=E5=90=8D=20optim?= =?UTF-8?q?ization=EF=BC=8C=E4=BB=A5=E5=90=8E=E5=8F=AF=E4=BB=A5=E5=88=86?= =?UTF-8?q?=E7=A6=BB=E4=B8=BA=20submodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: YdrMaster --- CMakeLists.txt | 5 ++++- {try => optimization}/CMakeLists.txt | 8 ++++---- {try => optimization}/Makefile | 0 {try => optimization}/README.md | 0 {try => optimization}/src/data.h | 0 {try => optimization}/src/data_type.cc | 0 {try => optimization}/src/data_type.h | 0 {try => optimization}/src/graph.cc | 0 {try => optimization}/src/graph.h | 0 {try => optimization}/src/mutation.cc | 0 {try => optimization}/src/mutation.h | 0 {try => optimization}/src/op_type.h | 0 {try => optimization}/src/tensor.cc | 0 {try => optimization}/src/tensor.h | 0 {try => optimization}/src0/data.h | 0 {try => optimization}/src0/data_type.cc | 0 {try => optimization}/src0/data_type.h | 0 {try => optimization}/src0/graph.h | 0 {try => optimization}/src0/op_type.h | 0 {try => optimization}/src0/test/test.cpp | 0 {try => optimization}/test/test.cpp | 0 21 files changed, 8 insertions(+), 5 deletions(-) rename {try => optimization}/CMakeLists.txt (54%) rename {try => optimization}/Makefile (100%) rename {try => optimization}/README.md (100%) rename {try => optimization}/src/data.h (100%) rename {try => optimization}/src/data_type.cc (100%) rename {try => optimization}/src/data_type.h (100%) rename {try => optimization}/src/graph.cc (100%) rename {try => optimization}/src/graph.h (100%) rename {try => optimization}/src/mutation.cc (100%) rename {try => optimization}/src/mutation.h (100%) rename {try => optimization}/src/op_type.h (100%) rename {try => optimization}/src/tensor.cc (100%) rename {try => optimization}/src/tensor.h (100%) rename {try => optimization}/src0/data.h (100%) rename {try => optimization}/src0/data_type.cc (100%) rename {try => optimization}/src0/data_type.h (100%) rename {try => optimization}/src0/graph.h (100%) rename {try => optimization}/src0/op_type.h (100%) rename {try => optimization}/src0/test/test.cpp (100%) rename {try => optimization}/test/test.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54d0d41f..0f096a85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,9 @@ if(USE_PROTOBUF) endif() include_directories(include) + +add_subdirectory(optimization) + # Pybind11 add_subdirectory(3rd-party/pybind11) include_directories(3rd-party/pybind11/include) @@ -121,7 +124,7 @@ if(USE_PROTOBUF) target_link_libraries(InfiniTensor tensor_proto) endif() -target_link_libraries(InfiniTensor pybind11::embed) +target_link_libraries(InfiniTensor optimization pybind11::embed) # TVM backend if(BUILD_TEST_EINNET) diff --git a/try/CMakeLists.txt b/optimization/CMakeLists.txt similarity index 54% rename from try/CMakeLists.txt rename to optimization/CMakeLists.txt index f88cd57d..a10d8cb4 100644 --- a/try/CMakeLists.txt +++ b/optimization/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -project(graph LANGUAGES CXX C) +project(optimization LANGUAGES CXX C) set(CMAKE_CXX_STANDARD 17) set(CMAKE_INCLUDE_CURRENT_DIR ON) file(GLOB_RECURSE SRC src/*.h src/*.cc src/*.cpp) -add_library(graph ${SRC}) +add_library(optimization ${SRC}) file(GLOB_RECURSE TEST test/*.cpp) -add_executable(test ${TEST}) -target_link_libraries(test graph) +add_executable(test_optimization ${TEST}) +target_link_libraries(test_optimization optimization) diff --git a/try/Makefile b/optimization/Makefile similarity index 100% rename from try/Makefile rename to optimization/Makefile diff --git a/try/README.md b/optimization/README.md similarity index 100% rename from try/README.md rename to optimization/README.md diff --git a/try/src/data.h b/optimization/src/data.h similarity index 100% rename from try/src/data.h rename to optimization/src/data.h diff --git a/try/src/data_type.cc b/optimization/src/data_type.cc similarity index 100% rename from try/src/data_type.cc rename to optimization/src/data_type.cc diff --git a/try/src/data_type.h b/optimization/src/data_type.h similarity index 100% rename from try/src/data_type.h rename to optimization/src/data_type.h diff --git a/try/src/graph.cc b/optimization/src/graph.cc similarity index 100% rename from try/src/graph.cc rename to optimization/src/graph.cc diff --git a/try/src/graph.h b/optimization/src/graph.h similarity index 100% rename from try/src/graph.h rename to optimization/src/graph.h diff --git a/try/src/mutation.cc b/optimization/src/mutation.cc similarity index 100% rename from try/src/mutation.cc rename to optimization/src/mutation.cc diff --git a/try/src/mutation.h b/optimization/src/mutation.h similarity index 100% rename from try/src/mutation.h rename to optimization/src/mutation.h diff --git a/try/src/op_type.h b/optimization/src/op_type.h similarity index 100% rename from try/src/op_type.h rename to optimization/src/op_type.h diff --git a/try/src/tensor.cc b/optimization/src/tensor.cc similarity index 100% rename from try/src/tensor.cc rename to optimization/src/tensor.cc diff --git a/try/src/tensor.h b/optimization/src/tensor.h similarity index 100% rename from try/src/tensor.h rename to optimization/src/tensor.h diff --git a/try/src0/data.h b/optimization/src0/data.h similarity index 100% rename from try/src0/data.h rename to optimization/src0/data.h diff --git a/try/src0/data_type.cc b/optimization/src0/data_type.cc similarity index 100% rename from try/src0/data_type.cc rename to optimization/src0/data_type.cc diff --git a/try/src0/data_type.h b/optimization/src0/data_type.h similarity index 100% rename from try/src0/data_type.h rename to optimization/src0/data_type.h diff --git a/try/src0/graph.h b/optimization/src0/graph.h similarity index 100% rename from try/src0/graph.h rename to optimization/src0/graph.h diff --git a/try/src0/op_type.h b/optimization/src0/op_type.h similarity index 100% rename from try/src0/op_type.h rename to optimization/src0/op_type.h diff --git a/try/src0/test/test.cpp b/optimization/src0/test/test.cpp similarity index 100% rename from try/src0/test/test.cpp rename to optimization/src0/test/test.cpp diff --git a/try/test/test.cpp b/optimization/test/test.cpp similarity index 100% rename from try/test/test.cpp rename to optimization/test/test.cpp