From 50636e91eb12f868f7b7c565ad6cce3aa9e7dc0e Mon Sep 17 00:00:00 2001 From: yejianwu Date: Thu, 12 Jul 2018 15:39:53 +0800 Subject: [PATCH] fix deps in tests --- .gitlab-ci.yml | 1 + mace/{libmace => core}/mace_runtime.cc | 0 mace/ops/core_test.cc | 2 +- mace/ops/ops_test_util.h | 3 ++- mace/test/BUILD | 9 +++------ 5 files changed, 7 insertions(+), 8 deletions(-) rename mace/{libmace => core}/mace_runtime.cc (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8dc2dc9..a126054f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,6 +52,7 @@ api_test: - if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; fi - python tools/bazel_adb_run.py --target="//mace/test:mace_api_test" --run_target=True --stdout_processor=unittest_stdout_processor --target_abis=armeabi-v7a,arm64-v8a --target_socs=$TARGET_SOCS - python tools/bazel_adb_run.py --target="//mace/test:mace_api_mt_test" --run_target=True --stdout_processor=unittest_stdout_processor --target_abis=armeabi-v7a,arm64-v8a --target_socs=$TARGET_SOCS + - python tools/bazel_adb_run.py --target="//mace/test:mace_api_exception_test" --run_target=True --stdout_processor=unittest_stdout_processor --target_abis=armeabi-v7a,arm64-v8a --target_socs=$TARGET_SOCS ops_benchmark: stage: ops_benchmark diff --git a/mace/libmace/mace_runtime.cc b/mace/core/mace_runtime.cc similarity index 100% rename from mace/libmace/mace_runtime.cc rename to mace/core/mace_runtime.cc diff --git a/mace/ops/core_test.cc b/mace/ops/core_test.cc index e7d256f1..ac184c80 100644 --- a/mace/ops/core_test.cc +++ b/mace/ops/core_test.cc @@ -51,7 +51,7 @@ TEST(CoreTest, INIT_MODE) { for (auto &op_def : op_defs) { net_def.add_op()->CopyFrom(op_def); } - std::shared_ptr op_registry(new OperatorRegistryBase()); + std::shared_ptr op_registry(new OperatorRegistry()); auto net = CreateNet(op_registry, net_def, &ws, DeviceType::GPU, NetMode::INIT); net->Run(); diff --git a/mace/ops/ops_test_util.h b/mace/ops/ops_test_util.h index f34797c9..37e3b4ac 100644 --- a/mace/ops/ops_test_util.h +++ b/mace/ops/ops_test_util.h @@ -29,6 +29,7 @@ #include "mace/core/tensor.h" #include "mace/core/workspace.h" #include "mace/kernels/opencl/helper.h" +#include "mace/ops/ops_register.h" #include "mace/utils/utils.h" namespace mace { @@ -110,7 +111,7 @@ class OpDefBuilder { class OpsTestNet { public: - OpsTestNet() : op_registry_(new OperatorRegistryBase()) {} + OpsTestNet() : op_registry_(new OperatorRegistry()) {} template void AddInputFromArray(const std::string &name, diff --git a/mace/test/BUILD b/mace/test/BUILD index c1f14bb7..09c9e030 100644 --- a/mace/test/BUILD +++ b/mace/test/BUILD @@ -24,8 +24,7 @@ cc_test( linkstatic = 1, deps = [ "//mace/ops:test", - "//mace/kernels:kernels", - "//mace/ops:ops", + "//mace/libmace:libmace", "@gtest//:gtest_main", ], ) @@ -45,8 +44,7 @@ cc_test( linkstatic = 1, deps = [ "//mace/ops:test", - "//mace/kernels:kernels", - "//mace/ops:ops", + "//mace/libmace:libmace", "@gtest//:gtest_main", ], ) @@ -66,8 +64,7 @@ cc_test( linkstatic = 1, deps = [ "//mace/ops:test", - "//mace/kernels:kernels", - "//mace/ops:ops", + "//mace/libmace:libmace", "@gtest//:gtest_main", ], ) -- GitLab