Extract backend implementations outside of `src` directory.
Now the directory structure is:
```
- neurun
- frontend
- nnapi
- backend
- acl_cl
- cpu
- src (will be `core`)
```
Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
if(NOT "${TARGET_ARCH}" STREQUAL "x86_64")
set(LIB_NEURUN_BACKEND_ACL_CL neurun_backend_acl_cl)
endif(NOT "${TARGET_ARCH}" STREQUAL "x86_64")
-add_subdirectory(src/backend)
+add_subdirectory(backend)
add_subdirectory(frontend)
file(GLOB_RECURSE TESTS "test/*.cc")
add_executable(${TEST_NEURUN} ${TESTS})
+
# NOTE This line is a workaround to resolve compilation error
target_include_directories(${TEST_NEURUN} PRIVATE frontend/nnapi)
+target_include_directories(${TEST_NEURUN} PRIVATE backend/cpu)
+
target_link_libraries(${TEST_NEURUN} ${LIB_NEURUN})
target_link_libraries(${TEST_NEURUN} gtest)
target_link_libraries(${TEST_NEURUN} gtest_main)
add_library(${LIB_NEURUN_BACKEND_ACL_CL} SHARED ${SOURCES})
target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${NEURUN_INCLUDE_DIR})
+target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} nnapi-header)
target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute)
#include <arm_compute/runtime/CL/CLScheduler.h>
-#include "backend/acl_cl/Config.h"
+#include "Config.h"
namespace neurun
{
* limitations under the License.
*/
-#include "backend/acl_cl/StageGenerator.h"
+#include "StageGenerator.h"
#include "kernel/CLFunction.h"
#include "backend/interface/IStageGenerator.h"
#include "model/operand/Set.h"
-#include "backend/acl_cl/TensorBuilder.h"
+#include "TensorBuilder.h"
namespace neurun
{
* limitations under the License.
*/
-#include "backend/acl_cl/TensorBuilder.h"
+#include "TensorBuilder.h"
#include <cassert>
#include <stack>
#define __NEURUN_BACKEND_ACL_CL_TENSOR_BUILDER_H__
#include "backend/interface/ITensorBuilder.h"
-#include "backend/acl_cl/operand/CLTensor.h"
-#include "backend/acl_cl/operand/CLSubTensor.h"
-#include "backend/acl_cl/operand/Object.h"
+#include "operand/CLTensor.h"
+#include "operand/CLSubTensor.h"
+#include "operand/Object.h"
#include "model/operand/IndexMap.h"
namespace neurun
add_library(${LIB_NEURUN_KERNEL_ACL_CL} STATIC ${SOURCES})
target_include_directories(${LIB_NEURUN_KERNEL_ACL_CL} PUBLIC ${NEURUN_INCLUDE_DIR})
+target_include_directories(${LIB_NEURUN_KERNEL_ACL_CL} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(${LIB_NEURUN_KERNEL_ACL_CL} nnapi-header)
target_link_libraries(${LIB_NEURUN_KERNEL_ACL_CL} arm_compute)
#include <arm_compute/runtime/CL/CLScheduler.h>
#include "util/feature/nchw/View.h"
-#include "backend/acl_cl/Swizzle.h"
+#include "Swizzle.h"
#include "util/logging.h"
namespace
#include <arm_compute/runtime/IFunction.h>
#include <arm_compute/core/Types.h>
-#include "backend/acl_cl/operand/ICLTensor.h"
+#include "operand/ICLTensor.h"
namespace neurun
{
#include <arm_compute/runtime/CL/CLMemoryRegion.h>
#include "CLTensor.h"
-#include "backend/acl_cl/Convert.h"
+#include "Convert.h"
namespace neurun
{
#include <memory>
#include "backend/interface/operand/IObject.h"
-#include "backend/acl_cl/operand/ICLTensor.h"
+#include "operand/ICLTensor.h"
namespace neurun
{
* limitations under the License.
*/
-#include "backend/cpu/Config.h"
+#include "Config.h"
namespace neurun
{
#include "backend/interface/IStageGenerator.h"
#include "model/operand/Set.h"
-#include "backend/cpu/operand/Tensor.h"
+#include "operand/Tensor.h"
#include "TensorBuilder.h"
namespace neurun
#include <unordered_map>
#include "backend/interface/ITensorBuilder.h"
-#include "backend/cpu/operand/Tensor.h"
-#include "backend/cpu/operand/Object.h"
+#include "operand/Tensor.h"
+#include "operand/Object.h"
#include "model/operand/IndexMap.h"
#include "MemoryPlanner.h"
#include <gtest/gtest.h>
-#include "backend/cpu/MemoryPlanner.h"
+#include "MemoryPlanner.h"
#include "model/operand/Index.h"
TEST(Allocator, allocate_test)