You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# set(FIND_ABI_CMD "import sys,os; sys.path.insert(0, os.path.join('${TENSORFLOW_ROOT}', '..')); import tensorflow; print(tensorflow.CXX11_ABI_FLAG if 'CXX11_ABI_FLAG' in tensorflow.__dict__ else tensorflow.sysconfig.CXX11_ABI_FLAG, end = '')" )
91
-
# else()
92
-
# set(FIND_ABI_CMD "import tensorflow; print(tensorflow.CXX11_ABI_FLAG if 'CXX11_ABI_FLAG' in tensorflow.__dict__ else tensorflow.sysconfig.CXX11_ABI_FLAG, end = '')")
# message(FATAL_ERROR "Failed to compile: \n ${CPP_CXX_ABI_COMPILE_OUTPUT_VAR}" )
118
-
# endif()
119
-
# if (NOT ${CPP_CXX_ABI_RUN_RESULT_VAR} EQUAL "0")
120
-
# message(FATAL_ERROR "Failed to run, return code: ${CPP_CXX_ABI}" )
121
-
# endif()
122
-
# if (DEFINED PY_CXX_ABI)
123
-
# if (NOT (${CPP_CXX_ABI} EQUAL ${PY_CXX_ABI}))
124
-
# message (WARNNING "NOT consistent CXX_ABIs: python interface of tf uses ${PY_CXX_ABI}, while c++ interface of tf uses ${CPP_CXX_ABI}, we follow c++ interface ")
# message (STATUS "User set OP_CXX_ABI=${OP_CXX_ABI} ")
132
-
#endif()
133
-
# message (STATUS "No set OP_CXX_ABI=${OP_CXX_ABI} ")
134
-
# # message the cxx_abi used during compiling
135
-
# if (${OP_CXX_ABI} EQUAL 0)
136
-
# message (STATUS "Set GLIBCXX_USE_CXX_ABI=0 when compiling ops")
137
-
# else ()
138
-
# set (OP_CXX_ABI 1)
139
-
# message (STATUS "Set GLIBCXX_USE_CXX_ABI=1 when compiling ops")
140
-
# endif ()
88
+
if (BUILD_PY_IF)
89
+
if (NOTDEFINEDOP_CXX_ABI)
90
+
if (BUILD_PY_IF)
91
+
if (DEFINEDTENSORFLOW_ROOT)
92
+
set(FIND_ABI_CMD"import sys,os; sys.path.insert(0, os.path.join('${TENSORFLOW_ROOT}', '..')); import tensorflow; print(tensorflow.CXX11_ABI_FLAG if 'CXX11_ABI_FLAG' in tensorflow.__dict__ else tensorflow.sysconfig.CXX11_ABI_FLAG, end = '')" )
93
+
else()
94
+
set(FIND_ABI_CMD"import tensorflow; print(tensorflow.CXX11_ABI_FLAG if 'CXX11_ABI_FLAG' in tensorflow.__dict__ else tensorflow.sysconfig.CXX11_ABI_FLAG, end = '')")
message(FATAL_ERROR"Failed to compile: \n${CPP_CXX_ABI_COMPILE_OUTPUT_VAR}" )
120
+
endif()
121
+
if (NOT${CPP_CXX_ABI_RUN_RESULT_VAR}EQUAL"0")
122
+
message(FATAL_ERROR"Failed to run, return code: ${CPP_CXX_ABI}" )
123
+
endif()
124
+
if (DEFINEDPY_CXX_ABI)
125
+
if (NOT (${CPP_CXX_ABI}EQUAL${PY_CXX_ABI}))
126
+
message (WARNNING"NOT consistent CXX_ABIs: python interface of tf uses ${PY_CXX_ABI}, while c++ interface of tf uses ${CPP_CXX_ABI}, we follow c++ interface ")
0 commit comments