commit c5dea288244737edb59e97a6ed3f6c81d8cc6a83 Author: Jiayi Yin Date: Sun Aug 24 20:33:16 2025 +0800 init diff --git a/aarch64_external_files.patch b/aarch64_external_files.patch new file mode 100644 index 0000000..59fcd1b --- /dev/null +++ b/aarch64_external_files.patch @@ -0,0 +1,144 @@ +diff -Nurp external-x86_64/go_sdk/BUILD.bazel external/go_sdk/BUILD.bazel +--- external-x86_64/go_sdk/BUILD.bazel 2023-08-28 15:08:25.000000000 +0800 ++++ external/go_sdk/BUILD.bazel 2023-08-31 11:47:56.000000000 +0800 +@@ -7,8 +7,8 @@ package(default_visibility = ["//visibil + filegroup( + name = "libs", + srcs = glob( +- ["pkg/linux_amd64/**/*.a"], +- exclude = ["pkg/linux_amd64/**/cmd/**"], ++ ["pkg/linux_arm64/**/*.a"], ++ exclude = ["pkg/linux_arm64/**/cmd/**"], + ), + ) + +@@ -34,7 +34,7 @@ go_sdk( + name = "go_sdk", + srcs = [":srcs"], + go = "bin/go", +- goarch = "amd64", ++ goarch = "arm64", + goos = "linux", + headers = [":headers"], + libs = [":libs"], +@@ -60,7 +60,7 @@ package_list( + + declare_toolchains( + builder = ":builder", +- host = "linux_amd64", ++ host = "linux_arm64", + sdk = ":go_sdk", + ) + +diff -Nurp external-x86_64/go_sdk/src/internal/buildcfg/zbootstrap.go external/go_sdk/src/internal/buildcfg/zbootstrap.go +--- external-x86_64/go_sdk/src/internal/buildcfg/zbootstrap.go 2022-07-12 23:23:16.000000000 +0800 ++++ external/go_sdk/src/internal/buildcfg/zbootstrap.go 2022-07-12 23:23:09.000000000 +0800 +@@ -12,7 +12,7 @@ const defaultGOMIPS64 = `hardfloat` + const defaultGOPPC64 = `power8` + const defaultGOEXPERIMENT = `` + const defaultGO_EXTLINK_ENABLED = `` +-const defaultGO_LDSO = `/lib64/ld-linux-x86-64.so.2` ++const defaultGO_LDSO = `/lib/ld-linux-aarch64.so.1` + const version = `go1.18.4` + const defaultGOOS = runtime.GOOS + const defaultGOARCH = runtime.GOARCH +diff -Nurp external-x86_64/local_config_cc/BUILD external/local_config_cc/BUILD +--- external-x86_64/local_config_cc/BUILD 2023-08-30 14:17:49.000000000 +0800 ++++ external/local_config_cc/BUILD 2023-08-31 11:49:36.000000000 +0800 +@@ -47,15 +47,15 @@ filegroup( + cc_toolchain_suite( + name = "toolchain", + toolchains = { +- "k8|compiler": ":cc-compiler-k8", +- "k8": ":cc-compiler-k8", ++ "aarch64|compiler": ":cc-compiler-aarch64", ++ "aarch64": ":cc-compiler-aarch64", + "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", + "armeabi-v7a": ":cc-compiler-armeabi-v7a", + }, + ) + + cc_toolchain( +- name = "cc-compiler-k8", ++ name = "cc-compiler-aarch64", + toolchain_identifier = "local", + toolchain_config = ":local", + all_files = ":compiler_deps", +@@ -72,7 +72,7 @@ cc_toolchain( + + cc_toolchain_config( + name = "local", +- cpu = "k8", ++ cpu = "aarch64", + compiler = "compiler", + toolchain_identifier = "local", + host_system_name = "local", +@@ -80,11 +80,11 @@ cc_toolchain_config( + target_libc = "local", + abi_version = "local", + abi_libc_version = "local", +- cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-openEuler-linux/12/include", ++ cxx_builtin_include_directories = ["/usr/lib/gcc/aarch64-openEuler-linux/12/include", + "/usr/local/include", + "/usr/include", + "/usr/include/c++/12", +- "/usr/include/c++/12/x86_64-openEuler-linux", ++ "/usr/include/c++/12/aarch64-openEuler-linux", + "/usr/include/c++/12/backward"], + tool_paths = {"ar": "/usr/bin/ar", + "ld": "/usr/bin/ld", +diff -Nurp external-x86_64/local_config_cc/builtin_include_directory_paths external/local_config_cc/builtin_include_directory_paths +--- external-x86_64/local_config_cc/builtin_include_directory_paths 2023-08-30 14:17:48.000000000 +0800 ++++ external/local_config_cc/builtin_include_directory_paths 2023-08-31 11:49:24.000000000 +0800 +@@ -4,9 +4,9 @@ changes to it will be reflected in the a + paths change, Bazel will make sure to rerun the action, even though none of + declared action inputs or the action commandline changes. + +-/usr/lib/gcc/x86_64-openEuler-linux/12/include ++/usr/lib/gcc/aarch64-openEuler-linux/12/include + /usr/local/include + /usr/include + /usr/include/c++/12 +-/usr/include/c++/12/x86_64-openEuler-linux ++/usr/include/c++/12/aarch64-openEuler-linux + /usr/include/c++/12/backward +diff -Nurp external-x86_64/local_config_cc_toolchains/BUILD external/local_config_cc_toolchains/BUILD +--- external-x86_64/local_config_cc_toolchains/BUILD 2023-08-30 14:17:45.000000000 +0800 ++++ external/local_config_cc_toolchains/BUILD 2023-08-31 11:47:52.000000000 +0800 +@@ -1,10 +1,10 @@ + load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS") + + toolchain( +- name = "cc-toolchain-k8", ++ name = "cc-toolchain-aarch64", + exec_compatible_with = HOST_CONSTRAINTS, + target_compatible_with = HOST_CONSTRAINTS, +- toolchain = "@local_config_cc//:cc-compiler-k8", ++ toolchain = "@local_config_cc//:cc-compiler-aarch64", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", + ) + +diff -Nurp external-x86_64/local_config_platform/constraints.bzl external/local_config_platform/constraints.bzl +--- external-x86_64/local_config_platform/constraints.bzl 2023-08-30 15:04:11.000000000 +0800 ++++ external/local_config_platform/constraints.bzl 2023-09-05 15:51:53.000000000 +0800 +@@ -1,6 +1,6 @@ + # DO NOT EDIT: automatically generated constraints list for local_config_platform + # Auto-detected host platform constraints. + HOST_CONSTRAINTS = [ +- '@platforms//cpu:x86_64', ++ '@platforms//cpu:aarch64', + '@platforms//os:linux', + ] ++ENV:PATH /root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +diff -Nurp external-x86_64/local_execution_config_platform/BUILD external/local_execution_config_platform/BUILD +--- external-x86_64/local_execution_config_platform/BUILD 2023-08-28 15:02:02.000000000 +0800 ++++ external/local_execution_config_platform/BUILD 2023-08-31 11:47:06.000000000 +0800 +@@ -18,7 +18,7 @@ platform( + name = "platform", + visibility = ["//visibility:public"], + constraint_values = [ +- "@platforms//cpu:x86_64", ++ "@platforms//cpu:aarch64", + "@platforms//os:linux", + ":platform_constraint", + ], diff --git a/external.tar.bz2.partaa b/external.tar.bz2.partaa new file mode 100644 index 0000000..ef63e90 Binary files /dev/null and b/external.tar.bz2.partaa differ diff --git a/external.tar.bz2.partab b/external.tar.bz2.partab new file mode 100644 index 0000000..cc56956 Binary files /dev/null and b/external.tar.bz2.partab differ diff --git a/external.tar.bz2.partac b/external.tar.bz2.partac new file mode 100644 index 0000000..58d60a5 Binary files /dev/null and b/external.tar.bz2.partac differ diff --git a/fix-boringssl-compile.patch b/fix-boringssl-compile.patch new file mode 100644 index 0000000..6427ddb --- /dev/null +++ b/fix-boringssl-compile.patch @@ -0,0 +1,16 @@ +--- tensorflow-2.12.1/tensorflow/workspace2.bzl.ori 2023-06-27 18:05:39.000000000 +0000 ++++ tensorflow-2.12.1/tensorflow/workspace2.bzl 2023-09-07 07:33:25.037000000 +0000 +@@ -567,10 +567,10 @@ def _tf_repositories(): + + tf_http_archive( + name = "boringssl", +- sha256 = "534fa658bd845fd974b50b10f444d392dfd0d93768c4a51b61263fd37d851c40", +- strip_prefix = "boringssl-b9232f9e27e5668bc0414879dcdedb2a59ea75f2", ++ sha256 = "9dc53f851107eaf87b391136d13b815df97ec8f76dadb487b58b2fc45e624d2c", ++ strip_prefix = "boringssl-c00d7ca810e93780bd0c8ee4eea28f4f2ea4bcdc", + system_build_file = "//third_party/systemlibs:boringssl.BUILD", +- urls = tf_mirror_urls("https://github.com/google/boringssl/archive/b9232f9e27e5668bc0414879dcdedb2a59ea75f2.tar.gz"), ++ urls = tf_mirror_urls("https://github.com/google/boringssl/archive/c00d7ca810e93780bd0c8ee4eea28f4f2ea4bcdc.tar.gz"), + ) + + # Note: if you update this, you have to update libpng too. See cl/437813808 diff --git a/modify-deps-on-libclang-gcsfs-gast.patch b/modify-deps-on-libclang-gcsfs-gast.patch new file mode 100644 index 0000000..f7cf468 --- /dev/null +++ b/modify-deps-on-libclang-gcsfs-gast.patch @@ -0,0 +1,36 @@ +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -86,13 +86,13 @@ REQUIRED_PACKAGES = [ + 'astunparse >= 1.6.0', + 'flatbuffers >= 2.0', + # TODO(b/213222745) gast versions above 0.4.0 break TF's tests +- 'gast >= 0.2.1, <= 0.4.0', ++ 'gast >= 0.2.1', + 'google_pasta >= 0.1.1', + 'h5py >= 2.9.0', + # TODO(b/239052279): replace with external dependency on JAX repo once JAX + # no longer relies on TF. +- 'jax >= 0.3.15', +- 'libclang >= 13.0.0', ++ #'jax >= 0.3.15', ++ #'libclang >= 13.0.0', + # TODO(b/263178356): numpy 1.24 breaks TF's tests + 'numpy >= 1.22, <= 1.24.3', + 'opt_einsum >= 2.3.2', +@@ -108,12 +108,12 @@ REQUIRED_PACKAGES = [ + 'setuptools', + 'six >= 1.12.0', + 'termcolor >= 1.1.0', +- 'typing_extensions>=3.6.6,<4.6.0', ++ 'typing_extensions>=3.6.6,<=4.10.0', + # TODO(b/266362323): wrapt==1.15.0rc0 incompatible with TF 2.12.0 RC0 (and + # nightly, but works with TF 2.11) +- 'wrapt >= 1.11.0, <1.15', +- 'tensorflow-io-gcs-filesystem >= 0.23.1;platform_machine!="arm64" or ' + +- 'platform_system!="Darwin"', ++ 'wrapt >= 1.11.0', ++ #'tensorflow-io-gcs-filesystem >= 0.23.1;platform_machine!="arm64" or ' + ++ #'platform_system!="Darwin"', + # grpcio does not build correctly on big-endian machines due to lack of + # BoringSSL support. + # See https://github.com/tensorflow/tensorflow/issues/17882. diff --git a/riscv64_external_files.patch b/riscv64_external_files.patch new file mode 100644 index 0000000..6d2a62a --- /dev/null +++ b/riscv64_external_files.patch @@ -0,0 +1,163 @@ +diff -Nurp external-x86_64/go_sdk/BUILD.bazel external/go_sdk/BUILD.bazel +--- external-x86_64/go_sdk/BUILD.bazel 2023-08-28 15:08:25.000000000 +0800 ++++ external/go_sdk/BUILD.bazel 2023-08-31 11:47:56.000000000 +0800 +@@ -7,8 +7,8 @@ package(default_visibility = ["//visibil + filegroup( + name = "libs", + srcs = glob( +- ["pkg/linux_amd64/**/*.a"], +- exclude = ["pkg/linux_amd64/**/cmd/**"], ++ ["pkg/linux_riscv64/**/*.a"], ++ exclude = ["pkg/linux_riscv64/**/cmd/**"], + ), + ) + +@@ -34,7 +34,7 @@ go_sdk( + name = "go_sdk", + srcs = [":srcs"], + go = "bin/go", +- goarch = "amd64", ++ goarch = "riscv64", + goos = "linux", + headers = [":headers"], + libs = [":libs"], +@@ -60,7 +60,7 @@ package_list( + + declare_toolchains( + builder = ":builder", +- host = "linux_amd64", ++ host = "linux_riscv64", + sdk = ":go_sdk", + ) + +diff -Nurp external-x86_64/go_sdk/src/internal/buildcfg/zbootstrap.go external/go_sdk/src/internal/buildcfg/zbootstrap.go +--- external-x86_64/go_sdk/src/internal/buildcfg/zbootstrap.go 2022-07-12 23:23:16.000000000 +0800 ++++ external/go_sdk/src/internal/buildcfg/zbootstrap.go 2022-07-12 23:23:09.000000000 +0800 +@@ -12,7 +12,7 @@ const defaultGOMIPS64 = `hardfloat` + const defaultGOPPC64 = `power8` + const defaultGOEXPERIMENT = `` + const defaultGO_EXTLINK_ENABLED = `` +-const defaultGO_LDSO = `/lib64/ld-linux-x86-64.so.2` ++const defaultGO_LDSO = `/lib/ld-linux-riscv64-lp64d.so.1` + const version = `go1.18.4` + const defaultGOOS = runtime.GOOS + const defaultGOARCH = runtime.GOARCH +diff -Nurp external-x86_64/local_config_cc/BUILD external/local_config_cc/BUILD +--- external-x86_64/local_config_cc/BUILD 2023-08-30 14:17:49.000000000 +0800 ++++ external/local_config_cc/BUILD 2023-08-31 11:49:36.000000000 +0800 +@@ -47,15 +47,15 @@ filegroup( + cc_toolchain_suite( + name = "toolchain", + toolchains = { +- "k8|compiler": ":cc-compiler-k8", +- "k8": ":cc-compiler-k8", ++ "riscv64|compiler": ":cc-compiler-riscv64", ++ "riscv64": ":cc-compiler-riscv64", + "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", + "armeabi-v7a": ":cc-compiler-armeabi-v7a", + }, + ) + + cc_toolchain( +- name = "cc-compiler-k8", ++ name = "cc-compiler-riscv64", + toolchain_identifier = "local", + toolchain_config = ":local", + all_files = ":compiler_deps", +@@ -72,7 +72,7 @@ cc_toolchain( + + cc_toolchain_config( + name = "local", +- cpu = "k8", ++ cpu = "riscv64", + compiler = "compiler", + toolchain_identifier = "local", + host_system_name = "local", +@@ -80,11 +80,11 @@ cc_toolchain_config( + target_libc = "local", + abi_version = "local", + abi_libc_version = "local", +- cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-openEuler-linux/12/include", ++ cxx_builtin_include_directories = ["/usr/lib/gcc/riscv64-openEuler-linux/12/include", + "/usr/local/include", + "/usr/include", + "/usr/include/c++/12", +- "/usr/include/c++/12/x86_64-openEuler-linux", ++ "/usr/include/c++/12/riscv64-openEuler-linux", + "/usr/include/c++/12/backward"], + tool_paths = {"ar": "/usr/bin/ar", + "ld": "/usr/bin/ld", +@@ -110,8 +110,7 @@ cc_toolchain_config( + "-fdata-sections"], + dbg_compile_flags = ["-g"], + cxx_flags = ["-std=c++0x"], +- link_flags = ["-fuse-ld=gold", +- "-Wl,-no-as-needed", ++ link_flags = ["-Wl,-no-as-needed", + "-Wl,-z,relro,-z,now", + "-B/usr/bin", + "-pass-exit-codes"], +@@ -125,7 +124,7 @@ cc_toolchain_config( + "-D__TIME__=\"redacted\""], + coverage_compile_flags = ["--coverage"], + coverage_link_flags = ["--coverage"], +- supports_start_end_lib = True, ++ supports_start_end_lib = False, + ) + + # Android tooling requires a default toolchain for the armeabi-v7a cpu. +diff -Nurp external-x86_64/local_config_cc/builtin_include_directory_paths external/local_config_cc/builtin_include_directory_paths +--- external-x86_64/local_config_cc/builtin_include_directory_paths 2023-08-30 14:17:48.000000000 +0800 ++++ external/local_config_cc/builtin_include_directory_paths 2023-08-31 11:49:24.000000000 +0800 +@@ -4,9 +4,9 @@ changes to it will be reflected in the a + paths change, Bazel will make sure to rerun the action, even though none of + declared action inputs or the action commandline changes. + +-/usr/lib/gcc/x86_64-openEuler-linux/12/include ++/usr/lib/gcc/riscv64-openEuler-linux/12/include + /usr/local/include + /usr/include + /usr/include/c++/12 +-/usr/include/c++/12/x86_64-openEuler-linux ++/usr/include/c++/12/riscv64-openEuler-linux + /usr/include/c++/12/backward +diff -Nurp external-x86_64/local_config_cc_toolchains/BUILD external/local_config_cc_toolchains/BUILD +--- external-x86_64/local_config_cc_toolchains/BUILD 2023-08-30 14:17:45.000000000 +0800 ++++ external/local_config_cc_toolchains/BUILD 2023-08-31 11:47:52.000000000 +0800 +@@ -1,10 +1,10 @@ + load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS") + + toolchain( +- name = "cc-toolchain-k8", ++ name = "cc-toolchain-riscv64", + exec_compatible_with = HOST_CONSTRAINTS, + target_compatible_with = HOST_CONSTRAINTS, +- toolchain = "@local_config_cc//:cc-compiler-k8", ++ toolchain = "@local_config_cc//:cc-compiler-riscv64", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", + ) + +diff -Nurp external-x86_64/local_config_platform/constraints.bzl external/local_config_platform/constraints.bzl +--- external-x86_64/local_config_platform/constraints.bzl 2023-08-30 15:04:11.000000000 +0800 ++++ external/local_config_platform/constraints.bzl 2023-09-05 15:51:53.000000000 +0800 +@@ -1,6 +1,6 @@ + # DO NOT EDIT: automatically generated constraints list for local_config_platform + # Auto-detected host platform constraints. + HOST_CONSTRAINTS = [ +- '@platforms//cpu:x86_64', ++ '@platforms//cpu:riscv64', + '@platforms//os:linux', + ] ++ENV:PATH /root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +diff -Nurp external-x86_64/local_execution_config_platform/BUILD external/local_execution_config_platform/BUILD +--- external-x86_64/local_execution_config_platform/BUILD 2023-08-28 15:02:02.000000000 +0800 ++++ external/local_execution_config_platform/BUILD 2023-08-31 11:47:06.000000000 +0800 +@@ -18,7 +18,7 @@ platform( + name = "platform", + visibility = ["//visibility:public"], + constraint_values = [ +- "@platforms//cpu:x86_64", ++ "@platforms//cpu:riscv64", + "@platforms//os:linux", + ":platform_constraint", + ], diff --git a/tensorflow-2.12.1.tar.gz b/tensorflow-2.12.1.tar.gz new file mode 100644 index 0000000..1eb4d1c Binary files /dev/null and b/tensorflow-2.12.1.tar.gz differ diff --git a/tensorflow.spec b/tensorflow.spec new file mode 100644 index 0000000..c7b91d2 --- /dev/null +++ b/tensorflow.spec @@ -0,0 +1,117 @@ +%global _empty_manifest_terminate_build 0 +Name: tensorflow +Version: 2.12.1 +Release: 3 +Summary: An Open Source Machine Learning Framework for Everyone +License: Apache License 2.0 +URL: https://www.tensorflow.org/ +Source0: https://github.com/tensorflow/tensorflow/archive/v%{version}.tar.gz#/tensorflow-%{version}.tar.gz +Source1: external.tar.bz2.partaa +Source2: external.tar.bz2.partab +Source3: external.tar.bz2.partac +Patch0: modify-deps-on-libclang-gcsfs-gast.patch +Patch1: fix-boringssl-compile.patch +%ifarch aarch64 +Patch1000: aarch64_external_files.patch +%endif +%ifarch riscv64 +Patch1100: riscv64_external_files.patch +%endif +Requires: python3-future python3-numpy python3-six python3-astunparse python3-google-pasta python3-opt-einsum +Requires: python3-typing-extensions python3-wrapt python3-h5py python3-protobuf python3-grpcio python3-absl-py +Requires: python3-flatbuffers python3-gast + +%description +TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. + +TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence Research organization to conduct machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well. + +TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages. + +%package -n python3-tensorflow +Summary: An Open Source Machine Learning Framework for Everyone +Provides: python-tensorflow +Provides: python%{python3_version}dist(tensorflow) = %{version} +BuildRequires: bazel == 5.3.0 gcc gcc-c++ git +BuildRequires: python3-numpy python3-devel python3-Keras-Preprocessing python3-pip python3-wheel python3-packaging python3-requests + +%description -n python3-tensorflow +TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. + +TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence Research organization to conduct machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well. + +TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages. + +%prep +%setup -n %{name}-%{version} +%patch 0 -p1 +%patch 1 -p1 +extdir=$(bazel --output_user_root=`pwd`/../output_user_root info output_base) +mkdir -p ${extdir} +instdir=$(bazel --output_user_root=`pwd`/../output_user_root info install_base) +cat %{SOURCE1} %{SOURCE2} %{SOURCE3} > external.tar.bz2 +tar xf external.tar.bz2 -C ${extdir} +%ifarch aarch64 +%patch 1000 -p0 -d ${extdir} +%endif +%ifarch riscv64 +%patch 1100 -p0 -d ${extdir} +%endif +ln -sfn ${instdir}/embedded_tools ${extdir}/external/bazel_tools +for f in $(find $extdir/external -lname "*/external/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${extdir}/external/${OLDLINK#*external}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f; done +for f in $(find $extdir/external -lname "*/rpmbuild/*"); do OLDLINK=$(readlink $f); echo $OLDLINK; NEWLINK=${HOME}/rpmbuild/${OLDLINK#*rpmbuild}; ln -sf $NEWLINK $f-newlink; mv -Tf $f-newlink $f;done +#rm -rf ${extdir}/external/local_config* + +%build +mkdir -p ${HOME}/.local/bin +ln -s -f -T $(command -v python3) ${HOME}/.local/bin/python +export PATH=${HOME}/.local/bin:$PATH +%ifarch riscv64 +bazel --output_user_root=`pwd`/../output_user_root build --nofetch --host_copt=-Wno-stringop-truncation //tensorflow/tools/pip_package:build_pip_package --verbose_failures --experimental_local_memory_estimate --jobs=16 \ +--define=build_with_mkl=false --define=enable_mkl=false --define=tensorflow_mkldnn_contraction_kernel=0 --define=build_with_mkl_dnn_v1_only=false --define=tensorflow_use_mkldnn=false +%else +bazel --output_user_root=`pwd`/../output_user_root build --nofetch --host_copt=-Wno-stringop-truncation //tensorflow/tools/pip_package:build_pip_package --verbose_failures --experimental_local_memory_estimate --jobs=16 +%endif +./bazel-bin/tensorflow/tools/pip_package/build_pip_package dist + +%install +%py3_install_wheel * + +%files -n python3-tensorflow +%{python3_sitearch}/* +%{_bindir}/* + +%changelog +* Mon Dec 23 2024 misaka00251 - 2.12.1-3 +- Use patch macro instead of patch command + +* Thu Dec 12 2024 Dingli Zhang - 2.12.1-2 +- Add support for riscv64 + +* Tue Apr 02 2024 zhangxianting - 2.12.1-1 +* Increase the upper limit version of typing_extensions to fix install, typing_extensions>=3.6.6,<4.6.0 to typing_extensions>=3.6.6,<=4.10.0 + +* Wed Sep 13 2023 Jincheng Miao - 2.12.1-0 +- update version to 2.12.1 + +* Fri Apr 14 2023 ZhangChao - 2.10.0-3 +- Fix EBS build + +* Wed Nov 30 2022 Jincheng Miao - 2.10.0-2 +- Modify dependency on gast + +* Mon Nov 14 2022 Jincheng Miao - 2.10.0-1 +- update version to 2.10.0 for oneDNN with AMX + +* Thu Sep 22 2022 chendexi -2.8.2-3 +- Add provides and fix build error + +* Tue Aug 30 2022 zhangshaoning -2.8.2-2 +- fix packaging issue + +* Thu Jun 23 2022 zhangshaoning -2.8.2-1 +- update version to 2.8.2 +- fix some cves + +* Wed Sep 30 2020 Zhipeng Xie - 2.3.1-1 +- Package init