diff options
author | 대인기/On-Device Lab(SR)/Staff Engineer/삼성전자 <inki.dae@samsung.com> | 2019-02-08 15:46:27 +0900 |
---|---|---|
committer | 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com> | 2019-02-08 15:46:27 +0900 |
commit | 61fa8616fa3142ef5819af7e5c69c4bfa79f8b79 (patch) | |
tree | 181136f2910b708111ca0ec06b3ea57116658953 /CMakeLists.txt | |
parent | 6794918926a05f06e5d5b5c54783a3c82ec0a656 (diff) | |
download | nnfw-61fa8616fa3142ef5819af7e5c69c4bfa79f8b79.tar.gz nnfw-61fa8616fa3142ef5819af7e5c69c4bfa79f8b79.tar.bz2 nnfw-61fa8616fa3142ef5819af7e5c69c4bfa79f8b79.zip |
Check tflite version in build time (#4371)
* Check tflite version in build time
This patch seperates what OBS_BUILD flag means into.
- OBS_BUILD flag decides where external packages should be
installed from - if OBS_BUILD == 1 then from tizen package server
otherwise from upstream.
- TFLITE_VER means what tensorflow-lite version nnfw uses - if
TFLITE_VER == 190 then nnfw uses tensorflow-lite v1.9.0 for Tizen
otherwise tensorflow-lite v1.12.0. In default TFLITE_VER is 1120.
For this, I added a TFLITE_VER flag, which will pass proper version
information - 190 for gbs build or 1120 in default - to code side.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
* Seperated TFLITE_VER into TFLITE_MAJOR_VER and TFLITE_MINOR_VER
Signed-off-by: Inki Dae <inki.dae@samsung.com>
* Updated nnapi_delegate.h I missed.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
* Updated and cleaned up
- Cleaned up CMakeLists.txt file
- Added TFLITE_MAJOR_VER and TFLITE_MINOR_VER flags when coverage_build == 1
Signed-off-by: Inki Dae <inki.dae@samsung.com>
* Updated description
Signed-off-by: Inki Dae <inki.dae@samsung.com>
* Fix typo
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0979a4a3f..3b558f42d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,10 +58,13 @@ option(DOWNLOAD_NONIUS "Download nonius source" ON) option(BUILD_GTEST "Download and build Google Test" ON) nnfw_find_package(GTest QUIET) -# NOTE Workaround to avoid build fail by tensorflow (or acl) package version mismatch on obs build -if(OBS_BUILD) - add_definitions(-DOBS_BUILD) -endif(OBS_BUILD) +# NOTE For now NNFW supports two TFLITE versions - v1.12 for Unbuntu and v1.9 for Tizen. +# So TFLITE version should mandatorily be specified to distinguish the version. +if(NOT TFLITE_MAJOR_VER OR NOT TFLITE_MINOR_VER) + message(FATAL_ERROR "TFLITE_MAJOR_VER and TFLITE_MINOR_VER should be defined") +endif(NOT TFLITE_MAJOR_VER OR NOT TFLITE_MINOR_VER) + +add_definitions(-DTFLITE_MAJOR_VER=${TFLITE_MAJOR_VER} -DTFLITE_MINOR_VER=${TFLITE_MINOR_VER}) nnfw_include(ExtendCMakeFunction) |