nnfusion/test/CMakeLists.txt

101 строка
2.8 KiB
CMake
Исходник Обычный вид История

2020-09-05 12:49:54 +03:00
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
add_subdirectory(models)
set(SRC main.cpp)
file(GLOB nnfusion_core_files nnfusion/core/*.cpp)
DataType and DataBuffer (#133) * half_added * databuffer added * half_added * should_work * passed e2e test * remove cp constant in cmake file (#95) Co-authored-by: yuqing <yuqxia@microsoft.com> * Validation Pipeline Fixes (#92) * Fix rocm container; * Fix pipeline's model download script; * add tf freezer (#94) * add tf freezer * support freeze training graph * add bert model and readme * move to nnf_tf_freezer folder * remove cache * models/tensorflow/ * disable pyc * update readme Co-authored-by: yuqing <yuqxia@microsoft.com> * PyTorch freeze model tool (#84) * pytorch freeze tool * move freezer folder * [onnx]add transformer support * set pt model to eval mode * add readme, add docstrings * add lisence * refine doc * Make libnnfusion_rt shared; (#97) * Update PyTorch readme (#101) * update pt readme * Update README.md Co-authored-by: Alisa Chen <45112983+AlisaChen98@users.noreply.github.com> * initialize is_memcpy as false (#102) Co-authored-by: yuqing <yuqxia@microsoft.com> * half_added * databuffer added * half_added * Update readme of NNFusion (#96) * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md Co-authored-by: Scarlett Li <39592018+scarlett2018@users.noreply.github.com> Co-authored-by: Jilong Xue <jxue@microsoft.com> * Update README.md (#104) * add fp16 option when freeze graph (#103) * Update README.md (#107) * Update README.md * Update README.md * should_work * passed e2e test * after unit test * add licenses * add third party notices Co-authored-by: Yuqing <35415939+xiayuqing0622@users.noreply.github.com> Co-authored-by: yuqing <yuqxia@microsoft.com> Co-authored-by: Wenxiang Hu <Wenxiang.Hu@Microsoft.com> Co-authored-by: Ziming Miao <mzmssg.love@163.com> Co-authored-by: Alisa Chen <45112983+AlisaChen98@users.noreply.github.com> Co-authored-by: Scarlett Li <39592018+scarlett2018@users.noreply.github.com> Co-authored-by: Jilong Xue <jxue@microsoft.com> Co-authored-by: Cjkkkk <656569648@qq.com>
2020-11-23 09:42:53 +03:00
file(GLOB nnfusion_common_files nnfusion/common/*.cpp)
2020-09-05 12:49:54 +03:00
file(GLOB nnfusion_engine_files nnfusion/engine/*.cpp)
file(GLOB nnfusion_inventory_files nnfusion/inventory/*.cpp)
file(GLOB nnfusion_kernels_files nnfusion/kernels/*.cpp)
file(GLOB nnfusion_testutil_files nnfusion/test_util/*.cpp)
if (ONNX_FRONTEND)
list(APPEND nnfusion_frontend_files nnfusion/frontend/onnx_import.cpp)
endif()
if (TENSORFLOW_FRONTEND)
list(APPEND nnfusion_frontend_files nnfusion/frontend/tensorflow_import.cpp)
endif()
if (TORCHSCRIPT_FRONTEND)
list(APPEND nnfusion_frontend_files nnfusion/frontend/torchscript_import.cpp)
endif()
list(APPEND SRC ${nnfusion_core_files}
${nnfusion_engine_files}
DataType and DataBuffer (#133) * half_added * databuffer added * half_added * should_work * passed e2e test * remove cp constant in cmake file (#95) Co-authored-by: yuqing <yuqxia@microsoft.com> * Validation Pipeline Fixes (#92) * Fix rocm container; * Fix pipeline's model download script; * add tf freezer (#94) * add tf freezer * support freeze training graph * add bert model and readme * move to nnf_tf_freezer folder * remove cache * models/tensorflow/ * disable pyc * update readme Co-authored-by: yuqing <yuqxia@microsoft.com> * PyTorch freeze model tool (#84) * pytorch freeze tool * move freezer folder * [onnx]add transformer support * set pt model to eval mode * add readme, add docstrings * add lisence * refine doc * Make libnnfusion_rt shared; (#97) * Update PyTorch readme (#101) * update pt readme * Update README.md Co-authored-by: Alisa Chen <45112983+AlisaChen98@users.noreply.github.com> * initialize is_memcpy as false (#102) Co-authored-by: yuqing <yuqxia@microsoft.com> * half_added * databuffer added * half_added * Update readme of NNFusion (#96) * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md Co-authored-by: Scarlett Li <39592018+scarlett2018@users.noreply.github.com> Co-authored-by: Jilong Xue <jxue@microsoft.com> * Update README.md (#104) * add fp16 option when freeze graph (#103) * Update README.md (#107) * Update README.md * Update README.md * should_work * passed e2e test * after unit test * add licenses * add third party notices Co-authored-by: Yuqing <35415939+xiayuqing0622@users.noreply.github.com> Co-authored-by: yuqing <yuqxia@microsoft.com> Co-authored-by: Wenxiang Hu <Wenxiang.Hu@Microsoft.com> Co-authored-by: Ziming Miao <mzmssg.love@163.com> Co-authored-by: Alisa Chen <45112983+AlisaChen98@users.noreply.github.com> Co-authored-by: Scarlett Li <39592018+scarlett2018@users.noreply.github.com> Co-authored-by: Jilong Xue <jxue@microsoft.com> Co-authored-by: Cjkkkk <656569648@qq.com>
2020-11-23 09:42:53 +03:00
${nnfusion_common_files}
2020-09-05 12:49:54 +03:00
${nnfusion_inventory_files}
${nnfusion_kernels_files}
${nnfusion_testutil_files}
${nnfusion_frontend_files}
)
add_executable(unit-test ${SRC})
target_include_directories(unit-test PRIVATE ".")
if (ONNX_FRONTEND)
target_include_directories(unit-test PRIVATE ${ONNXPROTO_INCLUDE})
target_link_libraries(unit-test PRIVATE onnx_import_interface onnx_import onnx_proto)
endif()
if (TENSORFLOW_FRONTEND)
target_include_directories(unit-test PRIVATE ${TFPROTO_INCLUDE})
target_link_libraries(unit-test PRIVATE tensorflow_import_interface tensorflow_import tensorflow_proto)
endif()
if (TORCHSCRIPT_FRONTEND)
target_include_directories(unit-test PRIVATE ${TORCH_INCLUDE_DIRS})
target_link_libraries(unit-test PRIVATE torchscript_import_interface torchscript_import frontend_util)
endif()
if (ONNX_FRONTEND)
target_include_directories(unit-test PRIVATE ${ONNXPROTO_INCLUDE})
target_link_libraries(unit-test PRIVATE onnx_import_interface onnx_import onnx_proto)
endif()
target_link_libraries(unit-test PRIVATE
-Wl,--whole-archive
# Common feature
nnfusion_common
nnfusion_util
nnfusion_cache_manager
nnfusion_operators
nnfusion_serialize
nnfusion_graph
nnfusion_ir
# Engine related
nnfusion_engine_base
nnfusion_engine_profiler
nnfusion_engine_device
nnfusion_engine_pass
nnfusion_engine_pass_graph
nnfusion_engine_pass_graph_blockfusion
nnfusion_engine_pass_graph_subgraph_fusion
nnfusion_engine_pass_graph_autodiff
# Kernels and Operators
contrib_custom_operators
kernels_registration
kernels_cuda
kernels_cpu
kernels_hlsl
# Depends
-Wl,--no-whole-archive
protobuf::libprotobuf
dl
${GFLAGS}
${SQLITE3}
GTest::GTest
Threads::Threads
)
2020-09-05 12:49:54 +03:00
add_custom_target(unit-test-check
COMMAND ${PROJECT_BINARY_DIR}/test/unit-test \${ARGS}
DEPENDS unit-test
)
add_custom_target(check
DEPENDS
style-check
unit-test-check
)