Skip to content

Commit 842b0d0

Browse files
[mlgo] Remove TENSORFLOW_C_LIB_PATH
We use LLVM_HAVE_TFLITE as the key to enable the MLGO bits. We do not use the "else" clause. Differential Revision: https://reviews.llvm.org/D139860
1 parent 7793e67 commit 842b0d0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

llvm/CMakeLists.txt

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -980,36 +980,13 @@ endif()
980980

981981
# For up-to-date instructions for installing the TFLite dependency, refer to
982982
# the bot setup script: https://github.com/google/ml-compiler-opt/blob/main/buildbot/buildbot_init.sh
983-
set(TENSORFLOW_C_LIB_PATH "" CACHE PATH "Path to TensorFlow C library install")
984983
set(LLVM_HAVE_TFLITE "" CACHE BOOL "Use tflite")
985984
if (LLVM_HAVE_TFLITE)
986985
find_package(protobuf REQUIRED)
987986
find_package(tensorflow-lite REQUIRED)
988987
set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
989988
set(LLVM_PROTOBUF_OUT_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/protobuf_gen)
990989
include_directories(${LLVM_PROTOBUF_OUT_DIR})
991-
elseif (TENSORFLOW_C_LIB_PATH)
992-
find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED)
993-
# Currently, the protobuf headers are distributed with the pip package that corresponds to the version
994-
# of the C API library.
995-
find_library(tensorflow_fx tensorflow_framework PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED)
996-
set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
997-
include_directories(${TENSORFLOW_C_LIB_PATH}/include)
998-
if (NOT TF_PROTO_HEADERS)
999-
message(STATUS "TF_PROTO_HEADERS not defined. Looking for tensorflow pip package.")
1000-
execute_process(COMMAND
1001-
${Python3_EXECUTABLE} "-c" "import tensorflow as tf; import os; print(os.path.dirname(tf.__file__))"
1002-
OUTPUT_VARIABLE TF_PIP)
1003-
if ("${TF_PIP}" STREQUAL "")
1004-
message(FATAL ERROR "Tensorflow pip package is also required for 'development' mode (protobuf headers)")
1005-
endif()
1006-
string(STRIP ${TF_PIP} TF_PIP)
1007-
set(TF_PROTO_HEADERS "${TF_PIP}/include")
1008-
endif()
1009-
message(STATUS "Using Tensorflow headers under: ${TF_PROTO_HEADERS}")
1010-
include_directories(${TF_PROTO_HEADERS})
1011-
add_definitions("-DGOOGLE_PROTOBUF_NO_RTTI")
1012-
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")
1013990
endif()
1014991

1015992
# For up-to-date instructions for installing the Tensorflow dependency, refer to

0 commit comments

Comments
 (0)