Fix ./configure script
1. Add %workspace% in .bazelrc file when using import statement 2. Write action_env into bazelrc file for required environment variables for OpenCL support Change: 152290700
This commit is contained in:
parent
765006ea74
commit
8268476073
6
configure
vendored
6
configure
vendored
@ -56,7 +56,7 @@ rm -f .tf_configure.bazelrc
|
|||||||
touch .tf_configure.bazelrc
|
touch .tf_configure.bazelrc
|
||||||
touch .bazelrc
|
touch .bazelrc
|
||||||
sed_hyphen_i "/tf_configure/d" .bazelrc
|
sed_hyphen_i "/tf_configure/d" .bazelrc
|
||||||
echo "import .tf_configure.bazelrc" >> .bazelrc
|
echo "import %workspace%/.tf_configure.bazelrc" >> .bazelrc
|
||||||
|
|
||||||
# Delete any leftover BUILD files from the Makefile build, which would interfere
|
# Delete any leftover BUILD files from the Makefile build, which would interfere
|
||||||
# with Bazel parsing.
|
# with Bazel parsing.
|
||||||
@ -284,6 +284,7 @@ export TF_NEED_CUDA
|
|||||||
write_action_env_to_bazelrc "TF_NEED_CUDA" "$TF_NEED_CUDA"
|
write_action_env_to_bazelrc "TF_NEED_CUDA" "$TF_NEED_CUDA"
|
||||||
|
|
||||||
export TF_NEED_OPENCL
|
export TF_NEED_OPENCL
|
||||||
|
write_action_env_to_bazelrc "TF_NEED_OPENCL" "$TF_NEED_OPENCL"
|
||||||
|
|
||||||
if [ "$TF_NEED_CUDA" == "1" ]; then
|
if [ "$TF_NEED_CUDA" == "1" ]; then
|
||||||
while [[ "$TF_CUDA_CLANG" == "" ]]; do
|
while [[ "$TF_CUDA_CLANG" == "" ]]; do
|
||||||
@ -547,6 +548,7 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
if [ -e "$HOST_CXX_COMPILER" ]; then
|
if [ -e "$HOST_CXX_COMPILER" ]; then
|
||||||
export HOST_CXX_COMPILER
|
export HOST_CXX_COMPILER
|
||||||
|
write_action_env_to_bazelrc "HOST_CXX_COMPILER" "$HOST_CXX_COMPILER"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Invalid C++ compiler path. ${HOST_CXX_COMPILER} cannot be found" 1>&2
|
echo "Invalid C++ compiler path. ${HOST_CXX_COMPILER} cannot be found" 1>&2
|
||||||
@ -570,6 +572,7 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
if [ -e "$HOST_C_COMPILER" ]; then
|
if [ -e "$HOST_C_COMPILER" ]; then
|
||||||
export HOST_C_COMPILER
|
export HOST_C_COMPILER
|
||||||
|
write_action_env_to_bazelrc "HOST_C_COMPILER" "$HOST_C_COMPILER"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Invalid C compiler path. ${HOST_C_COMPILER} cannot be found" 1>&2
|
echo "Invalid C compiler path. ${HOST_C_COMPILER} cannot be found" 1>&2
|
||||||
@ -600,6 +603,7 @@ while true; do
|
|||||||
|
|
||||||
if [ -e "${COMPUTECPP_TOOLKIT_PATH}/${SYCL_RT_LIB_PATH}" ]; then
|
if [ -e "${COMPUTECPP_TOOLKIT_PATH}/${SYCL_RT_LIB_PATH}" ]; then
|
||||||
export COMPUTECPP_TOOLKIT_PATH
|
export COMPUTECPP_TOOLKIT_PATH
|
||||||
|
write_action_env_to_bazelrc "COMPUTECPP_TOOLKIT_PATH" "$COMPUTECPP_TOOLKIT_PATH"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Invalid SYCL $TF_OPENCL_VERSION library path. ${COMPUTECPP_TOOLKIT_PATH}/${SYCL_RT_LIB_PATH} cannot be found"
|
echo "Invalid SYCL $TF_OPENCL_VERSION library path. ${COMPUTECPP_TOOLKIT_PATH}/${SYCL_RT_LIB_PATH} cannot be found"
|
||||||
|
Loading…
Reference in New Issue
Block a user