[llvm] ee0c631 - [mlgo] Retire LLVM_HAVE_TF_API
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 14:40:22 PST 2022
Author: Kazu Hirata
Date: 2022-12-15T14:40:16-08:00
New Revision: ee0c631716a0038833e204c1a47c214ce1d9dbd5
URL: https://github.com/llvm/llvm-project/commit/ee0c631716a0038833e204c1a47c214ce1d9dbd5
DIFF: https://github.com/llvm/llvm-project/commit/ee0c631716a0038833e204c1a47c214ce1d9dbd5.diff
LOG: [mlgo] Retire LLVM_HAVE_TF_API
I've eliminated all uses of LLVM_HAVE_TF_API except a couple of them
being removed in llvm/lib/CodeGen/CMakeLists.txt. This patch removes
remaining definitions and uses of LLVM_HAVE_TF_API.
Differential Revision: https://reviews.llvm.org/D140169
Added:
Modified:
llvm/CMakeLists.txt
llvm/include/llvm/Config/llvm-config.h.cmake
llvm/lib/CodeGen/CMakeLists.txt
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
llvm/utils/gn/secondary/llvm/test/BUILD.gn
utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h
utils/bazel/llvm_configs/llvm-config.h.cmake
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index fb2fdea192748..8e8cd3e383596 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -975,7 +975,6 @@ set(LLVM_HAVE_TFLITE "" CACHE BOOL "Use tflite")
if (LLVM_HAVE_TFLITE)
find_package(protobuf REQUIRED)
find_package(tensorflow-lite REQUIRED)
- set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
set(LLVM_PROTOBUF_OUT_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/protobuf_gen)
include_directories(${LLVM_PROTOBUF_OUT_DIR})
endif()
diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
index b289db1d46ec4..b997c1d2b2bba 100644
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
@@ -98,9 +98,6 @@
/* Define if zstd compression is available */
#cmakedefine01 LLVM_ENABLE_ZSTD
-/* Define if LLVM was built with a dependency to the libtensorflow dynamic library */
-#cmakedefine LLVM_HAVE_TF_API
-
/* Define if LLVM is using tflite instead of libtensorflow */
#cmakedefine LLVM_HAVE_TFLITE
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt
index 07817d422350e..f4165707b3f4e 100644
--- a/llvm/lib/CodeGen/CMakeLists.txt
+++ b/llvm/lib/CodeGen/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_RAEVICT_MODEL_PATH_DEFAULT "models/regalloc-eviction")
@@ -17,7 +17,7 @@ if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API)
)
endif()
- if (DEFINED LLVM_HAVE_TF_API)
+ if (LLVM_HAVE_TFLITE)
list(APPEND MLLinkDeps ${tensorflow_c_api} ${tensorflow_fx})
endif()
endif()
diff --git a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
index 1041c89cddda9..d0d90d3e906c7 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -326,7 +326,6 @@ write_cmake_config("llvm-config") {
"LLVM_FORCE_ENABLE_STATS=",
"LLVM_FORCE_USE_OLD_TOOLCHAIN=",
"LLVM_HAS_ATOMICS=1",
- "LLVM_HAVE_TF_API=",
"LLVM_HAVE_TFLITE=",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_NATIVE_ARCH=$native_target",
diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 03ffe11607040..799b7b5a669e9 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -88,7 +88,6 @@ write_lit_config("lit_site_cfg") {
"OCAMLFLAGS=",
"LLVM_BUILD_EXAMPLES=0",
"LLVM_HAVE_TF_AOT=0",
- "LLVM_HAVE_TF_API=0",
"LLVM_INLINER_MODEL_AUTOGENERATED=0",
"LLVM_RAEVICT_MODEL_AUTOGENERATED=0",
"PTXAS_EXECUTABLE=",
diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h
index d8f2cb0279013..60d915e524857 100644
--- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h
+++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h
@@ -99,9 +99,6 @@
/* Define if we have cpp-httplib and want to use it */
/* #undef LLVM_ENABLE_HTTPLIB */
-/* Define if LLVM was built with a dependency to the libtensorflow dynamic library */
-/* #undef LLVM_HAVE_TF_API */
-
/* Define if LLVM was built with a dependency to the tensorflow compiler */
/* #undef LLVM_HAVE_TF_AOT */
diff --git a/utils/bazel/llvm_configs/llvm-config.h.cmake b/utils/bazel/llvm_configs/llvm-config.h.cmake
index b289db1d46ec4..4f8b234f8438b 100644
--- a/utils/bazel/llvm_configs/llvm-config.h.cmake
+++ b/utils/bazel/llvm_configs/llvm-config.h.cmake
@@ -98,10 +98,7 @@
/* Define if zstd compression is available */
#cmakedefine01 LLVM_ENABLE_ZSTD
-/* Define if LLVM was built with a dependency to the libtensorflow dynamic library */
-#cmakedefine LLVM_HAVE_TF_API
-
-/* Define if LLVM is using tflite instead of libtensorflow */
+/* Define if LLVM is using tflite */
#cmakedefine LLVM_HAVE_TFLITE
/* Define to 1 if you have the <sysexits.h> header file. */
More information about the llvm-commits
mailing list