Skip to content

Commit

Permalink
by default disable gpu build support
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Feb 22, 2022
1 parent 00f05aa commit 62b6e91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions tensorflow-requires.file
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Requires: py3-cython py3-protobuf py3-astor py3-six py3-termcolor py3-absl-py
Requires: py3-opt-einsum py3-flatbuffers
Requires: eigen protobuf zlib libpng libjpeg-turbo curl giflib sqlite grpc flatbuffers py3-pybind11
BuildRequires: py3-wheel
%if %{enable_gpu}
%if "%{cmsos}" != "slc7_aarch64"
## INCLUDE cuda-flags
%define enable_cuda 1
Requires: cuda cudnn
%else
%define enable_cuda 0
%define enable_gpu 0
%endif
%endif
6 changes: 2 additions & 4 deletions tensorflow-sources.file
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BAZEL_OPTS="$BAZEL_OPTS --copt=-mcpu=native --copt=-mtune=native"
BAZEL_OPTS="$BAZEL_OPTS --config=%{build_type} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 %{makeprocesses}"
BAZEL_OPTS="$BAZEL_OPTS --config=noaws --config=nogcp --config=nohdfs --config=nonccl"

%if %{enable_cuda}
%if %{enable_gpu}
BAZEL_OPTS="$BAZEL_OPTS --config=cuda"
export GCC_HOST_COMPILER_PREFIX=${GCC_ROOT}/bin
export GCC_HOST_COMPILER_PATH=$(which gcc)
Expand All @@ -52,10 +52,8 @@ export TF_CUDA_VERSION="$(echo ${CUDA_VERSION} | cut -f1,2 -d.)"
export TF_CUDA_PATHS="${CUDA_ROOT},${CUDNN_ROOT}"
export TF_CUDA_CLANG=0
export cuda=Y
export TF_NEED_CUDA=1
%else
export TF_NEED_CUDA=0
%endif
export TF_NEED_CUDA=%{enable_gpu}
export TF_NEED_JEMALLOC=0
export TF_NEED_HDFS=0
export TF_NEED_GCP=0
Expand Down
1 change: 1 addition & 0 deletions tensorflow-sources.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
%define python_env PYTHON3PATH
%define build_type opt
%define pythonOnly no
%define enable_gpu 0
%define vectorize_flag -msse3
## INCLUDE tensorflow-sources

0 comments on commit 62b6e91

Please sign in to comment.