File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ BuildRequires: bazel java-env git
99#Set tensorflow_mkldnn_contraction_kernel option
1010#https://github.com/tensorflow/tensorflow/blob/v2.12.1/tensorflow/core/kernels/BUILD#L79-L89
1111%if "%{?enable_tf_mkldnn:set}" != "set"
12- %define enable_tf_mkldnn 1
12+ #By default disable tf_mkldnn
13+ %define enable_tf_mkldnn 0
1314%endif
1415
15-
1616#Set cms_cxx_standard to 17 as LLVM downloaded by TF does not build with c++20
1717%if "%{cms_cxx_standard}" == "20"
1818%undefine cms_cxx_standard
@@ -66,8 +66,9 @@ BAZEL_OPTS="$BAZEL_OPTS $(echo %{arch_build_flags} | tr ' ' '\n' | grep -v '^$'
6666%endif
6767BAZEL_OPTS="$BAZEL_OPTS --config=%{build_type} --cxxopt=-std=c++%{cms_cxx_standard} --host_cxxopt=-std=c++%{cms_cxx_standard} %{makeprocesses}"
6868BAZEL_OPTS="$BAZEL_OPTS --config=noaws --config=nogcp --config=nohdfs --config=nonccl"
69- # always build tensorflow without mkldnn contraction kernel
69+ %if "%{enable_tf_mkldnn}" == "0"
7070BAZEL_OPTS="$BAZEL_OPTS --define=zendnn=true --define=build_with_mkl_dnn_only=false --define=build_with_mkl=false --define=enable_mkl=false --define=tensorflow_mkldnn_contraction_kernel=0 --define=build_with_mkl_opensource=false"
71+ %endif
7172%ifarch ppc64le
7273BAZEL_OPTS="$BAZEL_OPTS --define=tflite_with_xnnpack=false --define tflite_kernel_use_xnnpack=false"
7374%endif
You can’t perform that action at this time.
0 commit comments