提交 83499884 编写于 作者: E ervinzhang

adapted test for x86 build

上级 aec85d29
......@@ -81,7 +81,10 @@ target_link_libraries(mindspore-lite
add_subdirectory(runtime/kernel/arm)
if (BUILD_MINDDATA)
target_link_libraries(mindspore-lite minddata-eager minddata-lite log)
target_link_libraries(mindspore-lite minddata-eager minddata-lite)
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
target_link_libraries(mindspore-lite log)
endif()
endif ()
add_subdirectory(ops)
......
......@@ -298,8 +298,10 @@ if (BUILD_MINDDATA)
target_link_libraries(lite-test
minddata-lite
minddata-eager
log
)
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
target_link_libraries(lite-test log)
endif()
endif()
if (BUILD_CONVERTER)
target_link_libraries(lite-test
......
......@@ -7,6 +7,12 @@ mkdir -pv ${CUR_DIR}/do_test
cd ${CUR_DIR}/do_test
cp ${BUILD_DIR}/test/lite-test ./
cp -r ${CUR_DIR}/ut/src/runtime/kernel/arm/test_data/* ./
## prepare data for dataset
TEST_DATA_DIR=${CUR_DIR}/../../../tests/ut/data/dataset/
cp -fr $TEST_DATA_DIR/testPK ./data
./lite-test --gtest_filter="*MindDataTestTensorDE*"
./lite-test --gtest_filter="*MindDataTestEager*"
./lite-test --gtest_filter="*TestHebing*"
......
......@@ -90,9 +90,5 @@ TEST_F(MindDataTestTensorDE, MSTensorHash) {
std::shared_ptr<Tensor> t;
Tensor::CreateFromVector(x, TensorShape({2, 2}), &t);
auto ms_tensor = std::shared_ptr<mindspore::tensor::MSTensor>(new mindspore::tensor::DETensor(t));
#ifdef ENABLE_ARM64
ASSERT_EQ(ms_tensor->hash() == 11093771382437, true); // arm64
#else
ASSERT_EQ(ms_tensor->hash() == 11093825635904, true);
#endif
ASSERT_EQ(ms_tensor->hash() == 11093771382437, true);
}
\ No newline at end of file
......@@ -33,7 +33,11 @@ class MindDataTestEager : public mindspore::Common {
};
TEST_F(MindDataTestEager, Test1) {
#ifdef ENABLE_ARM64 || ENABLE_ARM32
std::string in_dir = "/sdcard/data/testPK/data/class1";
#else
std::string in_dir = "data/testPK/data/class1";
#endif
Path base_dir = Path(in_dir);
MS_LOG(WARNING) << base_dir.toString() << ".";
if (!base_dir.IsDirectory() || !base_dir.Exists()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册