From e882a0d64fc3690842c674beef5ec10687db9553 Mon Sep 17 00:00:00 2001 From: Corey Cole Date: Fri, 20 Nov 2020 14:55:32 -0800 Subject: [PATCH 1/3] docs(tflite): remove '--linkopt' flag In the comments above these two TFLite GPU delegate build configurations, the suggested command threw an error for me on both OSX and Ubuntu with various gcc/clang versions. See issue https://github.com/tensorflow/tensorflow/issues/44926 --- tensorflow/lite/delegates/gpu/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/delegates/gpu/BUILD b/tensorflow/lite/delegates/gpu/BUILD index 069230ebcf6..6eecec90e34 100644 --- a/tensorflow/lite/delegates/gpu/BUILD +++ b/tensorflow/lite/delegates/gpu/BUILD @@ -116,7 +116,7 @@ objc_library( alwayslink = 1, ) -# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt --linkopt -s --strip always :libtensorflowlite_gpu_gl.so +# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -s --strip always :libtensorflowlite_gpu_gl.so cc_binary( name = "libtensorflowlite_gpu_gl.so", linkopts = [ @@ -141,7 +141,7 @@ cc_binary( deps = [":gl_delegate"], ) -# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt --linkopt -s --strip always :libtensorflowlite_gpu_delegate.so +# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -s --strip always :libtensorflowlite_gpu_delegate.so cc_binary( name = "libtensorflowlite_gpu_delegate.so", linkopts = [ From 54e6c38245185fe9e4eb6ad38b370d9b14562e97 Mon Sep 17 00:00:00 2001 From: Corey Cole Date: Wed, 13 Jan 2021 10:21:04 -0800 Subject: [PATCH 2/3] docs(tflite): add bacl --linkopt flag remove --copt preceding the --linkopt https://github.com/tensorflow/tensorflow/pull/45049/files#r556732278 --- tensorflow/lite/delegates/gpu/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/lite/delegates/gpu/BUILD b/tensorflow/lite/delegates/gpu/BUILD index 6eecec90e34..9900bf27a51 100644 --- a/tensorflow/lite/delegates/gpu/BUILD +++ b/tensorflow/lite/delegates/gpu/BUILD @@ -116,7 +116,7 @@ objc_library( alwayslink = 1, ) -# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -s --strip always :libtensorflowlite_gpu_gl.so +# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --linkopt -s --strip always :libtensorflowlite_gpu_gl.so cc_binary( name = "libtensorflowlite_gpu_gl.so", linkopts = [ From 4914abba00cb5b278d9cf3b7ef0c2345357a72ed Mon Sep 17 00:00:00 2001 From: Corey Cole Date: Wed, 13 Jan 2021 10:31:20 -0800 Subject: [PATCH 3/3] add back --linkopt flag --- tensorflow/lite/delegates/gpu/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/lite/delegates/gpu/BUILD b/tensorflow/lite/delegates/gpu/BUILD index 9900bf27a51..d799b438ae9 100644 --- a/tensorflow/lite/delegates/gpu/BUILD +++ b/tensorflow/lite/delegates/gpu/BUILD @@ -141,7 +141,7 @@ cc_binary( deps = [":gl_delegate"], ) -# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -s --strip always :libtensorflowlite_gpu_delegate.so +# build -c opt --config android_arm64 --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --linkopt -s --strip always :libtensorflowlite_gpu_delegate.so cc_binary( name = "libtensorflowlite_gpu_delegate.so", linkopts = [