[PATCH] D140061: [mlgo] Use LLVM_HAVE_TFLITE instead of LLVM_HAVE_TF_API

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 11:11:39 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9112ec6ad059: [mlgo] Use LLVM_HAVE_TFLITE instead of LLVM_HAVE_TF_API (authored by kazu).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140061/new/

https://reviews.llvm.org/D140061

Files:
  llvm/lib/Analysis/CMakeLists.txt
  llvm/unittests/Analysis/CMakeLists.txt


Index: llvm/unittests/Analysis/CMakeLists.txt
===================================================================
--- llvm/unittests/Analysis/CMakeLists.txt
+++ llvm/unittests/Analysis/CMakeLists.txt
@@ -7,7 +7,7 @@
   )
 
 set(MLGO_TESTS TFUtilsTest.cpp TrainingLoggerTest.cpp)
-if (DEFINED LLVM_HAVE_TF_API)
+if (LLVM_HAVE_TFLITE)
   LIST(APPEND EXTRA_TESTS ${MLGO_TESTS})
 else()
   LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
Index: llvm/lib/Analysis/CMakeLists.txt
===================================================================
--- llvm/lib/Analysis/CMakeLists.txt
+++ llvm/lib/Analysis/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API)
+if (DEFINED LLVM_HAVE_TF_AOT OR LLVM_HAVE_TFLITE)
   include(TensorFlowCompile)
   set(LLVM_INLINER_MODEL_PATH_DEFAULT "models/inliner-Oz")
 
@@ -17,18 +17,14 @@
     )
   endif()
 
-  if (DEFINED LLVM_HAVE_TF_API)
-    if (LLVM_HAVE_TFLITE)
-      build_proto(
-        tensorflow/core/protobuf/error_codes
-        tensorflow/core/example/feature
-        tensorflow/core/example/example)
-      list(APPEND MLLinkDeps 
-        tensorflow-lite::tensorflow-lite
-        protobuf::libprotobuf)
-    else()
-      list(APPEND MLLinkDeps ${tensorflow_c_api} ${tensorflow_fx})
-    endif()
+  if (LLVM_HAVE_TFLITE)
+    build_proto(
+      tensorflow/core/protobuf/error_codes
+      tensorflow/core/example/feature
+      tensorflow/core/example/example)
+    list(APPEND MLLinkDeps
+      tensorflow-lite::tensorflow-lite
+      protobuf::libprotobuf)
   endif()
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140061.483250.patch
Type: text/x-patch
Size: 1568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/66043c79/attachment.bin>


More information about the llvm-commits mailing list