From: HyoungJoo Ahn Date: Fri, 21 Feb 2020 08:28:21 +0000 (+0900) Subject: [TFLite] add the datatype according to meson option X-Git-Tag: accepted/tizen/unified/20200228.123757~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d2dfff70dc5bbb0495f68407fc2467c406fc379;p=platform%2Fupstream%2Fnnstreamer.git [TFLite] add the datatype according to meson option with the new version of TFLite, the new data types have been added. Since it's not supported and we cannot check the version of tensorflow at the build time, we have to set the datatype before building this package. I'd like to suggest adding a field at meson_option and allow user to set it. Signed-off-by: HyoungJoo Ahn --- diff --git a/meson.build b/meson.build index ddc7dba..c5b5a2b 100644 --- a/meson.build +++ b/meson.build @@ -170,6 +170,13 @@ if get_option('enable-tensorflow-lite') else error('Cannot find tensorflow-lite') endif + + tflite_datatype_arr = get_option('enable-additional-tflite-types') + foreach tflite_data_type : tflite_datatype_arr + message('data type [@0@] is added for TFLite'.format(tflite_data_type)) + add_project_arguments('-DTFLITE_@0@=1'.format(tflite_data_type), language: ['c', 'cpp']) + endforeach + endif # PyTorch diff --git a/meson_options.txt b/meson_options.txt index d9b7210..d45504d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -25,3 +25,4 @@ option('enable-tizen-sensor', type: 'boolean', value: false) option('enable-edgetpu', type: 'boolean', value: false) option('enable-armnn', type: 'boolean', value: false) option('enable-openvino', type: 'boolean', value: false) +option('enable-additional-tflite-types', type : 'array', choices : ['INT16','COMPLEX64','INT8','FLOAT16'], value : ['INT16','COMPLEX64','INT8'])