Use "-O3" for optimized TFLite build
This gives about 2x improvement with benchmark_model tool for Linux targets. Doesn't apply to Windows target since "/O2" is already maximum speed. PiperOrigin-RevId: 274083513
This commit is contained in:
parent
95f76d2708
commit
f149416e81
@ -13,12 +13,8 @@ def tflite_copts():
|
||||
copts = [
|
||||
"-DFARMHASH_NO_CXX_STRING",
|
||||
] + select({
|
||||
clean_dep("//tensorflow:android_arm64"): [
|
||||
"-O3",
|
||||
],
|
||||
clean_dep("//tensorflow:android_arm"): [
|
||||
"-mfpu=neon",
|
||||
"-O3",
|
||||
],
|
||||
clean_dep("//tensorflow:ios_x86_64"): [
|
||||
"-msse4.1",
|
||||
@ -30,6 +26,10 @@ def tflite_copts():
|
||||
"//conditions:default": [
|
||||
"-Wno-sign-compare",
|
||||
],
|
||||
}) + select({
|
||||
clean_dep("//tensorflow:windows"): [],
|
||||
clean_dep("//tensorflow:optimized"): ["-O3"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
return copts
|
||||
|
Loading…
Reference in New Issue
Block a user