From 56dc0e449f2a0fdf190cfc1de367b148cbb5e467 Mon Sep 17 00:00:00 2001 From: Anthony Donnelly Date: Tue, 13 Sep 2022 13:21:29 -0700 Subject: [PATCH] science/py-tensorflow: Update 1.15.5 -> 2.9.1 Big thank you to Anthony Donnelly for updating this difficult port. PR: 266303 --- science/py-tensorflow/Makefile | 180 ++-- science/py-tensorflow/Makefile.MASTER_SITES | 94 +- science/py-tensorflow/distinfo | 98 +- .../files/bazel/add-default-option.patch | 37 + .../files/bazel/fix-environ.patch | 42 + .../files/bazel/fix_cpuinfo.patch | 80 ++ .../files/bazel/freebsd_python_fix.patch | 11 + .../py-tensorflow/files/bazel/set-c++17.patch | 11 + science/py-tensorflow/files/bazelrc | 24 +- ...h-absl_base_internal_unscaledcycleclock.cc | 47 - science/py-tensorflow/files/freebsd/BUILD | 88 ++ .../files/freebsd/cc_toolchain_config.bzl | 287 ++++++ science/py-tensorflow/files/patch-.bazelrc | 22 + science/py-tensorflow/files/patch-WORKSPACE | 61 +- science/py-tensorflow/files/patch-bazelrc | 11 - science/py-tensorflow/files/patch-configure | 11 + science/py-tensorflow/files/patch-protobuf | 22 - .../files/patch-tensorflow_BUILD | 22 + ...tch-tensorflow_compiler_mlir_hlo_WORKSPACE | 11 + .../patch-tensorflow_compiler_mlir_lite_BUILD | 10 - ...flow_compiler_mlir_lite_quantization_BUILD | 8 - ...ompiler_mlir_quantization_tensorflow_BUILD | 11 + ...-tensorflow_compiler_mlir_tensorflow_BUILD | 10 - .../patch-tensorflow_contrib_bigtable_BUILD | 20 - ...ch-tensorflow_contrib_boosted__trees_BUILD | 24 - ...ch-tensorflow_contrib_ffmpeg_default_BUILD | 10 - ...nels_client_ignite__plain__client__unix.cc | 13 - ...patch-tensorflow_contrib_makefile_Makefile | 49 - .../files/patch-tensorflow_core_BUILD | 44 +- ...orflow_core_distributed__runtime_rpc_BUILD | 10 - ...tributed__runtime_rpc_grpc__server__lib.cc | 15 - .../files/patch-tensorflow_core_lib_png_BUILD | 10 + .../patch-tensorflow_core_platform_BUILD | 10 + ...patch-tensorflow_core_platform_cloud_BUILD | 10 - ...low_core_platform_cloud_gcs__dns__cache.cc | 14 - ...ch-tensorflow_core_profiler_internal_BUILD | 10 - ...-tensorflow_core_profiler_rpc_client_BUILD | 19 - ...-tensorflow_core_protobuf_autotuning.proto | 21 - ...o_tools_make_targets_freebsd__makefile.inc | 13 - ...tch-tensorflow_lite_kernels_internal_BUILD | 11 - ...low_lite_python_interpreter__wrapper_BUILD | 10 - .../files/patch-tensorflow_lite_tools_BUILD | 10 - .../patch-tensorflow_lite_tools_make_Makefile | 19 - ...e_tools_make_targets_freebsd__makefile.inc | 19 - ...patch-tensorflow_lite_tools_optimize_BUILD | 20 - ...flow_lite_tools_optimize_calibration_BUILD | 34 - ...ensorflow_python_eager_pywrap__tfe__src.cc | 20 - ...tch-tensorflow_python_lib_core_bfloat16.cc | 11 - ...python_lib_core_ndarray__tensor__bridge.cc | 11 - ...stream__executor_stream__executor__pimpl.h | 10 - .../files/patch-tensorflow_tensorflow.bzl | 65 -- .../patch-tensorflow_tools_lib__package_BUILD | 18 - ...tch-tensorflow_tools_pip__package_setup.py | 34 + .../patch-tensorflow_tools_proto__text_BUILD | 10 + .../files/patch-tensorflow_workspace.bzl | 18 - .../files/patch-tensorflow_workspace2.bzl | 10 + ...hird__party_absl_system.absl.strings.BUILD | 26 + .../files/patch-third__party_aws_BUILD.bazel | 13 - ...patch-third__party_com__google__absl.BUILD | 13 - .../patch-third__party_cpuinfo_cpuinfo.BUILD | 51 + .../patch-third__party_cpuinfo_workspace.bzl | 9 + ...atch-third__party_flatbuffers_BUILD.system | 18 - ...-third__party_llvm_macos__build__fix.patch | 11 + .../patch-third__party_llvm_workspace.bzl | 10 + .../files/patch-third__party_mlir_BUILD | 10 - .../files/patch-third__party_py_BUILD.tpl | 17 + ...te__config_remote__platform__configure.bzl | 19 + ...-third__party_systemlibs_functools32.BUILD | 18 - .../patch-third__party_systemlibs_grpc.BUILD | 11 - ...atch-third__party_systemlibs_jsoncpp.BUILD | 21 - ...tch-third__party_systemlibs_protobuf.BUILD | 25 + ...patch-third__party_systemlibs_protobuf.bzl | 11 - ...d__party_systemlibs_syslibs__configure.bzl | 10 - science/py-tensorflow/files/tensorflow.pc | 11 + science/py-tensorflow/files/tensorflow_cc.pc | 11 + science/py-tensorflow/pkg-plist | 908 ++++++++++++++++++ 76 files changed, 2089 insertions(+), 954 deletions(-) create mode 100644 science/py-tensorflow/files/bazel/add-default-option.patch create mode 100644 science/py-tensorflow/files/bazel/fix-environ.patch create mode 100644 science/py-tensorflow/files/bazel/fix_cpuinfo.patch create mode 100644 science/py-tensorflow/files/bazel/freebsd_python_fix.patch create mode 100644 science/py-tensorflow/files/bazel/set-c++17.patch delete mode 100644 science/py-tensorflow/files/extra-patch-absl_base_internal_unscaledcycleclock.cc create mode 100644 science/py-tensorflow/files/freebsd/BUILD create mode 100644 science/py-tensorflow/files/freebsd/cc_toolchain_config.bzl create mode 100644 science/py-tensorflow/files/patch-.bazelrc delete mode 100644 science/py-tensorflow/files/patch-bazelrc create mode 100644 science/py-tensorflow/files/patch-configure delete mode 100644 science/py-tensorflow/files/patch-protobuf create mode 100644 science/py-tensorflow/files/patch-tensorflow_BUILD create mode 100644 science/py-tensorflow/files/patch-tensorflow_compiler_mlir_hlo_WORKSPACE delete mode 100644 science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_quantization_BUILD create mode 100644 science/py-tensorflow/files/patch-tensorflow_compiler_mlir_quantization_tensorflow_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_compiler_mlir_tensorflow_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_contrib_bigtable_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_contrib_boosted__trees_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_contrib_ffmpeg_default_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_contrib_ignite_kernels_client_ignite__plain__client__unix.cc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_contrib_makefile_Makefile delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_grpc__server__lib.cc create mode 100644 science/py-tensorflow/files/patch-tensorflow_core_lib_png_BUILD create mode 100644 science/py-tensorflow/files/patch-tensorflow_core_platform_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_gcs__dns__cache.cc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_profiler_internal_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_profiler_rpc_client_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_core_protobuf_autotuning.proto delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_experimental_micro_tools_make_targets_freebsd__makefile.inc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_kernels_internal_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_python_interpreter__wrapper_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_tools_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_tools_make_Makefile delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_tools_make_targets_freebsd__makefile.inc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_calibration_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_python_eager_pywrap__tfe__src.cc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_python_lib_core_bfloat16.cc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_python_lib_core_ndarray__tensor__bridge.cc delete mode 100644 science/py-tensorflow/files/patch-tensorflow_stream__executor_stream__executor__pimpl.h delete mode 100644 science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl delete mode 100644 science/py-tensorflow/files/patch-tensorflow_tools_lib__package_BUILD create mode 100644 science/py-tensorflow/files/patch-tensorflow_tools_pip__package_setup.py create mode 100644 science/py-tensorflow/files/patch-tensorflow_tools_proto__text_BUILD delete mode 100644 science/py-tensorflow/files/patch-tensorflow_workspace.bzl create mode 100644 science/py-tensorflow/files/patch-tensorflow_workspace2.bzl create mode 100644 science/py-tensorflow/files/patch-third__party_absl_system.absl.strings.BUILD delete mode 100644 science/py-tensorflow/files/patch-third__party_aws_BUILD.bazel delete mode 100644 science/py-tensorflow/files/patch-third__party_com__google__absl.BUILD create mode 100644 science/py-tensorflow/files/patch-third__party_cpuinfo_cpuinfo.BUILD create mode 100644 science/py-tensorflow/files/patch-third__party_cpuinfo_workspace.bzl delete mode 100644 science/py-tensorflow/files/patch-third__party_flatbuffers_BUILD.system create mode 100644 science/py-tensorflow/files/patch-third__party_llvm_macos__build__fix.patch create mode 100644 science/py-tensorflow/files/patch-third__party_llvm_workspace.bzl delete mode 100644 science/py-tensorflow/files/patch-third__party_mlir_BUILD create mode 100644 science/py-tensorflow/files/patch-third__party_py_BUILD.tpl create mode 100644 science/py-tensorflow/files/patch-third__party_remote__config_remote__platform__configure.bzl delete mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_functools32.BUILD delete mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_grpc.BUILD delete mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_jsoncpp.BUILD create mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.BUILD delete mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.bzl delete mode 100644 science/py-tensorflow/files/patch-third__party_systemlibs_syslibs__configure.bzl create mode 100644 science/py-tensorflow/files/tensorflow.pc create mode 100644 science/py-tensorflow/files/tensorflow_cc.pc create mode 100644 science/py-tensorflow/pkg-plist diff --git a/science/py-tensorflow/Makefile b/science/py-tensorflow/Makefile index 8ebaa584bb03..b7f89a66198d 100644 --- a/science/py-tensorflow/Makefile +++ b/science/py-tensorflow/Makefile @@ -1,7 +1,6 @@ PORTNAME= tensorflow DISTVERSIONPREFIX= v -DISTVERSION= 1.15.5 -PORTREVISION= 7 +DISTVERSION= 2.9.1 CATEGORIES= science python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DIST_SUBDIR= ${PORTNAME} @@ -14,18 +13,20 @@ WWW= https://www.tensorflow.org LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= does not build: candidate function template not viable: requires 3 arguments, but 2 were provided - -ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le +ONLY_FOR_ARCHS= amd64 BUILD_DEPENDS= ${RUN_DEPENDS} \ ${PYTHON_PKGNAMEPREFIX}grpcio-tools>=1.22.0:devel/py-grpcio-tools@${PY_FLAVOR} \ bash:shells/bash \ cython:lang/cython \ swig:devel/swig \ - bazel:devel/bazel029 \ - git:devel/git -LIB_DEPENDS= libsnappy.so:archivers/snappy \ + bazel:devel/bazel \ + git:devel/git \ + clang-devel:devel/llvm-devel +LIB_DEPENDS= libnsync.so:devel/nsync \ + libgpr.so:devel/grpc \ + libpng.so:graphics/png \ + libsnappy.so:archivers/snappy \ liblmdb.so:databases/lmdb \ libsqlite3.so:databases/sqlite3 \ libicuio.so:devel/icu \ @@ -36,27 +37,31 @@ LIB_DEPENDS= libsnappy.so:archivers/snappy \ libprotobuf-c.so:devel/protobuf-c \ libre2.so:devel/re2 \ libgif.so:graphics/giflib \ - libpng.so:graphics/png \ - libgpr.so:devel/grpc \ libcurl.so:ftp/curl \ - libgoogle_cloud_cpp_common.so:devel/google-cloud-cpp117 \ libflatbuffers.so:devel/flatbuffers \ libdouble-conversion.so:devel/double-conversion -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}absl>=0.7.0:devel/py-absl@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}astor>=0.5:devel/py-astor@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}gast>=0.2.2:devel/py-gast@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}numpy>=1.11.2:math/py-numpy@${PY_FLAVOR} \ +RUN_DEPENDS= pybind11>=2.6.2:devel/pybind11 \ + ${PYTHON_PKGNAMEPREFIX}absl-py>=1.0.0:devel/py-absl-py \ + ${PYTHON_PKGNAMEPREFIX}astunparse>=1.6.3:devel/py-astunparse@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.3.0:devel/py-typing-extensions@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}h5py>=2.9.0:science/py-h5py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flatbuffers>=2.0:devel/py-flatbuffers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gast>=0.5.3:devel/py-gast@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}numpy>=1.20.0:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}google-pasta>=0.1.7:devel/py-google-pasta@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}protobuf>=3.7.1:devel/py-protobuf@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}termcolor>=1.1.0:devel/py-termcolor@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}grpcio>=1.22.0:devel/py-grpcio@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}keras>=2.2.4:math/py-keras@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}wrapt>=1.11.2:devel/py-wrapt@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}wheel>=0.30.0:devel/py-wheel@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}keras-preprocessing>=1.1.1:math/py-keras-preprocessing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wrapt>=1.14.1:devel/py-wrapt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0.30.0:devel/py-wheel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}opt-einsum>=3.3.0:math/py-opt-einsum@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \ + pybind11>=2.6.2:devel/pybind11 -USES= cpe python:3.7+ shebangfix jpeg ssl compiler:c++17-lang -CPE_VENDOR= google +USES= python:3.7+ shebangfix jpeg ssl +USE_CXXSTD= c++17 SHEBANG_GLOB= *.py USE_GITHUB= yes USE_PYTHON= distutils @@ -65,11 +70,26 @@ BAZEL_BOOT= --output_user_root=${WRKDIR}/bazel_out PLIST_SUB= TF_PORT_VERSION=${PORTVERSION} -OPTIONS_DEFINE= CPU_OPTS +OPTIONS_DEFINE= CPU_OPTS XLA +OPTIONS_RADIO= PARALLEL_JOBS +OPTIONS_RADIO_PARALLEL_JOBS= JOBS_1 JOBS_HALF JOBS_ALL +PARALLEL_JOBS_DESC= How many jobs to run during build? +OPTIONS_DEFAULT= JOBS_1 -CPU_OPTS_DESC= Enable optimisations using features available on your CPU -CPU_OPTS_VARS= CPU_TARGET=native BAZEL_COPT="-c opt --copt=-march=native --copt=-mfpmath=sse" -CPU_OPTS_VARS_OFF= CPU_TARGET=x86-64 +JOBS_1_DESC= Run one job +JOBS_1_VARS= TF_JOBS_NUMBER=1 +JOBS_HALF_DESC= Run half jobs +JOBS_HALF_VARS= TF_JOBS_NUMBER="`expr \( ${MAKE_JOBS_NUMBER} + 1 \) / 2`" +JOBS_ALL_DESC= Run all jobs +JOBS_ALL_VARS= TF_JOBS_NUMBER=${MAKE_JOBS_NUMBER} + +CPU_OPTS_DESC= Enable optimisations using features available on your CPU +CPU_OPTS_VARS= CPU_TARGET=native BAZEL_COPT="-c opt --copt=-march=native --copt=-mfpmath=sse" +CPU_OPTS_VARS_OFF= CPU_TARGET=x86-64 + +XLA_DESC= Accelerated Linear Algebra +XLA_VARS= XLA_OPT="1" +XLA_VARS_OFF= XLA_OPT="0" .include "Makefile.MASTER_SITES" @@ -78,46 +98,62 @@ post-patch: # This prevents bazel downloading the files without modifying # the bzl files. @${MKDIR} ${WRKDIR}/bazel-cache - @${MKDIR} ${WRKDIR}/bazel-distdir - @${CP} ${FILESDIR}/extra-patch-absl_base_internal_unscaledcycleclock.cc ${WRKSRC}/third_party/ + @${MKDIR} ${WRKDIR}/bazel-dist + @${MKDIR} ${WRKDIR}/.bin .for file in ${DISTFILES:C/\:(.*)//} - @${ECHO} "Moving ${file} to ${WRKDIR}/bazel-cache" - @${CP} ${DISTDIR}/${DIST_SUBDIR}/${file} ${WRKDIR}/bazel-distdir + @${ECHO} "Moving ${file} to ${WRKDIR}/bazel-dist" + @${CP} ${DISTDIR}/${DIST_SUBDIR}/${file} ${WRKDIR}/bazel-dist .endfor + @${CP} ${PATCHDIR}/bazelrc ${WRKDIR}/bazelrc + @${CP} -R ${PATCHDIR}/bazel/* \ + ${WRKSRC}/third_party/ + + @${LN} -s ${PYTHON_CMD} ${WRKDIR}/.bin/python3 + @cd ${WRKSRC} && \ ${REINPLACE_CMD} "s#--batch#${BAZEL_BOOT}\', \'--batch#" \ configure.py - @${CP} ${PATCHDIR}/bazelrc ${WRKDIR}/bazelrc + ${REINPLACE_CMD} "s#%%PYTHON%%#${PYTHON_VERSION}#" ${WRKSRC}/configure \ + ${WRKSRC}/third_party/freebsd_python_fix.patch \ + ${WRKSRC}/tensorflow/compiler/mlir/quantization/tensorflow/BUILD + @${REINPLACE_CMD} "s#%%BAZEL_DIR%%#${WRKDIR}#" ${WRKDIR}/bazelrc @${REINPLACE_CMD} "s#%%BAZEL_DIST%%#${WRKDIR}#" ${WRKDIR}/bazelrc + @${REINPLACE_CMD} "s#%%MLIR_LLVM_PATCH%%#/${WRKSRC}/bazel/bazel_llvm-raw_utils_bazel_configure.bzl#" \ + ${WRKSRC}/tensorflow/compiler/mlir/hlo/WORKSPACE + + # use system pybind11, but use sed to fix includes, too many to maintain with patches + @${FIND} ${WRKSRC} -type f -name '*.cc' | ${XARGS} ${REINPLACE_CMD} "s#include\/pybind11#pybind11#" + + + # copy the toolchain over + @${CP} -R ${PATCHDIR}/freebsd \ + ${WRKSRC}/ + + @${REINPLACE_CMD} "s#%%PATH%%#${PATH}#" ${WRKDIR}/bazelrc + + @${REINPLACE_CMD} "s#%%PYTHON%%#${PYTHON_CMD}#" ${WRKSRC}/.bazelrc + @${REINPLACE_CMD} "s#%%LOCALBASE%%#${LOCALBASE}#" ${WRKDIR}/bazelrc \ - ${WRKSRC}/tensorflow/tensorflow.bzl ${WRKSRC}/.bazelrc \ + ${WRKSRC}/third_party/absl/system.absl.strings.BUILD \ + ${WRKSRC}/freebsd/cc_toolchain_config.bzl \ + ${WRKSRC}/.bazelrc \ + ${WRKSRC}/tensorflow/tools/proto_text/BUILD \ + ${WRKSRC}/tensorflow/BUILD \ ${WRKSRC}/tensorflow/core/BUILD \ - ${WRKSRC}/third_party/systemlibs/protobuf.bzl \ - ${WRKSRC}/tensorflow/core/profiler/rpc/client/BUILD \ - ${WRKSRC}/WORKSPACE \ - ${WRKSRC}/tensorflow/core/profiler/internal/BUILD \ - ${WRKSRC}/tensorflow/contrib/ffmpeg/default/BUILD \ - ${WRKSRC}/third_party/flatbuffers/BUILD.system + ${WRKSRC}/third_party/systemlibs/protobuf.BUILD + do-configure: @cd ${WRKSRC} && ${SETENV} \ - BAZEL_CXXOPTS="-std=c++1z" \ PYTHON_BIN_PATH=${PYTHON_CMD} \ PYTHON_LIB_PATH="${PYTHON_SITELIBDIR}" \ - TF_NEED_JEMALLOC=0 \ - TF_NEED_KAFKA=0 \ + KERAS_HOME="${WRKDIR}/.keras" \ TF_NEED_OPENCL_SYCL=0 \ - TF_NEED_AWS=0 \ - TF_NEED_GCP=0 \ - TF_NEED_HDFS=0 \ - TF_NEED_S3=0 \ - TF_ENABLE_XLA=0 \ - TF_NEED_GDR=0 \ - TF_NEED_VERBS=0 \ + TF_ENABLE_XLA=${XLA_OPT} \ TF_NEED_OPENCL=0 \ TF_NEED_MPI=0 \ TF_NEED_TENSORRT=0 \ @@ -128,39 +164,61 @@ do-configure: TF_SET_ANDROID_WORKSPACE=0 \ TF_DOWNLOAD_CLANG=0 \ TF_NEED_NCCL=0 \ - TF_NEED_OPENCL=0 \ TF_IGNORE_MAX_BAZEL_VERSION=1 \ CC_OPT_FLAGS="-march=${CPU_TARGET} -I${LOCALBASE}/include" \ PREFIX="${LOCALBASE}" \ - TF_SYSTEM_LIBS="absl_py astor_archive boringssl com_github_googleapis_googleapis com_github_googlecloudplatform_google_cloud_cpp com_google_protobuf com_googlesource_code_re2 \ - curl cython double_conversion enum34_archive flatbuffers functools32_archive gast_archive gif_archive grpc hwloc icu jpeg jsoncpp_git keras_applications_archive \ - lmdb nasm nsync opt_einsum_archive org_sqlite pasta pcre png_archive six_archive snappy swig termcolor_archive wrapt zlib_archive" \ + TF_SYSTEM_LIBS="absl_py astor_archive astunparse_archive boringssl com_github_googlecloudplatform_google_cloud_cpp com_github_grpc_grpc \ + com_google_absl com_google_protobuf curl cython dill_archive double_conversion functools32_archive gast_archive \ + gif hwloc icu jsoncpp_git libjpeg_turbo lmdb nasm nsync opt_einsum_archive org_sqlite pasta png pybind11 six_archive snappy \ + tblib_archive termcolor_archive typing_extensions_archive wrapt zlib" \ ./configure do-build: @cd ${WRKSRC} && \ - bazel --bazelrc="${WRKDIR}/bazelrc" ${BAZEL_BOOT} build --jobs 16 ${BAZEL_COPT} --host_copt="-I${LOCALBASE}/include" \ - --host_linkopt="-L${LOCALBASE}/lib" --linkopt="-L${LOCALBASE}/lib" --config=c++17 --copt="-I${LOCALBASE}/include" \ - --cxxopt="--std=c++1z" --verbose_failures -s \ - --distdir=${WORKDIR}/bazel-dist \ + bazel --bazelrc="${WRKDIR}/bazelrc" ${BAZEL_BOOT} build --jobs ${TF_JOBS_NUMBER} ${BAZEL_COPT} --host_copt="-I${LOCALBASE}/include" \ + --host_linkopt="-L${LOCALBASE}/lib -lexecinfo" --linkopt="-L${LOCALBASE}/lib -lexecinfo" --copt="-I${LOCALBASE}/include" \ + --verbose_failures -s \ + --distdir=${WRKDIR}/bazel-dist \ //tensorflow:libtensorflow_framework.so \ //tensorflow:libtensorflow.so \ //tensorflow:libtensorflow_cc.so \ + //tensorflow:install_headers \ //tensorflow/tools/pip_package:build_pip_package + @cd ${WRKSRC} && ${SETENV} TMPDIR=${WRKDIR} \ bazel-bin/tensorflow/tools/pip_package/build_pip_package \ ${WRKDIR}/whl do-install: @${MKDIR} ${STAGEDIR}/${PYTHON_SITELIBDIR} - @${MKDIR} ${WRKDIR}/tmp - @${UNZIP_NATIVE_CMD} -d ${WRKDIR}/tmp ${WRKDIR}/whl/${PORTNAME}-${PORTVERSION}-*.whl - @${FIND} ${WRKDIR}/tmp -name "*.so*" | ${XARGS} ${STRIP_CMD} - cd ${WRKDIR}/tmp && ${COPYTREE_SHARE} ${PORTNAME}-${PORTVERSION}.dist-info \ - ${STAGEDIR}${PYTHON_SITELIBDIR} - cd ${WRKDIR}/tmp/${PORTNAME}-${PORTVERSION}.data/purelib && \ - ${COPYTREE_SHARE} . ${STAGEDIR}${PYTHON_SITELIBDIR} + @${MKDIR} ${STAGEDIR}/${LOCALBASE}/include/tensorflow + + @${UNZIP_NATIVE_CMD} -d ${STAGEDIR}/${PYTHON_SITELIBDIR} ${WRKDIR}/whl/${PORTNAME}-${PORTVERSION}-*.whl + + # put headers in the right folder + ${CP} -R ${WRKSRC}/bazel-bin/tensorflow/include/tensorflow \ + ${STAGEDIR}/${LOCALBASE}/include/ + + # pc files and libraries + ${INSTALL_DATA} ${PATCHDIR}/tensorflow.pc ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/ + ${INSTALL_DATA} ${PATCHDIR}/tensorflow_cc.pc ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/ + + @${REINPLACE_CMD} "s#%%LOCALBASE%%#${LOCALBASE}#" \ + ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/tensorflow.pc \ + ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/tensorflow_cc.pc + + @${REINPLACE_CMD} "s#%%VERSION%%#${PORTVERSION}#" \ + ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/tensorflow.pc + + #cleanup + ${RM} ${STAGEDIR}/${LOCALBASE}/libdata/pkgconfig/*.bak + + # install the libraries and strip + @${FIND} ${WRKSRC}/bazel-bin/tensorflow/ -depth 1 -name "*.so*" | ${XARGS} -I{} \ + ${INSTALL_LIB} {} ${STAGEDIR}/${LOCALBASE}/lib/ + + @${FIND} ${STAGEDIR}/${LOCALBASE}/lib -name "*.so*" | ${XARGS} ${STRIP_CMD} post-install: # autoplist: thousands of files, all under ${PYTHON_SITELIBDIR} @cd ${STAGEDIR}${PREFIX} && \ diff --git a/science/py-tensorflow/Makefile.MASTER_SITES b/science/py-tensorflow/Makefile.MASTER_SITES index 880ca476664f..35742be9ba95 100644 --- a/science/py-tensorflow/Makefile.MASTER_SITES +++ b/science/py-tensorflow/Makefile.MASTER_SITES @@ -1,39 +1,75 @@ -DISTFILES+= fft2d.tgz:oourafft2d \ - 49177915a14a.tar.gz:eigen \ - 43ef2148c0936ebf7cb4be6b19927a9d9d145b8f.tar.gz:abseil \ - bazel-skylib.0.8.0.tar.gz:skylib \ - 92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz:toolchain \ +DISTFILES+= platforms-0.0.2.tar.gz:platforms \ + apple_support.0.12.1.tar.gz:apple \ + bazel-skylib-1.0.3.tar.gz:skylib \ + dfc67056200b674accd08d8f9a21e328098c07e2.tar.gz:toolchain \ + v0.1.1.zip:buildrules \ + rules_apple.0.33.0.tar.gz:applerules \ + 081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz:rulescc \ 308b05b2419edb5c8ee0471b67a40403df940149.tar.gz:closure \ - 0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip:rulescc \ rules_docker-v0.10.0.tar.gz:docker \ - rules_swift.0.11.1.tar.gz:swift \ - 816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz:farmhash \ - 12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3.zip:gemmlowp \ + 7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip:java \ + rules_pkg-0.2.5.tar.gz:pkg \ + 11bf7c25e666dd7ddacbcd4d4c4a9de7a25175f8.tar.gz:protolib \ + rules_python-0.0.1.tar.gz:pythonrules \ + rules_swift.0.25.0.tar.gz:swift \ + 790d7a083520398268d92d0bd61cf85dfa32ee98.tar.gz:dlpack \ + 0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz:farmhash \ + e844ffd17118c1e17d94e1ba4354c075a4577b88.zip:gemmlowp \ fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz:highwayhash \ - 36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz:kissfft \ - 94d31935a2c94fe7e7c7379a0f3393e181928ff7.tar.gz:bazel \ - v2.3.0.tar.gz:pybind \ - 7a7e03f906aada0cf4b749b51213fe5784eeff84.tar.gz:llvm \ - 1200fe90bb174a6224a525ee60148671a786a71f.tar.gz:neon \ - license.rst.txt:license \ - backports.weakref-1.0rc1.tar.gz:weakref + 506cfa4bffd060c06ec338ce50ea3468daa6c814.tar.gz:re2 \ + e6c1b8dc8a8b00ee74e7268aac8b18d7260ab1ce.zip:ruy \ + 835a7d7b1ee3bc83e575e302a985c66ec4b65249.tar.gz:sobol \ + openmp-10.0.1.src.tar.xz:llvmorg \ + 36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz:kiss \ + v2.6.tar.gz:onednn \ + v1.0.tar.gz:ooura \ + 5916273f79a21551890fd3d56fc5375a78d1598d.zip:cpuinfo \ + d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz:cpuinfo2 \ + 093ed77f7d50f75b376f40a71ea86e08cedb8b80.tar.gz:runtime \ + eigen-008ff3483a8c5604639e1c4d204eae30ad737af6.tar.gz:eigen \ + 11b2812d64e49bab9b6c489f79067fc94e69db9f.zip:xnnpack \ + b8374f80e42010941bda6c85b0e3f1a1bd77a1e0.zip:pthread \ + 4dfe081cf6bcd15db339cf2680b9281b8451eeb3.zip:fp16 \ + 63058eff77e11aa15bf531df5dd34395ec3017c8.zip:fxdiv \ + 1cb299165c859533e22f2ed05eb2abd5071544df.tar.gz:llvm \ + 541b1ded4abadcc38e8178680b0677f65594ea6f.zip:apis \ + v1.12.0.tar.gz:flatbuffer \ + 1200fe90bb174a6224a525ee60148671a786a71f.tar.gz:neon -MASTER_SITES+= http://www.kurims.kyoto-u.ac.jp/~ooura/:oourafft2d \ - https://storage.googleapis.com/mirror.tensorflow.org/bitbucket.org/eigen/eigen/get/:eigen \ - https://github.com/abseil/abseil-cpp/archive/:abseil \ - https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/:skylib \ +MASTER_SITES+= https://github.com/bazelbuild/platforms/releases/download/0.0.2/:platforms \ + https://github.com/bazelbuild/apple_support/releases/download/0.12.1/:apple \ + https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/:skylib \ https://github.com/bazelbuild/bazel-toolchains/archive/:toolchain \ + https://github.com/bazelbuild/rules_android/archive/:buildrules \ + https://github.com/bazelbuild/rules_apple/releases/download/0.33.0/:applerules \ + https://github.com/bazelbuild/rules_cc/archive/:rulescc \ https://github.com/bazelbuild/rules_closure/archive/:closure \ https://github.com/bazelbuild/rules_docker/releases/download/v0.10.0/:docker \ - https://github.com/bazelbuild/rules_swift/releases/download/0.11.1/:swift \ + https://github.com/bazelbuild/rules_java/archive/:java \ + https://github.com/bazelbuild/rules_pkg/releases/download/0.2.5/:pkg \ + https://github.com/bazelbuild/rules_proto/archive/:protolib \ + https://github.com/bazelbuild/rules_python/releases/download/0.0.1/:pythonrules \ + https://github.com/bazelbuild/rules_swift/releases/download/0.25.0/:swift \ + https://github.com/dmlc/dlpack/archive/:dlpack \ https://github.com/google/farmhash/archive/:farmhash \ https://github.com/google/gemmlowp/archive/:gemmlowp \ https://github.com/google/highwayhash/archive/:highwayhash \ - https://github.com/mborgerding/kissfft/archive/:kissfft \ - https://github.com/nlopezgi/bazel-toolchains/archive/:bazel \ - https://github.com/pybind/pybind11/archive/:pybind \ - https://github.com/llvm-mirror/llvm/archive/:llvm \ - https://github.com/intel/ARM_NEON_2_x86_SSE/archive/:neon \ - https://storage.googleapis.com/mirror.tensorflow.org/docs.python.org/2.7/_sources/:license \ - https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/:weakref \ - https://github.com/bazelbuild/rules_cc/archive/:rulescc + https://github.com/google/re2/archive/:re2 \ + https://github.com/google/ruy/archive/:ruy \ + https://github.com/joe-kuo/sobol_data/archive/:sobol \ + https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/:llvmorg \ + https://github.com/mborgerding/kissfft/archive/:kiss \ + https://github.com/oneapi-src/oneDNN/archive/refs/tags/:onednn \ + https://github.com/petewarden/OouraFFT/archive/:ooura \ + https://github.com/pytorch/cpuinfo/archive/:cpuinfo \ + https://github.com/pytorch/cpuinfo/archive/:cpuinfo2 \ + https://github.com/tensorflow/runtime/archive/:runtime \ + https://gitlab.com/libeigen/eigen/-/archive/008ff3483a8c5604639e1c4d204eae30ad737af6/:eigen \ + https://github.com/google/XNNPACK/archive/:xnnpack \ + https://github.com/Maratyszcza/pthreadpool/archive/:pthread \ + https://github.com/Maratyszcza/FP16/archive/:fp16 \ + https://github.com/Maratyszcza/FXdiv/archive/:fxdiv \ + https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/:llvm \ + https://github.com/googleapis/googleapis/archive/:apis \ + https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/flatbuffers/archive/:flatbuffer \ + https://github.com/intel/ARM_NEON_2_x86_SSE/archive/:neon diff --git a/science/py-tensorflow/distinfo b/science/py-tensorflow/distinfo index 82662ad2bd6f..d9d9a2254845 100644 --- a/science/py-tensorflow/distinfo +++ b/science/py-tensorflow/distinfo @@ -1,41 +1,77 @@ -TIMESTAMP = 1625741393 -SHA256 (tensorflow/fft2d.tgz) = ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9 -SIZE (tensorflow/fft2d.tgz) = 54434 -SHA256 (tensorflow/49177915a14a.tar.gz) = b3e1c3df05377d22bb960f54acce8d7018bc9477f37e8f39f9d3c784f5aaa87f -SIZE (tensorflow/49177915a14a.tar.gz) = 2496808 -SHA256 (tensorflow/43ef2148c0936ebf7cb4be6b19927a9d9d145b8f.tar.gz) = acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070 -SIZE (tensorflow/43ef2148c0936ebf7cb4be6b19927a9d9d145b8f.tar.gz) = 1281523 -SHA256 (tensorflow/bazel-skylib.0.8.0.tar.gz) = 2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e -SIZE (tensorflow/bazel-skylib.0.8.0.tar.gz) = 72941 -SHA256 (tensorflow/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz) = 88e818f9f03628eef609c8429c210ecf265ffe46c2af095f36c7ef8b1855fef5 -SIZE (tensorflow/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz) = 660374 +TIMESTAMP = 1662651809 +SHA256 (tensorflow/platforms-0.0.2.tar.gz) = 48a2d8d343863989c232843e01afc8a986eb8738766bfd8611420a7db8f6f0c3 +SIZE (tensorflow/platforms-0.0.2.tar.gz) = 5278 +SHA256 (tensorflow/apple_support.0.12.1.tar.gz) = c604b75865c07f45828c7fffd5fdbff81415a9e84a68f71a9c1d8e3b2694e547 +SIZE (tensorflow/apple_support.0.12.1.tar.gz) = 26708 +SHA256 (tensorflow/bazel-skylib-1.0.3.tar.gz) = 1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c +SIZE (tensorflow/bazel-skylib-1.0.3.tar.gz) = 30711 +SHA256 (tensorflow/dfc67056200b674accd08d8f9a21e328098c07e2.tar.gz) = 77c2c3c562907a1114afde7b358bf3d5cc23dc61b3f2fd619bf167af0c9582a3 +SIZE (tensorflow/dfc67056200b674accd08d8f9a21e328098c07e2.tar.gz) = 1056209 +SHA256 (tensorflow/v0.1.1.zip) = cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806 +SIZE (tensorflow/v0.1.1.zip) = 14654 +SHA256 (tensorflow/rules_apple.0.33.0.tar.gz) = a5f00fd89eff67291f6cd3efdc8fad30f4727e6ebb90718f3f05bbf3c3dd5ed7 +SIZE (tensorflow/rules_apple.0.33.0.tar.gz) = 2168079 +SHA256 (tensorflow/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz) = ff7876d80cd3f6b8c7a064bd9aa42a78e02096544cca2b22a9cf390a4397a53e +SIZE (tensorflow/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz) = 130803 SHA256 (tensorflow/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz) = 5b00383d08dd71f28503736db0500b6fb4dda47489ff5fc6bed42557c07c6ba9 SIZE (tensorflow/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz) = 464906 -SHA256 (tensorflow/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip) = 36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89 -SIZE (tensorflow/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip) = 72534 SHA256 (tensorflow/rules_docker-v0.10.0.tar.gz) = 7d453450e1eb70e238eea6b31f4115607ec1200e91afea01c25f9804f37e39c8 SIZE (tensorflow/rules_docker-v0.10.0.tar.gz) = 549649 -SHA256 (tensorflow/rules_swift.0.11.1.tar.gz) = 96a86afcbdab215f8363e65a10cf023b752e90b23abf02272c4fc668fcb70311 -SIZE (tensorflow/rules_swift.0.11.1.tar.gz) = 107453 -SHA256 (tensorflow/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz) = 6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0 -SIZE (tensorflow/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz) = 467122 -SHA256 (tensorflow/12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3.zip) = 6678b484d929f2d0d3229d8ac4e3b815a950c86bb9f17851471d143f6d4f7834 -SIZE (tensorflow/12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3.zip) = 935628 +SHA256 (tensorflow/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip) = bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598 +SIZE (tensorflow/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip) = 9422 +SHA256 (tensorflow/rules_pkg-0.2.5.tar.gz) = 352c090cc3d3f9a6b4e676cf42a6047c16824959b438895a76c2989c6d7c246a +SIZE (tensorflow/rules_pkg-0.2.5.tar.gz) = 29857 +SHA256 (tensorflow/11bf7c25e666dd7ddacbcd4d4c4a9de7a25175f8.tar.gz) = 20b240eba17a36be4b0b22635aca63053913d5c1ee36e16be36499d167a2f533 +SIZE (tensorflow/11bf7c25e666dd7ddacbcd4d4c4a9de7a25175f8.tar.gz) = 14304 +SHA256 (tensorflow/rules_python-0.0.1.tar.gz) = aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161 +SIZE (tensorflow/rules_python-0.0.1.tar.gz) = 2302092 +SHA256 (tensorflow/rules_swift.0.25.0.tar.gz) = 8a49da750560b185804a4bc95c82d3f9cc4c2caf788960b0e21945759155fdd9 +SIZE (tensorflow/rules_swift.0.25.0.tar.gz) = 184783 +SHA256 (tensorflow/790d7a083520398268d92d0bd61cf85dfa32ee98.tar.gz) = 147cc89904375dcd0b0d664a2b72dfadbb02058800ad8cba84516094bc406208 +SIZE (tensorflow/790d7a083520398268d92d0bd61cf85dfa32ee98.tar.gz) = 45837 +SHA256 (tensorflow/0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz) = 18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115 +SIZE (tensorflow/0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz) = 467251 +SHA256 (tensorflow/e844ffd17118c1e17d94e1ba4354c075a4577b88.zip) = 522b7a82d920ebd0c4408a5365866a40b81d1c0d60b2369011d315cca03c6476 +SIZE (tensorflow/e844ffd17118c1e17d94e1ba4354c075a4577b88.zip) = 940590 SHA256 (tensorflow/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz) = 9c3e0e87d581feeb0c18d814d98f170ff23e62967a2bd6855847f0b2fe598a37 SIZE (tensorflow/fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz) = 138574 +SHA256 (tensorflow/506cfa4bffd060c06ec338ce50ea3468daa6c814.tar.gz) = d070e2ffc5476c496a6a872a6f246bfddce8e7797d6ba605a7c8d72866743bf9 +SIZE (tensorflow/506cfa4bffd060c06ec338ce50ea3468daa6c814.tar.gz) = 316237 +SHA256 (tensorflow/e6c1b8dc8a8b00ee74e7268aac8b18d7260ab1ce.zip) = fa9a0b9041095817bc3533f7b125c3b4044570c0b3ee6c436d2d29dae001c06b +SIZE (tensorflow/e6c1b8dc8a8b00ee74e7268aac8b18d7260ab1ce.zip) = 375516 +SHA256 (tensorflow/835a7d7b1ee3bc83e575e302a985c66ec4b65249.tar.gz) = 583d7b975e506c076fc579d9139530596906b9195b203d42361417e9aad79b73 +SIZE (tensorflow/835a7d7b1ee3bc83e575e302a985c66ec4b65249.tar.gz) = 2569603 +SHA256 (tensorflow/openmp-10.0.1.src.tar.xz) = d19f728c8e04fb1e94566c8d76aef50ec926cd2f95ef3bf1e0a5de4909b28b44 +SIZE (tensorflow/openmp-10.0.1.src.tar.xz) = 955492 SHA256 (tensorflow/36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz) = 42b7ef406d5aa2d57a7b3b56fc44e8ad3011581692458a69958a911071efdcf2 SIZE (tensorflow/36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz) = 44744 -SHA256 (tensorflow/94d31935a2c94fe7e7c7379a0f3393e181928ff7.tar.gz) = 109a99384f9d08f9e75136d218ebaebc68cc810c56897aea2224c57932052d30 -SIZE (tensorflow/94d31935a2c94fe7e7c7379a0f3393e181928ff7.tar.gz) = 505681 -SHA256 (tensorflow/v2.3.0.tar.gz) = 0f34838f2c8024a6765168227ba587b3687729ebf03dc912f88ff75c7aa9cfe8 -SIZE (tensorflow/v2.3.0.tar.gz) = 564520 -SHA256 (tensorflow/7a7e03f906aada0cf4b749b51213fe5784eeff84.tar.gz) = 599b89411df88b9e2be40b019e7ab0f7c9c10dd5ab1c948cd22e678cc8f8f352 -SIZE (tensorflow/7a7e03f906aada0cf4b749b51213fe5784eeff84.tar.gz) = 50144723 +SHA256 (tensorflow/v2.6.tar.gz) = 9695640f55acd833ddcef4776af15e03446c4655f9296e5074b1b178dd7a4fb2 +SIZE (tensorflow/v2.6.tar.gz) = 5840464 +SHA256 (tensorflow/v1.0.tar.gz) = 5f4dabc2ae21e1f537425d58a49cdca1c49ea11db0d6271e2a4b27e9697548eb +SIZE (tensorflow/v1.0.tar.gz) = 110531 +SHA256 (tensorflow/5916273f79a21551890fd3d56fc5375a78d1598d.zip) = 2a160c527d3c58085ce260f34f9e2b161adc009b34186a2baf24e74376e89e6d +SIZE (tensorflow/5916273f79a21551890fd3d56fc5375a78d1598d.zip) = 3787933 +SHA256 (tensorflow/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz) = 3f2dc1970f397a0e59db72f9fca6ff144b216895c1d606f6c94a507c1e53a025 +SIZE (tensorflow/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz) = 3489028 +SHA256 (tensorflow/093ed77f7d50f75b376f40a71ea86e08cedb8b80.tar.gz) = fce593c95eb508092c4a1752130868b6d2eae0fd4a5363b9d96195fd85b7cfec +SIZE (tensorflow/093ed77f7d50f75b376f40a71ea86e08cedb8b80.tar.gz) = 15323415 +SHA256 (tensorflow/eigen-008ff3483a8c5604639e1c4d204eae30ad737af6.tar.gz) = e1dd31ce174c3d26fbe38388f64b09d2adbd7557a59e90e6f545a288cc1755fc +SIZE (tensorflow/eigen-008ff3483a8c5604639e1c4d204eae30ad737af6.tar.gz) = 2733792 +SHA256 (tensorflow/11b2812d64e49bab9b6c489f79067fc94e69db9f.zip) = 7e9ad45391e5158fd00e816022bda21d54a6180788af7c455c864a78cee252c6 +SIZE (tensorflow/11b2812d64e49bab9b6c489f79067fc94e69db9f.zip) = 17103217 +SHA256 (tensorflow/b8374f80e42010941bda6c85b0e3f1a1bd77a1e0.zip) = b96413b10dd8edaa4f6c0a60c6cf5ef55eebeef78164d5d69294c8173457f0ec +SIZE (tensorflow/b8374f80e42010941bda6c85b0e3f1a1bd77a1e0.zip) = 61524 +SHA256 (tensorflow/4dfe081cf6bcd15db339cf2680b9281b8451eeb3.zip) = d973501a40c55126b31accc2d9f08d931ec3cc190c0430309a5e341d3c0ce32a +SIZE (tensorflow/4dfe081cf6bcd15db339cf2680b9281b8451eeb3.zip) = 91462 +SHA256 (tensorflow/63058eff77e11aa15bf531df5dd34395ec3017c8.zip) = 3d7b0e9c4c658a84376a1086126be02f9b7f753caa95e009d9ac38d11da444db +SIZE (tensorflow/63058eff77e11aa15bf531df5dd34395ec3017c8.zip) = 16646 +SHA256 (tensorflow/1cb299165c859533e22f2ed05eb2abd5071544df.tar.gz) = 5a19ab6de4b0089fff456c0bc406b37ba5f95c76026e6bec294ec28dc28e4cb9 +SIZE (tensorflow/1cb299165c859533e22f2ed05eb2abd5071544df.tar.gz) = 162307281 +SHA256 (tensorflow/541b1ded4abadcc38e8178680b0677f65594ea6f.zip) = 7ebab01b06c555f4b6514453dc3e1667f810ef91d1d4d2d3aa29bb9fcb40a900 +SIZE (tensorflow/541b1ded4abadcc38e8178680b0677f65594ea6f.zip) = 5498751 +SHA256 (tensorflow/v1.12.0.tar.gz) = 62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45 +SIZE (tensorflow/v1.12.0.tar.gz) = 1145348 SHA256 (tensorflow/1200fe90bb174a6224a525ee60148671a786a71f.tar.gz) = 213733991310b904b11b053ac224fee2d4e0179e46b52fe7f8735b8831e04dcc SIZE (tensorflow/1200fe90bb174a6224a525ee60148671a786a71f.tar.gz) = 100612 -SHA256 (tensorflow/license.rst.txt) = e76cacdf0bdd265ff074ccca03671c33126f597f39d0ed97bc3e5673d9170cf6 -SIZE (tensorflow/license.rst.txt) = 45132 -SHA256 (tensorflow/backports.weakref-1.0rc1.tar.gz) = 8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892 -SIZE (tensorflow/backports.weakref-1.0rc1.tar.gz) = 7761 -SHA256 (tensorflow/tensorflow-tensorflow-v1.15.5_GH0.tar.gz) = 4c4d23e311093ded2d2e287b18d7c45b07b5984ab88a1d2f91f8f13c886123db -SIZE (tensorflow/tensorflow-tensorflow-v1.15.5_GH0.tar.gz) = 46212258 +SHA256 (tensorflow/tensorflow-tensorflow-v2.9.1_GH0.tar.gz) = 6eaf86ead73e23988fe192da1db68f4d3828bcdd0f3a9dc195935e339c95dbdc +SIZE (tensorflow/tensorflow-tensorflow-v2.9.1_GH0.tar.gz) = 66654318 diff --git a/science/py-tensorflow/files/bazel/add-default-option.patch b/science/py-tensorflow/files/bazel/add-default-option.patch new file mode 100644 index 000000000000..ce5c250608fb --- /dev/null +++ b/science/py-tensorflow/files/bazel/add-default-option.patch @@ -0,0 +1,37 @@ +--- a/build_defs.bzl 2022-08-28 12:18:33.375130000 +0100 ++++ b/build_defs.bzl 2022-08-28 12:21:40.701070000 +0100 +@@ -173,7 +173,7 @@ + ":emscripten_wasm": wasm_srcs, + ":emscripten_wasmsimd": wasmsimd_srcs, + ":emscripten_wasmrelaxedsimd": wasmrelaxedsimd_srcs, +- "//conditions:default": [], ++ "//conditions:default": x86_srcs, + }), + copts = [ + "-Iinclude", +@@ -210,7 +210,7 @@ + ":emscripten_wasm": wasm_copts, + ":emscripten_wasmsimd": wasmsimd_copts, + ":emscripten_wasmrelaxedsimd": wasmrelaxedsimd_copts, +- "//conditions:default": [], ++ "//conditions:default": [opt for opt in gcc_x86_copts], + }) + select({ + ":windows_x86_64_clang": ["/clang:" + opt for opt in gcc_copts], + ":windows_x86_64_mingw": gcc_copts, +@@ -233,7 +233,7 @@ + ":linux_armv7a": ["-lpthread"], + ":linux_arm64": ["-lpthread"], + ":android": ["-lm"], +- "//conditions:default": [], ++ "//conditions:default": ["-lpthread"], + }), + textual_hdrs = hdrs, + visibility = visibility, +@@ -304,6 +304,7 @@ + ":emscripten_wasm": wasm_deps, + ":emscripten_wasmsimd": wasmsimd_deps, + ":emscripten_wasmrelaxedsimd": wasmrelaxedsimd_deps, ++ "//conditions:default": x86_deps, + }), + ) + diff --git a/science/py-tensorflow/files/bazel/fix-environ.patch b/science/py-tensorflow/files/bazel/fix-environ.patch new file mode 100644 index 000000000000..2e38ce60543d --- /dev/null +++ b/science/py-tensorflow/files/bazel/fix-environ.patch @@ -0,0 +1,42 @@ +--- a/llvm/lib/Support/Unix/Program.inc 2022-09-06 21:14:28.808580000 +0100 ++++ b/llvm/lib/Support/Unix/Program.inc 2022-09-06 21:16:15.007790000 +0100 +@@ -54,10 +54,8 @@ + #define USE_NSGETENVIRON 0 + #endif + +-#if !USE_NSGETENVIRON ++#if USE_NSGETENVIRON + extern char **environ; +-#else +-#include // _NSGetEnviron + #endif + #endif + +@@ -240,14 +238,6 @@ + } + } + +- if (!Envp) +-#if !USE_NSGETENVIRON +- Envp = const_cast(environ); +-#else +- // environ is missing in dylibs. +- Envp = const_cast(*_NSGetEnviron()); +-#endif +- + constexpr int maxRetries = 8; + int retries = 0; + pid_t PID; +@@ -308,11 +298,7 @@ + + // Execute! + std::string PathStr = std::string(Program); +- if (Envp != nullptr) +- execve(PathStr.c_str(), const_cast(Argv), +- const_cast(Envp)); +- else +- execv(PathStr.c_str(), const_cast(Argv)); ++ execv(PathStr.c_str(), const_cast(Argv)); + // If the execve() failed, we should exit. Follow Unix protocol and + // return 127 if the executable was not found, and 126 otherwise. + // Use _exit rather than exit so that atexit functions and static diff --git a/science/py-tensorflow/files/bazel/fix_cpuinfo.patch b/science/py-tensorflow/files/bazel/fix_cpuinfo.patch new file mode 100644 index 000000000000..1041a2319286 --- /dev/null +++ b/science/py-tensorflow/files/bazel/fix_cpuinfo.patch @@ -0,0 +1,80 @@ +--- a/src/mach/topology.c 2022-09-01 12:09:36.036365000 +0100 ++++ b/src/mach/topology.c 2022-09-01 12:09:07.146529000 +0100 +@@ -1,5 +1,4 @@ + #include +-#include + #include + + #include +@@ -8,38 +7,27 @@ + #include + #include + +-#include + +- + struct cpuinfo_mach_topology cpuinfo_mach_detect_topology(void) { + int cores = 1; + size_t sizeof_cores = sizeof(cores); +- if (sysctlbyname("hw.physicalcpu_max", &cores, &sizeof_cores, NULL, 0) != 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.physicalcpu_max\") failed: %s", strerror(errno)); ++ if (sysctlbyname("hw.ncpu", &cores, &sizeof_cores, NULL, 0) != 0) { ++ cpuinfo_log_error("sysctlbyname(\"hw.ncpu\") failed: %s", strerror(errno)); + } else if (cores <= 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.physicalcpu_max\") returned invalid value %d", cores); ++ cpuinfo_log_error("sysctlbyname(\"hw.ncpu\") returned invalid value %d", cores); + cores = 1; + } + + int threads = 1; + size_t sizeof_threads = sizeof(threads); +- if (sysctlbyname("hw.logicalcpu_max", &threads, &sizeof_threads, NULL, 0) != 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.logicalcpu_max\") failed: %s", strerror(errno)); ++ if (sysctlbyname("hw.ncpu", &threads, &sizeof_threads, NULL, 0) != 0) { ++ cpuinfo_log_error("sysctlbyname(\"ncpu\") failed: %s", strerror(errno)); + } else if (threads <= 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.logicalcpu_max\") returned invalid value %d", threads); ++ cpuinfo_log_error("sysctlbyname(\"ncpu\") returned invalid value %d", threads); + threads = cores; + } + + int packages = 1; +-#if !TARGET_OS_IPHONE +- size_t sizeof_packages = sizeof(packages); +- if (sysctlbyname("hw.packages", &packages, &sizeof_packages, NULL, 0) != 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.packages\") failed: %s", strerror(errno)); +- } else if (packages <= 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.packages\") returned invalid value %d", packages); +- packages = 1; +- } +-#endif + + cpuinfo_log_debug("mach topology: packages = %d, cores = %d, threads = %d", packages, (int) cores, (int) threads); + struct cpuinfo_mach_topology topology = { +@@ -48,26 +36,5 @@ + .threads = (uint32_t) threads + }; + +-#if !TARGET_OS_IPHONE +- size_t cacheconfig_size = 0; +- if (sysctlbyname("hw.cacheconfig", NULL, &cacheconfig_size, NULL, 0) != 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.cacheconfig\") failed: %s", strerror(errno)); +- } else { +- uint64_t* cacheconfig = alloca(cacheconfig_size); +- if (sysctlbyname("hw.cacheconfig", cacheconfig, &cacheconfig_size, NULL, 0) != 0) { +- cpuinfo_log_error("sysctlbyname(\"hw.cacheconfig\") failed: %s", strerror(errno)); +- } else { +- size_t cache_configs = cacheconfig_size / sizeof(uint64_t); +- cpuinfo_log_debug("mach hw.cacheconfig count: %zu", cache_configs); +- if (cache_configs > CPUINFO_MACH_MAX_CACHE_LEVELS) { +- cache_configs = CPUINFO_MACH_MAX_CACHE_LEVELS; +- } +- for (size_t i = 0; i < cache_configs; i++) { +- cpuinfo_log_debug("mach hw.cacheconfig[%zu]: %"PRIu64, i, cacheconfig[i]); +- topology.threads_per_cache[i] = cacheconfig[i]; +- } +- } +- } +-#endif + return topology; + } diff --git a/science/py-tensorflow/files/bazel/freebsd_python_fix.patch b/science/py-tensorflow/files/bazel/freebsd_python_fix.patch new file mode 100644 index 000000000000..e6bcae9950be --- /dev/null +++ b/science/py-tensorflow/files/bazel/freebsd_python_fix.patch @@ -0,0 +1,11 @@ +--- a/utils/bazel/configure.bzl 2022-08-27 19:11:41.138993000 +0100 ++++ b/utils/bazel/configure.bzl 2022-08-27 19:12:07.525186000 +0100 +@@ -37,7 +37,7 @@ + overlay_path = bazel_path.get_child("llvm-project-overlay") + script_path = bazel_path.get_child("overlay_directories.py") + +- python_bin = repository_ctx.which("python3") ++ python_bin = repository_ctx.which("%%PYTHON%%") + if not python_bin: + # Windows typically just defines "python" as python3. The script itself + # contains a check to ensure python3. diff --git a/science/py-tensorflow/files/bazel/set-c++17.patch b/science/py-tensorflow/files/bazel/set-c++17.patch new file mode 100644 index 000000000000..aef1f6c38467 --- /dev/null +++ b/science/py-tensorflow/files/bazel/set-c++17.patch @@ -0,0 +1,11 @@ +--- a/cc/private/toolchain/freebsd_cc_toolchain_config.bzl 2022-08-28 16:31:59.271838000 +0100 ++++ b/cc/private/toolchain/freebsd_cc_toolchain_config.bzl 2022-08-28 16:32:10.096301000 +0100 +@@ -159,7 +159,7 @@ + ), + flag_set( + actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend], +- flag_groups = [flag_group(flags = ["-std=c++0x"])], ++ flag_groups = [flag_group(flags = ["-std=c++17"])], + ), + ], + ) diff --git a/science/py-tensorflow/files/bazelrc b/science/py-tensorflow/files/bazelrc index 98a37af78dce..f3a2c1a76cb3 100644 --- a/science/py-tensorflow/files/bazelrc +++ b/science/py-tensorflow/files/bazelrc @@ -8,12 +8,28 @@ build --spawn_strategy=local --genrule_strategy=local test --spawn_strategy=local --genrule_strategy=local # make bazel only fetch distfiles from the cache -fetch --repository_cache="%%BAZEL_DIR%%/bazel-cache/" --distdir="%%BAZEL_DIST%%/bazel-distdir/" -build --repository_cache="%%BAZEL_DIR%%/bazel-cache/" --distdir="%%BAZEL_DIST%%/bazel-distdir/" +fetch --repository_cache="%%BAZEL_DIR%%/bazel-cache/" --distdir="%%BAZEL_DIST%%/bazel-dist/" +build --repository_cache="%%BAZEL_DIR%%/bazel-cache/" --distdir="%%BAZEL_DIST%%/bazel-dist/" build --define=PREFIX=%%LOCALBASE%% build --define=LIBDIR=%%LOCALBASE%%/lib +build --define=INCLUDEDIR=%%LOCALBASE%%/include +build --define=PROTOBUF_INCLUDE_PATH=%%LOCALBASE%%/include -build --config=noaws --config=nohdfs --config=noignite --config=nokafka +build --config=noaws --config=nohdfs build --define tensorflow_mkldnn_contraction_kernel=0 -build --incompatible_no_support_tools_in_action_inputs=false + +build --action_env=BAZEL_CXXOPTS="-std=c++17" +build --incompatible_enable_cc_toolchain_resolution + +build --extra_toolchains=//freebsd:cc-toolchain-freebsd +build --linkopt="-lexecinfo" --toolchain_resolution_debug=//freebsd:freebsd_clang + +# for python +build --action_env=PATH=%%PATH%% +build --host_action_env=PATH=%%PATH%% + +build --action_env=KERAS_HOME="%%BAZEL_DIST%%/.keras" +build --host_action_env=KERAS_HOME="%%BAZEL_DIST%%/.keras" + +build --config=freebsd diff --git a/science/py-tensorflow/files/extra-patch-absl_base_internal_unscaledcycleclock.cc b/science/py-tensorflow/files/extra-patch-absl_base_internal_unscaledcycleclock.cc deleted file mode 100644 index 43bbada5c4bb..000000000000 --- a/science/py-tensorflow/files/extra-patch-absl_base_internal_unscaledcycleclock.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- a/absl/base/internal/unscaledcycleclock.cc.orig 2021-10-11 21:53:31.946215000 +0200 -+++ b/absl/base/internal/unscaledcycleclock.cc 2021-10-11 21:57:54.536557000 +0200 -@@ -21,8 +21,15 @@ - #endif - - #if defined(__powerpc__) || defined(__ppc__) -+#ifdef __linux__ - #include -+#else -+#include "absl/base/call_once.h" -+#include -+#include -+#include - #endif -+#endif - - #include "absl/base/internal/sysinfo.h" - -@@ -56,11 +63,28 @@ - #elif defined(__powerpc__) || defined(__ppc__) - - int64_t UnscaledCycleClock::Now() { -+#ifdef __linux__ - return __ppc_get_timebase(); -+#else -+ int64_t tbr; -+ asm volatile("mfspr %0, 268" : "=r"(tbr)); -+ return tbr; -+#endif - } - - double UnscaledCycleClock::Frequency() { -+#ifdef __linux__ - return __ppc_get_timebase_freq(); -+#else -+ static once_flag init_timebase_frequency_once; -+ static double timebase_frequency = 0.0; -+ base_internal::LowLevelCallOnce(&init_timebase_frequency_once, [&]() { -+ size_t length = sizeof(timebase_frequency); -+ sysctlbyname("kern.timecounter.tc.timebase.frequency", &timebase_frequency, -+ &length, nullptr, 0); -+ }); -+ return timebase_frequency; -+#endif - } - - #elif defined(__aarch64__) diff --git a/science/py-tensorflow/files/freebsd/BUILD b/science/py-tensorflow/files/freebsd/BUILD new file mode 100644 index 000000000000..4096b1c74d42 --- /dev/null +++ b/science/py-tensorflow/files/freebsd/BUILD @@ -0,0 +1,88 @@ +# Copyright 2018 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# This becomes the BUILD file for @local_config_cc// under FreeBSD and OpenBSD. +load(":cc_toolchain_config.bzl", "cc_toolchain_config") +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_toolchain", "cc_toolchain_suite") +load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") + +package(default_visibility = ["//visibility:public"]) +cc_library( + name = "malloc", +) +filegroup( + name = "empty", + srcs = [], +) + +# Hardcoded toolchain, legacy behaviour. +cc_toolchain_suite( + name = "freebsd_clang", + toolchains = { + "k8": ":cc-compiler-freebsd", + "freebsd": ":cc-compiler-freebsd", + }, +) + +cc_toolchain( + name = "cc-compiler-freebsd", + all_files = ":empty", + ar_files = ":empty", + as_files = ":empty", + compiler_files = ":empty", + dwp_files = ":empty", + linker_files = ":empty", + objcopy_files = ":empty", + strip_files = ":empty", + supports_param_files = 0, + toolchain_config = ":local_freebsd", + toolchain_identifier = "local_freebsd", +) +cc_toolchain_config( + name = "local_freebsd", + cpu = "k8", +) + +toolchain( + name = "cc-toolchain-freebsd", + exec_compatible_with = [ + "@platforms//cpu:x86_64", + "@platforms//os:freebsd", + ], + target_compatible_with = [ + "@platforms//cpu:x86_64", + "@platforms//os:freebsd", + ], + toolchain = ":cc-compiler-freebsd", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", +) + +py_runtime( + name = "freebsd_python", + interpreter_path = "/usr/local/bin/python3.9", + python_version = "PY3", + visibility = ["//visibility:public"], +) + +py_runtime_pair( + name = "bsd_py_runtime_pair", + py2_runtime = None, + py3_runtime = ":freebsd_python", +) + +toolchain( + name = "freebsd_py_toolchain", + toolchain = ":bsd_py_runtime_pair", + toolchain_type = "@bazel_tools//tools/python:toolchain_type", +) + diff --git a/science/py-tensorflow/files/freebsd/cc_toolchain_config.bzl b/science/py-tensorflow/files/freebsd/cc_toolchain_config.bzl new file mode 100644 index 000000000000..38d7f122209c --- /dev/null +++ b/science/py-tensorflow/files/freebsd/cc_toolchain_config.bzl @@ -0,0 +1,287 @@ +# Copyright 2019 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""A Starlark cc_toolchain configuration rule for FreeBSD and OpenBSD.""" +load( + "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", + "action_config", + "feature", + "flag_group", + "flag_set", + "tool", + "tool_path", + "with_feature_set", +) + +load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") +all_compile_actions = [ + ACTION_NAMES.c_compile, + ACTION_NAMES.cpp_compile, + ACTION_NAMES.linkstamp_compile, + ACTION_NAMES.assemble, + ACTION_NAMES.preprocess_assemble, + ACTION_NAMES.cpp_header_parsing, + ACTION_NAMES.cpp_module_compile, + ACTION_NAMES.cpp_module_codegen, + ACTION_NAMES.clif_match, + ACTION_NAMES.lto_backend, +] +all_cpp_compile_actions = [ + ACTION_NAMES.cpp_compile, + ACTION_NAMES.linkstamp_compile, + ACTION_NAMES.cpp_header_parsing, + ACTION_NAMES.cpp_module_compile, + ACTION_NAMES.cpp_module_codegen, + ACTION_NAMES.clif_match, +] +all_link_actions = [ + ACTION_NAMES.cpp_link_executable, + ACTION_NAMES.cpp_link_dynamic_library, + ACTION_NAMES.cpp_link_nodeps_dynamic_library, +] +def _impl(ctx): + cpu = ctx.attr.cpu + is_bsd = cpu == "k8" or cpu == "freebsd" or cpu == "openbsd" + compiler = "compiler" + toolchain_identifier = "local_freebsd" + host_system_name = "local" if is_bsd else "armeabi-v7a" + target_system_name = "local" if is_bsd else "armeabi-v7a" + target_libc = "local" if is_bsd else "armeabi-v7a" + abi_version = "local" if is_bsd else "armeabi-v7a" + abi_libc_version = "local" if is_bsd else "armeabi-v7a" + objcopy_embed_data_action = action_config( + action_name = "objcopy_embed_data", + enabled = True, + tools = [tool(path = "/usr/bin/objcopy")], + ) + action_configs = [objcopy_embed_data_action] if is_bsd else [] + default_link_flags_feature = feature( + name = "default_link_flags", + enabled = True, + flag_sets = [ + flag_set( + actions = all_link_actions, + flag_groups = [ + flag_group( + flags = [ + "-Wl,-undefined,dynamic_lookup", + "-lc++", + "-Wl,-z,relro,-z,now", + "-no-canonical-prefixes", + "-L%%LOCALBASE%%/lib", + ], + ), + ], + ), + flag_set( + actions = all_link_actions, + flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])], + with_features = [with_feature_set(features = ["opt"])], + ), + ], + ) + unfiltered_compile_flags_feature = feature( + name = "unfiltered_compile_flags", + enabled = True, + flag_sets = [ + flag_set( + actions = all_compile_actions, + flag_groups = [ + flag_group( + flags = [ + "-no-canonical-prefixes", + "-Wno-builtin-macro-redefined", + "-D__DATE__=\"redacted\"", + "-D__TIMESTAMP__=\"redacted\"", + "-D__TIME__=\"redacted\"", + ], + ), + ], + ), + ], + ) + supports_pic_feature = feature(name = "supports_pic", enabled = True) + default_compile_flags_feature = feature( + name = "default_compile_flags", + enabled = True, + flag_sets = [ + flag_set( + actions = all_compile_actions, + flag_groups = [ + flag_group( + flags = [ + "-U_FORTIFY_SOURCE", + "-D_FORTIFY_SOURCE=1", + "-fstack-protector", + "-Wall", + "-fno-omit-frame-pointer", + ], + ), + ], + ), + flag_set( + actions = all_compile_actions, + flag_groups = [flag_group(flags = ["-g"])], + with_features = [with_feature_set(features = ["dbg"])], + ), + flag_set( + actions = all_compile_actions, + flag_groups = [ + flag_group( + flags = [ + "-g0", + "-O2", + "-DNDEBUG", + "-ffunction-sections", + "-fdata-sections", + ], + ), + ], + with_features = [with_feature_set(features = ["opt"])], + ), + flag_set( + actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend], + flag_groups = [flag_group(flags = ["-std=c++17"])], + ), + ], + ) + opt_feature = feature(name = "opt") + supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) + objcopy_embed_flags_feature = feature( + name = "objcopy_embed_flags", + enabled = True, + flag_sets = [ + flag_set( + actions = ["objcopy_embed_data"], + flag_groups = [flag_group(flags = ["-I", "binary"])], + ), + ], + ) + dbg_feature = feature(name = "dbg") + user_compile_flags_feature = feature( + name = "user_compile_flags", + enabled = True, + flag_sets = [ + flag_set( + actions = all_compile_actions, + flag_groups = [ + flag_group( + flags = ["%{user_compile_flags}"], + iterate_over = "user_compile_flags", + expand_if_available = "user_compile_flags", + ), + ], + ), + ], + ) + sysroot_feature = feature( + name = "sysroot", + enabled = True, + flag_sets = [ + flag_set( + actions = [ + ACTION_NAMES.c_compile, + ACTION_NAMES.cpp_compile, + ACTION_NAMES.linkstamp_compile, + ACTION_NAMES.preprocess_assemble, + ACTION_NAMES.cpp_header_parsing, + ACTION_NAMES.cpp_module_compile, + ACTION_NAMES.cpp_module_codegen, + ACTION_NAMES.clif_match, + ACTION_NAMES.lto_backend, + ] + all_link_actions, + flag_groups = [ + flag_group( + flags = ["--sysroot=%{sysroot}"], + expand_if_available = "sysroot", + ), + ], + ), + ], + ) + if is_bsd: + features = [ + default_compile_flags_feature, + default_link_flags_feature, + supports_dynamic_linker_feature, + supports_pic_feature, + objcopy_embed_flags_feature, + opt_feature, + dbg_feature, + user_compile_flags_feature, + sysroot_feature, + unfiltered_compile_flags_feature, + ] + else: + features = [supports_dynamic_linker_feature, supports_pic_feature] + if (is_bsd): + cxx_builtin_include_directories = ["/usr/local/llvm-devel/lib/clang/16.0.0", "/usr/include/c++/v1", "/usr/local/include", "/usr/include"] + else: + cxx_builtin_include_directories = [] + if is_bsd: + tool_paths = [ + tool_path(name = "ar", path = "/usr/bin/ar"), + tool_path(name = "cpp", path = "/usr/local/llvm-devel/bin/clang-cpp"), + tool_path(name = "dwp", path = "/usr/bin/dwp"), + tool_path(name = "gcc", path = "/usr/local/llvm-devel/bin/clang-16"), + tool_path(name = "gcov", path = "/usr/bin/gcov"), + tool_path(name = "ld", path = "/usr/local/llvm-devel/bin/ld"), + tool_path(name = "nm", path = "/usr/bin/nm"), + tool_path(name = "objcopy", path = "/usr/bin/objcopy"), + tool_path(name = "objdump", path = "/usr/bin/objdump"), + tool_path(name = "strip", path = "/usr/bin/strip"), + ] + else: + tool_paths = [ + tool_path(name = "ar", path = "/bin/false"), + tool_path(name = "cpp", path = "/bin/false"), + tool_path(name = "dwp", path = "/bin/false"), + tool_path(name = "gcc", path = "/bin/false"), + tool_path(name = "gcov", path = "/bin/false"), + tool_path(name = "ld", path = "/bin/false"), + tool_path(name = "nm", path = "/bin/false"), + tool_path(name = "objcopy", path = "/bin/false"), + tool_path(name = "objdump", path = "/bin/false"), + tool_path(name = "strip", path = "/bin/false"), + ] + out = ctx.actions.declare_file(ctx.label.name) + ctx.actions.write(out, "Fake executable") + return [ + cc_common.create_cc_toolchain_config_info( + ctx = ctx, + features = features, + action_configs = action_configs, + cxx_builtin_include_directories = cxx_builtin_include_directories, + toolchain_identifier = toolchain_identifier, + host_system_name = host_system_name, + target_system_name = target_system_name, + target_cpu = cpu, + target_libc = target_libc, + compiler = compiler, + abi_version = abi_version, + abi_libc_version = abi_libc_version, + tool_paths = tool_paths, + ), + DefaultInfo( + executable = out, + ), + ] + +cc_toolchain_config = rule( + implementation = _impl, + attrs = { + "cpu": attr.string(mandatory = True), + }, + provides = [CcToolchainConfigInfo], + executable = True, +) diff --git a/science/py-tensorflow/files/patch-.bazelrc b/science/py-tensorflow/files/patch-.bazelrc new file mode 100644 index 000000000000..49784e41f3b9 --- /dev/null +++ b/science/py-tensorflow/files/patch-.bazelrc @@ -0,0 +1,22 @@ +--- .bazelrc.orig 2022-05-22 22:28:22 UTC ++++ .bazelrc +@@ -151,6 +151,19 @@ build --experimental_cc_shared_library + + # Default options should come above this line. + ++# Use our custom-configured c++ toolchain. ++# Use --cpu as a differentiator. ++build:freebsd --cpu=k8 ++ ++# Use the default Bazel C++ toolchain to build the tools used during the ++# build. ++build:freebsd --crosstool_top=//freebsd:freebsd_clang ++build:freebsd --linkopt=-L%%LOCALBASE%%/lib ++ ++build:freebsd --python_path="%%PYTHON%%" ++build:freebsd --define force_libcpp=enabled ++build:freebsd --action_env=CXXFLAGS=-stdlib=libc++ ++ + # Allow builds using libc++ as a linker library + # This is mostly for OSSFuzz, so we also pass in the flags from environment to clean build file + build:libc++ --action_env=CC diff --git a/science/py-tensorflow/files/patch-WORKSPACE b/science/py-tensorflow/files/patch-WORKSPACE index 25f4dbfacc15..d037b0785741 100644 --- a/science/py-tensorflow/files/patch-WORKSPACE +++ b/science/py-tensorflow/files/patch-WORKSPACE @@ -1,9 +1,10 @@ ---- WORKSPACE.orig 2021-01-04 20:18:42 UTC +--- WORKSPACE.orig 2022-05-22 22:28:22 UTC +++ WORKSPACE -@@ -12,6 +12,15 @@ http_archive( - ], - ) - +@@ -1,4 +1,15 @@ + workspace(name = "org_tensorflow") ++register_toolchains("//freebsd:freebsd_py_toolchain") ++ ++load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "io_bazel_rules_docker", + sha256 = "7d453450e1eb70e238eea6b31f4115607ec1200e91afea01c25f9804f37e39c8", @@ -12,50 +13,6 @@ + "https://github.com/bazelbuild/rules_docker/releases/download/v0.10.0/rules_docker-v0.10.0.tar.gz", + ], +) -+ - # Load tf_repositories() before loading dependencies for other repository so - # that dependencies like com_google_protobuf won't be overridden. - load("//tensorflow:workspace.bzl", "tf_repositories") -@@ -78,6 +87,42 @@ http_file( - executable = 1, - urls = ["https://github.com/google/xctestrunner/releases/download/0.2.7/ios_test_runner.par"], - ) # https://github.com/google/xctestrunner/releases -+ -+new_local_repository( -+ name = "jsonHeaders", -+ path = "%%LOCALBASE%%/include/json", -+ build_file_content = """ -+ -+package( -+ default_visibility = [ -+ "//visibility:public", -+ ], -+) -+ -+cc_library( -+ name = "headers", -+ srcs = glob(["*.h"]), -+) -+""", -+) -+ -+new_local_repository( -+ name = "absl_Headers", -+ path = "%%LOCALBASE%%/include/absl", -+ build_file_content = """ -+ -+package( -+ default_visibility = [ -+ "//visibility:public", -+ ], -+) -+cc_library( -+ name = "abslHeaders", -+ srcs = glob(["*/*.h", "*/*/*.h", "*/*/*/*/*/*.h"]), -+) -+ -+""", -+) - # Use `swift_rules_dependencies` to fetch the toolchains. With the - # `git_repository` rules above, the following call will skip redefining them. - load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") + + # Initialize the TensorFlow repository and all dependencies. + # diff --git a/science/py-tensorflow/files/patch-bazelrc b/science/py-tensorflow/files/patch-bazelrc deleted file mode 100644 index 94e8db0ecd1d..000000000000 --- a/science/py-tensorflow/files/patch-bazelrc +++ /dev/null @@ -1,11 +0,0 @@ ---- .bazelrc.orig 2019-07-13 21:45:36.138413000 +0100 -+++ .bazelrc 2019-07-13 21:46:25.898491000 +0100 -@@ -101,7 +101,7 @@ - build:c++1z --cxxopt=-stdlib=libc++ - - # Default paths for TF_SYSTEM_LIBS --build --define=PREFIX=/usr -+build --define=PREFIX=%%LOCALBASE%% - build --define=LIBDIR=$(PREFIX)/lib - build --define=INCLUDEDIR=$(PREFIX)/include - diff --git a/science/py-tensorflow/files/patch-configure b/science/py-tensorflow/files/patch-configure new file mode 100644 index 000000000000..bf95a05716ba --- /dev/null +++ b/science/py-tensorflow/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2022-05-22 22:28:22 UTC ++++ configure +@@ -4,7 +4,7 @@ set -e + set -o pipefail + + if [ -z "$PYTHON_BIN_PATH" ]; then +- PYTHON_BIN_PATH=$(which python3 || which python || true) ++ PYTHON_BIN_PATH=$(which %%PYTHON%% || which python || true) + fi + + # Set all env variables diff --git a/science/py-tensorflow/files/patch-protobuf b/science/py-tensorflow/files/patch-protobuf deleted file mode 100644 index de3cd9510b53..000000000000 --- a/science/py-tensorflow/files/patch-protobuf +++ /dev/null @@ -1,22 +0,0 @@ ---- tensorflow/core/kernels/example_parsing_ops.cc.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/core/kernels/example_parsing_ops.cc -@@ -859,7 +859,7 @@ class DecodeJSONExampleOp : public OpKernel { - json_example, &binary_examples->flat()(i)); - OP_REQUIRES(ctx, status.ok(), - errors::InvalidArgument("Error while parsing JSON: ", -- string(status.error_message()))); -+ string(status.message()))); - } - } - ---- tensorflow/core/profiler/rpc/client/dump_tpu_profile.cc.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/core/profiler/rpc/client/dump_tpu_profile.cc -@@ -102,7 +102,7 @@ Status DumpOpProfileToLogDirectory(StringPiece run_dir - if (!status.ok()) { - return errors::Internal( - "Failed to convert op profile to json. Skipping... ", -- string(status.error_message())); -+ string(status.message())); - } - TF_RETURN_IF_ERROR(WriteStringToFile(Env::Default(), path, json)); - if (os) { diff --git a/science/py-tensorflow/files/patch-tensorflow_BUILD b/science/py-tensorflow/files/patch-tensorflow_BUILD new file mode 100644 index 000000000000..b9e955ed7a67 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_BUILD @@ -0,0 +1,22 @@ +--- tensorflow/BUILD.orig 2022-05-22 22:28:22 UTC ++++ tensorflow/BUILD +@@ -938,8 +938,10 @@ tf_cc_shared_object( + ], + "//tensorflow:windows": [], + "//tensorflow:freebsd": [ ++ "-Wl,--unresolved-symbols=ignore-all", + "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)", + "-lexecinfo", ++ "-L/usr/local/lib", + ], + "//conditions:default": [ + "-Wl,--version-script,$(location //tensorflow:tf_framework_version_script.lds)", +@@ -1021,7 +1023,7 @@ tf_cc_shared_object( + # copybara:uncomment_end + "//conditions:default": [ + "-z defs", +- "-Wl,--version-script,$(location //tensorflow/c:version_script.lds)", ++ "-L/lib,-L/usr/lib,--unresolved-symbols=ignore-all,-Wl,--version-script,$(location //tensorflow/c:version_script.lds)", + ], + }), + per_os_targets = True, diff --git a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_hlo_WORKSPACE b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_hlo_WORKSPACE new file mode 100644 index 000000000000..876a4cd2a5b6 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_hlo_WORKSPACE @@ -0,0 +1,11 @@ +--- tensorflow/compiler/mlir/hlo/WORKSPACE.orig 2022-05-22 22:28:22 UTC ++++ tensorflow/compiler/mlir/hlo/WORKSPACE +@@ -34,6 +34,8 @@ http_archive( + name = "llvm-raw", + build_file_content = "# empty", + sha256 = LLVM_SHA256, ++ patch_args = ["-p0"], ++ patches = ["@%%MLIR_LLVM_PATCH%%"], + strip_prefix = "llvm-project-" + LLVM_COMMIT, + urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)], + ) diff --git a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_BUILD b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_BUILD deleted file mode 100644 index 634c75832985..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/compiler/mlir/lite/BUILD.orig 2021-07-06 22:08:16 UTC -+++ tensorflow/compiler/mlir/lite/BUILD -@@ -318,6 +318,7 @@ tf_native_cc_binary( - srcs = [ - "operator_writer_gen.cc", - ], -+ linkopts = ["-lexecinfo"], - deps = [ - "@llvm//:support", - "@llvm//:tablegen", diff --git a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_quantization_BUILD b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_quantization_BUILD deleted file mode 100644 index 4950e762ded3..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_lite_quantization_BUILD +++ /dev/null @@ -1,8 +0,0 @@ ---- tensorflow/compiler/mlir/lite/quantization/BUILD.orig 2021-07-06 10:09:38 UTC -+++ tensorflow/compiler/mlir/lite/quantization/BUILD -@@ -57,4 +57,5 @@ tf_native_cc_binary( - "@llvm//:tablegen", - "@local_config_mlir//:TableGen", - ], -+ linkopts = ["-lexecinfo"], - ) diff --git a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_quantization_tensorflow_BUILD b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_quantization_tensorflow_BUILD new file mode 100644 index 000000000000..50bc0af36e7b --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_quantization_tensorflow_BUILD @@ -0,0 +1,11 @@ +--- tensorflow/compiler/mlir/quantization/tensorflow/BUILD.orig 2022-09-06 21:29:53 UTC ++++ tensorflow/compiler/mlir/quantization/tensorflow/BUILD +@@ -32,7 +32,7 @@ genrule( + outs = [ + "passes/quantized_function_library.h", + ], +- cmd = "$(location gen_quantized_function_library) --output_file $(RULEDIR)/passes/quantized_function_library.h --src $(SRCS)", ++ cmd = "%%PYTHON%% $(location gen_quantized_function_library) --output_file $(RULEDIR)/passes/quantized_function_library.h --src $(SRCS)", + exec_tools = ["gen_quantized_function_library"], + ) + diff --git a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_tensorflow_BUILD b/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_tensorflow_BUILD deleted file mode 100644 index 06fd4143a230..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_compiler_mlir_tensorflow_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/compiler/mlir/tensorflow/BUILD.orig 2021-07-06 11:28:13 UTC -+++ tensorflow/compiler/mlir/tensorflow/BUILD -@@ -586,6 +586,7 @@ tf_native_cc_binary( - srcs = [ - "translate/derived_attr_populator_gen.cc", - ], -+ linkopts = ["-lexecinfo"], - deps = [ - "@llvm//:support", - "@llvm//:tablegen", diff --git a/science/py-tensorflow/files/patch-tensorflow_contrib_bigtable_BUILD b/science/py-tensorflow/files/patch-tensorflow_contrib_bigtable_BUILD deleted file mode 100644 index 9796bd510efa..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_contrib_bigtable_BUILD +++ /dev/null @@ -1,20 +0,0 @@ ---- tensorflow/contrib/bigtable/BUILD.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/contrib/bigtable/BUILD -@@ -82,6 +82,8 @@ tf_kernel_library( - "//tensorflow/core:framework_headers_lib", - "//third_party/eigen3", - "@com_github_googlecloudplatform_google_cloud_cpp//google/cloud/bigtable:bigtable_client", -+ "@com_google_absl//absl/base", -+ "@com_google_absl//absl/synchronization", - ], - ) - -@@ -94,6 +96,8 @@ cc_library( - "//tensorflow/core:framework_headers_lib", - "//third_party/eigen3", - "@com_github_googlecloudplatform_google_cloud_cpp//google/cloud/bigtable:bigtable_client", -+ "@com_google_absl//absl/base", -+ "@com_google_absl//absl/synchronization", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_contrib_boosted__trees_BUILD b/science/py-tensorflow/files/patch-tensorflow_contrib_boosted__trees_BUILD deleted file mode 100644 index 86587ade0ef5..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_contrib_boosted__trees_BUILD +++ /dev/null @@ -1,24 +0,0 @@ ---- tensorflow/contrib/boosted_trees/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/contrib/boosted_trees/BUILD -@@ -24,6 +24,10 @@ cc_library( - ":stats_accumulator_ops_kernels", - ":training_ops_kernels", - ], -+ linkopts = select({ -+ "//tensorflow:freebsd": ["-lm", "-lexecinfo",], -+ }), -+ - alwayslink = 1, - ) - -@@ -37,6 +41,10 @@ cc_library( - ":stats_accumulator_ops_op_lib", - ":training_ops_op_lib", - ], -+ linkopts = select({ -+ "//tensorflow:freebsd": ["-lm", "-lexecinfo",], -+ }), -+ - ) - - py_library( diff --git a/science/py-tensorflow/files/patch-tensorflow_contrib_ffmpeg_default_BUILD b/science/py-tensorflow/files/patch-tensorflow_contrib_ffmpeg_default_BUILD deleted file mode 100644 index 174649a5e926..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_contrib_ffmpeg_default_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/contrib/ffmpeg/default/BUILD.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/contrib/ffmpeg/default/BUILD -@@ -18,6 +18,7 @@ cc_library( - # Header is shared between implementations. - "//tensorflow/contrib/ffmpeg:ffmpeg_lib.h", - ], -+ copts = ["-I%%LOCALBASE%%/include"], - deps = [ - "//tensorflow/core:framework_headers_lib", - "//third_party/eigen3", diff --git a/science/py-tensorflow/files/patch-tensorflow_contrib_ignite_kernels_client_ignite__plain__client__unix.cc b/science/py-tensorflow/files/patch-tensorflow_contrib_ignite_kernels_client_ignite__plain__client__unix.cc deleted file mode 100644 index eb84acb94185..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_contrib_ignite_kernels_client_ignite__plain__client__unix.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/contrib/ignite/kernels/client/ignite_plain_client_unix.cc -@@ -19,6 +19,10 @@ limitations under the License. - #include - #include - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - #include - #include - diff --git a/science/py-tensorflow/files/patch-tensorflow_contrib_makefile_Makefile b/science/py-tensorflow/files/patch-tensorflow_contrib_makefile_Makefile deleted file mode 100644 index 5c7bfd1f5c14..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_contrib_makefile_Makefile +++ /dev/null @@ -1,49 +0,0 @@ ---- tensorflow/contrib/makefile/Makefile.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/contrib/makefile/Makefile -@@ -60,12 +60,15 @@ else - ifeq ($(UNAME_S),Linux) - HOST_OS := LINUX - endif -+ ifeq ($(UNAME_S),FreeBSD) -+ HOST_OS := FREEBSD -+ endif - ifeq ($(UNAME_S),Darwin) - HOST_OS := OSX - endif - endif - --HOST_ARCH := $(shell if [[ $(shell uname -m) =~ i[345678]86 ]]; then echo x86_32; else echo $(shell uname -m); fi) -+HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; elif uname -m | grep -q amd64; then echo x86_64; else uname -m; fi) - - # Where compiled objects are stored. - HOST_OBJDIR := $(MAKEFILE_DIR)/gen/host_obj/ -@@ -111,6 +114,9 @@ $(HOST_NSYNC_LIB) \ - ifeq ($(HOST_OS),LINUX) - HOST_LIBS += -ldl -lpthread -lrt - endif -+ifeq ($(HOST_OS),FREEBSD) -+ HOST_LIBS += -lexecinfo -lpthread -+endif - - # If we're on a Pi, link in pthreads and dl - ifeq ($(HOST_OS),PI) -@@ -248,7 +254,7 @@ endif - LDFLAGS += -all_load - endif - # Make sure that we don't strip global constructors on Linux. --ifeq ($(TARGET),LINUX) -+ifeq ($(TARGET),LINUX,FREEBSD) - ifeq ($(HAS_GEN_HOST_PROTOC),true) - LIBFLAGS += -L$(MAKEFILE_DIR)/gen/protobuf-host/lib - export LD_LIBRARY_PATH=$(MAKEFILE_DIR)/gen/protobuf-host/lib -@@ -261,6 +267,10 @@ endif - ifeq ($(TARGET),LINUX) - LIBS += -ldl -lpthread -lrt - endif -+ifeq ($(TARGET),FREEBSD) -+ LIBS += -lexecinfo -lpthread -+endif -+ - # If we're cross-compiling for the Raspberry Pi, use the right gcc. - ifeq ($(TARGET),PI) - CXXFLAGS += $(ANDROID_TYPES) -DRASPBERRY_PI diff --git a/science/py-tensorflow/files/patch-tensorflow_core_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_BUILD index 99e14f8f3334..91f1f88aee8d 100644 --- a/science/py-tensorflow/files/patch-tensorflow_core_BUILD +++ b/science/py-tensorflow/files/patch-tensorflow_core_BUILD @@ -1,47 +1,11 @@ ---- tensorflow/core/BUILD.orig 2019-10-14 21:08:43 UTC +--- tensorflow/core/BUILD.orig 2022-05-22 22:28:22 UTC +++ tensorflow/core/BUILD -@@ -2432,7 +2432,7 @@ cc_library( +@@ -1284,7 +1284,7 @@ cc_library( + hdrs = [":lib_internal_public_headers"], copts = tf_copts(), - defines = LIB_INTERNAL_DEFINES, linkopts = select({ - "//tensorflow:freebsd": [], -+ "//tensorflow:freebsd": ["-lexecinfo",], ++ "//tensorflow:freebsd": ["-L%%LOCALBASE%%/lib"], "//tensorflow:windows": [], "//tensorflow:android": [], "//conditions:default": [ -@@ -2515,7 +2515,7 @@ cc_library( - hdrs = ["lib/gif/gif_io.h"], - copts = tf_copts(), - linkopts = select({ -- "//tensorflow:freebsd": [], -+ "//tensorflow:freebsd": ["-lexecinfo",], - "//tensorflow:windows": [], - "//conditions:default": ["-ldl"], - }), -@@ -2539,7 +2539,7 @@ cc_library( - ], - copts = tf_copts(), - linkopts = select({ -- "//tensorflow:freebsd": [], -+ "//tensorflow:freebsd": ["-lexecinfo",], - "//tensorflow:windows": [], - "//conditions:default": ["-ldl"], - }), -@@ -2570,7 +2570,7 @@ cc_library( - ], - copts = tf_copts(), - linkopts = select({ -- "//tensorflow:freebsd": [], -+ "//tensorflow:freebsd": ["-lexecinfo",], - "//tensorflow:windows": [], - "//conditions:default": ["-ldl"], - }), -@@ -2907,7 +2907,7 @@ tf_cuda_library( - hdrs = FRAMEWORK_INTERNAL_PUBLIC_HEADERS, - copts = tf_copts(), - linkopts = select({ -- "//tensorflow:freebsd": ["-lm"], -+ "//tensorflow:freebsd": ["-lm", "-lexecinfo",], - "//tensorflow:windows": [], - "//conditions:default": [ - "-ldl", diff --git a/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_BUILD deleted file mode 100644 index 627b871ae92a..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/core/distributed_runtime/rpc/BUILD.orig 2021-07-08 11:22:26 UTC -+++ tensorflow/core/distributed_runtime/rpc/BUILD -@@ -253,6 +253,7 @@ cc_library( - name = "grpc_master_service_impl", - srcs = ["grpc_master_service_impl.cc"], - hdrs = ["grpc_master_service_impl.h"], -+ copts = ["-I%%LOCALBASE%%/include"], - deps = [ - "//tensorflow:grpc++", - "//tensorflow/core:master_proto_cc", diff --git a/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_grpc__server__lib.cc b/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_grpc__server__lib.cc deleted file mode 100644 index ac5d828514d6..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_distributed__runtime_rpc_grpc__server__lib.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc.orig 2021-07-08 14:14:12 UTC -+++ tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc -@@ -487,12 +487,6 @@ class GrpcServerFactory : public ServerFactory { - class GrpcServerRegistrar { - public: - GrpcServerRegistrar() { -- gpr_allocation_functions alloc_fns; -- memset(&alloc_fns, 0, sizeof(alloc_fns)); -- alloc_fns.malloc_fn = port::Malloc; -- alloc_fns.realloc_fn = port::Realloc; -- alloc_fns.free_fn = port::Free; -- gpr_set_allocation_functions(alloc_fns); - ServerFactory::Register("GRPC_SERVER", new GrpcServerFactory()); - } - }; diff --git a/science/py-tensorflow/files/patch-tensorflow_core_lib_png_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_lib_png_BUILD new file mode 100644 index 000000000000..76a365c9a661 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_core_lib_png_BUILD @@ -0,0 +1,10 @@ +--- tensorflow/core/lib/png/BUILD.orig 2022-08-28 14:35:19 UTC ++++ tensorflow/core/lib/png/BUILD +@@ -23,6 +23,7 @@ cc_library( + "@com_google_absl//absl/base", + "@zlib", + ], ++ copts = ["-std=c++17"], + ) + + alias( diff --git a/science/py-tensorflow/files/patch-tensorflow_core_platform_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_platform_BUILD new file mode 100644 index 000000000000..dc2a75c1daa6 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_core_platform_BUILD @@ -0,0 +1,10 @@ +--- tensorflow/core/platform/BUILD.orig 2022-08-29 08:52:22 UTC ++++ tensorflow/core/platform/BUILD +@@ -680,6 +680,7 @@ cc_library( + ":str_util", + ":stringpiece", + ], ++ copts = ["-std=c++17"], + ) + + cc_library( diff --git a/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_BUILD deleted file mode 100644 index e42ac50a37f2..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/core/platform/cloud/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/core/platform/cloud/BUILD -@@ -220,6 +220,7 @@ cc_library( - "//tensorflow/core:lib_internal", - "@boringssl//:crypto", - "@jsoncpp_git//:jsoncpp", -+ "@jsonHeaders//:headers", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_gcs__dns__cache.cc b/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_gcs__dns__cache.cc deleted file mode 100644 index 3d1763b04a83..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_platform_cloud_gcs__dns__cache.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- tensorflow/core/platform/cloud/gcs_dns_cache.cc.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/core/platform/cloud/gcs_dns_cache.cc -@@ -26,6 +26,11 @@ limitations under the License. - #endif - #include - -+#ifdef __FreeBSD__ -+#include -+#include -+#endif -+ - namespace tensorflow { - - namespace { diff --git a/science/py-tensorflow/files/patch-tensorflow_core_profiler_internal_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_profiler_internal_BUILD deleted file mode 100644 index 17e360821407..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_profiler_internal_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/core/profiler/internal/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/core/profiler/internal/BUILD -@@ -38,6 +38,7 @@ cc_library( - "//tensorflow/core:lib", - "//tensorflow/core:protos_all_cc", - "@jsoncpp_git//:jsoncpp", -+ "@jsonHeaders//:headers", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_core_profiler_rpc_client_BUILD b/science/py-tensorflow/files/patch-tensorflow_core_profiler_rpc_client_BUILD deleted file mode 100644 index 3734a026f362..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_profiler_rpc_client_BUILD +++ /dev/null @@ -1,19 +0,0 @@ ---- tensorflow/core/profiler/rpc/client/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/core/profiler/rpc/client/BUILD -@@ -37,6 +37,8 @@ cc_library( - "//tensorflow/core:lib", - "//tensorflow/core:protos_all_cc", - "//tensorflow/core/profiler:op_profile_proto_cc", -+ "@com_google_absl//absl/base", -+ "@com_google_absl//absl/synchronization", - ], - ) - -@@ -48,6 +50,7 @@ cc_library( - "//tensorflow/core:lib", - "//tensorflow/core:protos_all_cc", - "@jsoncpp_git//:jsoncpp", -+ "@jsonHeaders//:headers", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_core_protobuf_autotuning.proto b/science/py-tensorflow/files/patch-tensorflow_core_protobuf_autotuning.proto deleted file mode 100644 index c23a828706c9..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_core_protobuf_autotuning.proto +++ /dev/null @@ -1,21 +0,0 @@ ---- tensorflow/core/protobuf/autotuning.proto.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/core/protobuf/autotuning.proto -@@ -11,14 +11,14 @@ import "google/protobuf/any.proto"; - import "google/protobuf/duration.proto"; - - message CudnnVersion { -- int32 major = 1; -- int32 minor = 2; -+ int32 major_val = 1; -+ int32 minor_val = 2; - int32 patch = 3; - } - - message ComputeCapability { -- int32 major = 1; -- int32 minor = 2; -+ int32 major_val = 1; -+ int32 minor_val = 2; - } - - message AutotuneResult { diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_experimental_micro_tools_make_targets_freebsd__makefile.inc b/science/py-tensorflow/files/patch-tensorflow_lite_experimental_micro_tools_make_targets_freebsd__makefile.inc deleted file mode 100644 index 15a38269c889..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_experimental_micro_tools_make_targets_freebsd__makefile.inc +++ /dev/null @@ -1,13 +0,0 @@ ---- tensorflow/lite/experimental/micro/tools/make/targets/freebsd_makefile.inc.orig 2021-07-05 16:52:18 UTC -+++ tensorflow/lite/experimental/micro/tools/make/targets/freebsd_makefile.inc -@@ -0,0 +1,10 @@ -+# Settings for x86 on FreeBSD -+ifeq ($(TARGET), freebsd) -+ ifeq ($(TARGET_ARCH), x86_64) -+ PLATFORM_FLAGS = \ -+ -DTF_LITE_DISABLE_X86_NEON -+ CXXFLAGS += $(PLATFORM_FLAGS) -+ CCFLAGS += $(PLATFORM_FLAGS) -+ endif -+endif -+ diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_kernels_internal_BUILD b/science/py-tensorflow/files/patch-tensorflow_lite_kernels_internal_BUILD deleted file mode 100644 index 3d2e73353bf0..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_kernels_internal_BUILD +++ /dev/null @@ -1,11 +0,0 @@ ---- tensorflow/lite/kernels/internal/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/lite/kernels/internal/BUILD -@@ -662,7 +662,7 @@ cc_library( - ":sse_tensor_utils", - ], - "//conditions:default": [ -- ":portable_tensor_utils", -+ ":neon_tensor_utils", - ], - }), - ) diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_python_interpreter__wrapper_BUILD b/science/py-tensorflow/files/patch-tensorflow_lite_python_interpreter__wrapper_BUILD deleted file mode 100644 index cd3a3ade6063..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_python_interpreter__wrapper_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/lite/python/interpreter_wrapper/BUILD.orig 2021-07-05 17:39:13 UTC -+++ tensorflow/lite/python/interpreter_wrapper/BUILD -@@ -31,6 +31,7 @@ cc_library( - "//tensorflow/lite/kernels:builtin_ops", - "//third_party/python_runtime:headers", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings:str_format", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_tools_BUILD b/science/py-tensorflow/files/patch-tensorflow_lite_tools_BUILD deleted file mode 100644 index 6b2504c8c28d..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_tools_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/lite/tools/BUILD.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/lite/tools/BUILD -@@ -76,6 +76,7 @@ cc_library( - "//tensorflow/lite/c:c_api_internal", - "//tensorflow/lite/schema:schema_fbs", - "@com_google_absl//absl/container:flat_hash_set", -+ "@com_google_absl//absl/time", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_Makefile b/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_Makefile deleted file mode 100644 index a0aa84faf993..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- tensorflow/lite/tools/make/Makefile.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/lite/tools/make/Makefile -@@ -16,12 +16,15 @@ else - ifeq ($(UNAME_S),Linux) - HOST_OS := linux - endif -+ ifeq ($(UNAME_S),FreeBSD) -+ HOST_OS := freebsd -+ endif - ifeq ($(UNAME_S),Darwin) - HOST_OS := osx - endif - endif - --HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; else uname -m; fi) -+HOST_ARCH := $(shell if uname -m | grep -q i[345678]86; then echo x86_32; elif uname -m | grep -q amd64; then echo x86_64; else uname -m; fi) - - # Override these on the make command line to target a specific architecture. For example: - # make -f tensorflow/lite/tools/make/Makefile TARGET=rpi TARGET_ARCH=armv7l diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_targets_freebsd__makefile.inc b/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_targets_freebsd__makefile.inc deleted file mode 100644 index b0070b6117cd..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_tools_make_targets_freebsd__makefile.inc +++ /dev/null @@ -1,19 +0,0 @@ ---- tensorflow/lite/tools/make/targets/freebsd_makefile.inc.orig 2021-07-05 16:52:18 UTC -+++ tensorflow/lite/tools/make/targets/freebsd_makefile.inc -@@ -0,0 +1,16 @@ -+# Settings for FreeBSD. -+ifeq ($(TARGET), freebsd) -+ CXXFLAGS += \ -+ -fPIC \ -+ -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \ -+ -pthread -+ CFLAGS += \ -+ -fPIC \ -+ -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \ -+ -pthread -+ # TODO(petewarden): In the future we may want to add architecture-specific -+ # flags like -msse4.2 -+ LIBS += -lexecinfo -+endif -+ -+ diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_BUILD b/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_BUILD deleted file mode 100644 index b399267b5bcb..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_BUILD +++ /dev/null @@ -1,20 +0,0 @@ ---- tensorflow/lite/tools/optimize/BUILD.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/lite/tools/optimize/BUILD -@@ -26,6 +26,8 @@ cc_library( - "//tensorflow/lite/schema:schema_fbs", - "//third_party/eigen3", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", -+ "@com_google_absl//absl/base", - ], - ) - -@@ -40,6 +42,8 @@ cc_library( - "//tensorflow/lite/kernels/internal:types", - "//tensorflow/lite/schema:schema_fbs", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", -+ "@com_google_absl//absl/base", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_calibration_BUILD b/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_calibration_BUILD deleted file mode 100644 index 15c1ee95393c..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_lite_tools_optimize_calibration_BUILD +++ /dev/null @@ -1,34 +0,0 @@ ---- tensorflow/lite/tools/optimize/calibration/BUILD.orig 2021-07-05 17:42:23 UTC -+++ tensorflow/lite/tools/optimize/calibration/BUILD -@@ -25,6 +25,7 @@ cc_library( - "//tensorflow/lite/kernels:builtin_ops", - "//tensorflow/lite/schema:schema_fbs", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", - "@flatbuffers", - ], - ) -@@ -49,6 +50,7 @@ tf_cc_test( - "//tensorflow/lite:framework", - "//tensorflow/lite/kernels:builtin_ops", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", - "@com_google_googletest//:gtest", - ], - ) -@@ -62,6 +64,7 @@ cc_library( - "//tensorflow/lite:framework", - "//tensorflow/lite/core/api", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", - ], - ) - -@@ -84,6 +87,7 @@ cc_library( - ":calibration_logger", - "//tensorflow/lite:framework", - "@com_google_absl//absl/memory", -+ "@com_google_absl//absl/strings", - ], - ) - diff --git a/science/py-tensorflow/files/patch-tensorflow_python_eager_pywrap__tfe__src.cc b/science/py-tensorflow/files/patch-tensorflow_python_eager_pywrap__tfe__src.cc deleted file mode 100644 index 093b4919c896..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_python_eager_pywrap__tfe__src.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- tensorflow/python/eager/pywrap_tfe_src.cc.orig 2021-07-07 11:59:05 UTC -+++ tensorflow/python/eager/pywrap_tfe_src.cc -@@ -1319,7 +1319,7 @@ static PyTypeObject TFE_Py_Tape_Type = { - sizeof(TFE_Py_Tape), /* tp_basicsize */ - 0, /* tp_itemsize */ - &TFE_Py_Tape_Delete, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ -@@ -1353,7 +1353,7 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = { - sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */ - 0, /* tp_itemsize */ - &TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ diff --git a/science/py-tensorflow/files/patch-tensorflow_python_lib_core_bfloat16.cc b/science/py-tensorflow/files/patch-tensorflow_python_lib_core_bfloat16.cc deleted file mode 100644 index 0f8a00f7c2a1..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_python_lib_core_bfloat16.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- tensorflow/python/lib/core/bfloat16.cc.orig 2021-07-07 11:57:12 UTC -+++ tensorflow/python/lib/core/bfloat16.cc -@@ -317,7 +317,7 @@ PyTypeObject PyBfloat16_Type = { - sizeof(PyBfloat16), // tp_basicsize - 0, // tp_itemsize - nullptr, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_print - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare / tp_reserved diff --git a/science/py-tensorflow/files/patch-tensorflow_python_lib_core_ndarray__tensor__bridge.cc b/science/py-tensorflow/files/patch-tensorflow_python_lib_core_ndarray__tensor__bridge.cc deleted file mode 100644 index 72fb0877012d..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_python_lib_core_ndarray__tensor__bridge.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- tensorflow/python/lib/core/ndarray_tensor_bridge.cc.orig 2021-07-07 09:08:49 UTC -+++ tensorflow/python/lib/core/ndarray_tensor_bridge.cc -@@ -86,7 +86,7 @@ PyTypeObject TensorReleaserType = { - 0, /* tp_itemsize */ - /* methods */ - TensorReleaser_dealloc, /* tp_dealloc */ -- nullptr, /* tp_print */ -+ 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_compare */ diff --git a/science/py-tensorflow/files/patch-tensorflow_stream__executor_stream__executor__pimpl.h b/science/py-tensorflow/files/patch-tensorflow_stream__executor_stream__executor__pimpl.h deleted file mode 100644 index dcd27cf7ef3e..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_stream__executor_stream__executor__pimpl.h +++ /dev/null @@ -1,10 +0,0 @@ ---- tensorflow/stream_executor/stream_executor_pimpl.h.orig 2021-07-07 09:04:03 UTC -+++ tensorflow/stream_executor/stream_executor_pimpl.h -@@ -25,6 +25,7 @@ limitations under the License. - #include "absl/base/macros.h" - #include "absl/synchronization/mutex.h" - #include "absl/types/optional.h" -+#include "absl/memory/memory.h" - #include "tensorflow/stream_executor/device_memory_allocator.h" - #include "tensorflow/stream_executor/lib/status.h" - #include "tensorflow/stream_executor/lib/statusor.h" diff --git a/science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl b/science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl deleted file mode 100644 index 1856d11f6a7d..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_tensorflow.bzl +++ /dev/null @@ -1,65 +0,0 @@ ---- tensorflow/tensorflow.bzl.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/tensorflow.bzl -@@ -289,6 +289,7 @@ def tf_copts( - "-Iexternal/gemmlowp", - "-Wno-sign-compare", - "-ftemplate-depth=900", -+ "-I%%LOCALBASE%%/include", - ]) + - (if_not_windows(["-fno-exceptions"]) if not allow_exceptions else []) + - if_cuda(["-DGOOGLE_CUDA=1"]) + -@@ -628,7 +629,7 @@ def tf_cc_binary( - ], - ), - data = depset(data + added_data_deps), -- linkopts = linkopts + _rpath_linkopts(name_os), -+ linkopts = linkopts + ["-lexecinfo", "-lgpr"] + _rpath_linkopts(name), - visibility = visibility, - **kwargs - ) -@@ -693,7 +694,7 @@ def tf_gen_op_wrapper_cc( - tf_cc_binary( - name = tool, - copts = tf_copts(), -- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]), -+ linkopts = if_not_windows(["-lm", "-Wl, -lexecinfo"]), - linkstatic = 1, # Faster to link this one-time-use binary dynamically - deps = [op_gen] + deps, - ) -@@ -878,7 +879,7 @@ def tf_gen_op_wrapper_py( - tf_cc_binary( - name = tool_name, - copts = tf_copts(), -- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts, -+ linkopts = if_not_windows(["-L%%LOCALBASE%%/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts, - linkstatic = 1, # Faster to link this one-time-use binary dynamically - visibility = [clean_dep("//tensorflow:internal")], - deps = ([ -@@ -992,8 +993,9 @@ def tf_cc_test( - "//conditions:default": [ - "-lpthread", - "-lm", -+ "-lexecinfo", - ], -- }) + linkopts + _rpath_linkopts(name), -+ }) + linkopts + ["-lexecinfo"] + _rpath_linkopts(name), - deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml( - [ - clean_dep("//third_party/mkl:intel_binary_blob"), -@@ -1140,7 +1142,7 @@ def tf_gpu_only_cc_test( - ]) + if_rocm_is_configured([ - clean_dep("//tensorflow/core:gpu_lib"), - ]), -- linkopts = if_not_windows(["-lpthread", "-lm"]) + linkopts + _rpath_linkopts(name), -+ linkopts = if_not_windows(["-lpthread", "-lm", "-lexecinfo",]) + linkopts + _rpath_linkopts(name), - linkstatic = linkstatic or select({ - # cc_tests with ".so"s in srcs incorrectly link on Darwin - # unless linkstatic=1. -@@ -1820,6 +1822,7 @@ def tf_custom_op_library(name, srcs = [], gpu_srcs = [ - linkopts = linkopts + select({ - "//conditions:default": [ - "-lm", -+ "-lexecinfo", - ], - clean_dep("//tensorflow:windows"): [], - clean_dep("//tensorflow:macos"): [], diff --git a/science/py-tensorflow/files/patch-tensorflow_tools_lib__package_BUILD b/science/py-tensorflow/files/patch-tensorflow_tools_lib__package_BUILD deleted file mode 100644 index 660bc0831d34..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_tools_lib__package_BUILD +++ /dev/null @@ -1,18 +0,0 @@ ---- tensorflow/tools/lib_package/BUILD.orig 2019-10-14 21:08:43 UTC -+++ tensorflow/tools/lib_package/BUILD -@@ -151,7 +151,6 @@ genrule( - "@gemmlowp//:LICENSE", - "@gif_archive//:COPYING", - "@highwayhash//:LICENSE", -- "@hwloc//:COPYING", - "@icu//:icu4c/LICENSE", - "@jpeg//:LICENSE.md", - "@lmdb//:LICENSE", -@@ -223,7 +222,6 @@ genrule( - "@gemmlowp//:LICENSE", - "@gif_archive//:COPYING", - "@highwayhash//:LICENSE", -- "@hwloc//:COPYING", - "@icu//:icu4j/main/shared/licenses/LICENSE", - "@jpeg//:LICENSE.md", - "@lmdb//:LICENSE", diff --git a/science/py-tensorflow/files/patch-tensorflow_tools_pip__package_setup.py b/science/py-tensorflow/files/patch-tensorflow_tools_pip__package_setup.py new file mode 100644 index 000000000000..76ac3facf928 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_tools_pip__package_setup.py @@ -0,0 +1,34 @@ +--- tensorflow/tools/pip_package/setup.py.orig 2022-09-07 19:29:52 UTC ++++ tensorflow/tools/pip_package/setup.py +@@ -77,13 +77,12 @@ REQUIRED_PACKAGES = [ + 'astunparse >= 1.6.0', + # TODO(b/187981032): remove the constraint for 2.0 once the incompatibile + # issue is resolved. +- 'flatbuffers >= 1.12, <2', ++ 'flatbuffers', + # TODO(b/213222745) gast versions above 0.4.0 break TF's tests +- 'gast >= 0.2.1, <= 0.4.0', ++ 'gast', + 'google_pasta >= 0.1.1', + 'h5py >= 2.9.0', +- 'keras_preprocessing >= 1.1.1', # 1.1.0 needs tensorflow==1.7 +- 'libclang >= 13.0.0', ++ 'keras_preprocessing >= 1.1.0', # 1.1.0 needs tensorflow==1.7 + 'numpy >= 1.20', + 'opt_einsum >= 2.3.2', + 'packaging', +@@ -94,13 +93,12 @@ REQUIRED_PACKAGES = [ + # See also: https://github.com/protocolbuffers/protobuf/issues/9954 + # See also: https://github.com/tensorflow/tensorflow/issues/56077 + # This is a temporary patch for now, to patch previous TF releases. +- 'protobuf >= 3.9.2, < 3.20', ++ 'protobuf', + 'setuptools', + 'six >= 1.12.0', + 'termcolor >= 1.1.0', + 'typing_extensions >= 3.6.6', + 'wrapt >= 1.11.0', +- 'tensorflow-io-gcs-filesystem >= 0.23.1', + # 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/science/py-tensorflow/files/patch-tensorflow_tools_proto__text_BUILD b/science/py-tensorflow/files/patch-tensorflow_tools_proto__text_BUILD new file mode 100644 index 000000000000..8cdff520c744 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_tools_proto__text_BUILD @@ -0,0 +1,10 @@ +--- tensorflow/tools/proto_text/BUILD.orig 2022-05-22 22:28:22 UTC ++++ tensorflow/tools/proto_text/BUILD +@@ -60,6 +60,7 @@ cc_library( + "-lm", + "-lpthread", + "-lrt", ++ "-L%%LOCALBASE%%/lib", + ], + }), + deps = [ diff --git a/science/py-tensorflow/files/patch-tensorflow_workspace.bzl b/science/py-tensorflow/files/patch-tensorflow_workspace.bzl deleted file mode 100644 index 45a4a12c3d2b..000000000000 --- a/science/py-tensorflow/files/patch-tensorflow_workspace.bzl +++ /dev/null @@ -1,18 +0,0 @@ ---- tensorflow/workspace.bzl.orig 2021-01-04 20:18:42 UTC -+++ tensorflow/workspace.bzl -@@ -157,6 +157,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = " - tf_http_archive( - name = "com_google_absl", - build_file = clean_dep("//third_party:com_google_absl.BUILD"), -+ patch_file = clean_dep("//third_party:extra-patch-absl_base_internal_unscaledcycleclock.cc"), - sha256 = "acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070", - strip_prefix = "abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f", - urls = [ -@@ -324,6 +325,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = " - build_file = clean_dep("//third_party:functools32.BUILD"), - sha256 = "f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d", - strip_prefix = "functools32-3.2.3-2", -+ system_build_file = clean_dep("//third_party/systemlibs:functools32.BUILD"), - urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz", - "https://pypi.python.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz", diff --git a/science/py-tensorflow/files/patch-tensorflow_workspace2.bzl b/science/py-tensorflow/files/patch-tensorflow_workspace2.bzl new file mode 100644 index 000000000000..207894ee3c88 --- /dev/null +++ b/science/py-tensorflow/files/patch-tensorflow_workspace2.bzl @@ -0,0 +1,10 @@ +--- tensorflow/workspace2.bzl.orig 2022-05-22 22:28:22 UTC ++++ tensorflow/workspace2.bzl +@@ -137,6 +137,7 @@ def _tf_repositories(): + name = "XNNPACK", + sha256 = "7e9ad45391e5158fd00e816022bda21d54a6180788af7c455c864a78cee252c6", + strip_prefix = "XNNPACK-11b2812d64e49bab9b6c489f79067fc94e69db9f", ++ patch_file=["//third_party:add-default-option.patch"], + urls = tf_mirror_urls("https://github.com/google/XNNPACK/archive/11b2812d64e49bab9b6c489f79067fc94e69db9f.zip"), + ) + # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/xnnpack.cmake) diff --git a/science/py-tensorflow/files/patch-third__party_absl_system.absl.strings.BUILD b/science/py-tensorflow/files/patch-third__party_absl_system.absl.strings.BUILD new file mode 100644 index 000000000000..5db2e76aff4b --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_absl_system.absl.strings.BUILD @@ -0,0 +1,26 @@ +--- third_party/absl/system.absl.strings.BUILD.orig 2022-05-22 22:28:22 UTC ++++ third_party/absl/system.absl.strings.BUILD +@@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:public"]) + + cc_library( + name = "strings", +- linkopts = ["-labsl_strings"], ++ linkopts = ["-L%%LOCALBASE%%/lib", "-labsl_strings"], + deps = [ + ":internal", + "//absl/base", +@@ -26,7 +26,13 @@ cc_library( + + cc_library( + name = "cord", +- linkopts = ["-labsl_cord"], ++ linkopts = [ ++ "-labsl_cord", ++ "-labsl_cord_internal", ++ "-labsl_cordz_functions", ++ "-labsl_cordz_handle", ++ "-labsl_cordz_info", ++ "-labsl_cordz_sample_token",], + deps = [ + ":str_format", + "//absl/container:compressed_tuple", diff --git a/science/py-tensorflow/files/patch-third__party_aws_BUILD.bazel b/science/py-tensorflow/files/patch-third__party_aws_BUILD.bazel deleted file mode 100644 index 36d342464147..000000000000 --- a/science/py-tensorflow/files/patch-third__party_aws_BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ ---- third_party/aws/BUILD.bazel.orig 2019-10-14 21:08:43 UTC -+++ third_party/aws/BUILD.bazel -@@ -30,7 +30,9 @@ cc_library( - "@org_tensorflow//tensorflow:freebsd": glob([ - "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp", - ]), -- "//conditions:default": [], -+ "//conditions:default":glob([ -+ "aws-cpp-sdk-core/source/platform/linux-shared/*.cpp", -+ ]), - }) + glob([ - "aws-cpp-sdk-core/include/**/*.h", - "aws-cpp-sdk-core/source/*.cpp", diff --git a/science/py-tensorflow/files/patch-third__party_com__google__absl.BUILD b/science/py-tensorflow/files/patch-third__party_com__google__absl.BUILD deleted file mode 100644 index 991743bb23d7..000000000000 --- a/science/py-tensorflow/files/patch-third__party_com__google__absl.BUILD +++ /dev/null @@ -1,13 +0,0 @@ ---- third_party/com_google_absl.BUILD.orig 2021-07-07 09:58:12 UTC -+++ third_party/com_google_absl.BUILD -@@ -2,4 +2,9 @@ package(default_visibility = ["//visibility:public"]) - - licenses(["notice"]) # Apache - --exports_files(["LICENSE"]) -+exports_files(["LICENSE", "absl"]) -+ -+cc_library( -+ name = "abslHeaders", -+ hdrs = glob(["*/*/*.h", "*/*/*.h"]), -+) diff --git a/science/py-tensorflow/files/patch-third__party_cpuinfo_cpuinfo.BUILD b/science/py-tensorflow/files/patch-third__party_cpuinfo_cpuinfo.BUILD new file mode 100644 index 000000000000..738e8bc2abd8 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_cpuinfo_cpuinfo.BUILD @@ -0,0 +1,51 @@ +--- third_party/cpuinfo/cpuinfo.BUILD.orig 2022-05-22 22:28:22 UTC ++++ third_party/cpuinfo/cpuinfo.BUILD +@@ -100,35 +100,7 @@ EMSCRIPTEN_SRCS = [ + cc_library( + name = "cpuinfo_impl", + srcs = select({ +- ":linux_x86_64": COMMON_SRCS + X86_SRCS + LINUX_SRCS + LINUX_X86_SRCS, +- ":linux_arm": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, +- ":linux_armhf": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, +- ":linux_armv7a": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, +- ":linux_armeabi": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS, +- ":linux_aarch64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS, +- ":linux_mips64": COMMON_SRCS + LINUX_SRCS, +- ":linux_riscv64": COMMON_SRCS + LINUX_SRCS, +- ":linux_s390x": COMMON_SRCS + LINUX_SRCS, +- ":macos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":macos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":windows_x86_64": COMMON_SRCS + X86_SRCS + WINDOWS_X86_SRCS, +- ":android_armv7": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS + ANDROID_ARM_SRCS, +- ":android_arm64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS + ANDROID_ARM_SRCS, +- ":android_x86": COMMON_SRCS + X86_SRCS + LINUX_SRCS + LINUX_X86_SRCS, +- ":android_x86_64": COMMON_SRCS + X86_SRCS + LINUX_SRCS + LINUX_X86_SRCS, +- ":ios_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":ios_x86": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":ios_armv7": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":ios_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":ios_arm64e": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":ios_sim_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":watchos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":watchos_x86": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":watchos_armv7k": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":watchos_arm64_32": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":tvos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, +- ":tvos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, +- ":emscripten_wasm": COMMON_SRCS + EMSCRIPTEN_SRCS, ++ "//conditions:default": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, + }), + copts = select({ + ":windows_x86_64": [], +@@ -187,6 +159,11 @@ cc_library( + ) + + ############################# Build configurations ############################# ++ ++config_setting( ++ name = "default", ++ values = {"cpu": "k8"}, ++) + + config_setting( + name = "linux_x86_64", diff --git a/science/py-tensorflow/files/patch-third__party_cpuinfo_workspace.bzl b/science/py-tensorflow/files/patch-third__party_cpuinfo_workspace.bzl new file mode 100644 index 000000000000..aa701dbd58a5 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_cpuinfo_workspace.bzl @@ -0,0 +1,9 @@ +--- third_party/cpuinfo/workspace.bzl.orig 2022-08-29 16:23:14 UTC ++++ third_party/cpuinfo/workspace.bzl +@@ -8,5 +8,6 @@ def repo(): + strip_prefix = "cpuinfo-5916273f79a21551890fd3d56fc5375a78d1598d", + sha256 = "2a160c527d3c58085ce260f34f9e2b161adc009b34186a2baf24e74376e89e6d", + urls = tf_mirror_urls("https://github.com/pytorch/cpuinfo/archive/5916273f79a21551890fd3d56fc5375a78d1598d.zip"), ++ patch_file = ["//third_party:fix_cpuinfo.patch"], + build_file = "//third_party/cpuinfo:cpuinfo.BUILD", + ) diff --git a/science/py-tensorflow/files/patch-third__party_flatbuffers_BUILD.system b/science/py-tensorflow/files/patch-third__party_flatbuffers_BUILD.system deleted file mode 100644 index 65f87cc52cb5..000000000000 --- a/science/py-tensorflow/files/patch-third__party_flatbuffers_BUILD.system +++ /dev/null @@ -1,18 +0,0 @@ ---- third_party/flatbuffers/BUILD.system.orig 2021-01-04 20:18:42 UTC -+++ third_party/flatbuffers/BUILD.system -@@ -9,6 +9,7 @@ filegroup( - cc_library( - name = "flatbuffers", - linkopts = ["-lflatbuffers"], -+ copts = ["-I%%LOCALBASE%%/include"], - visibility = ["//visibility:public"], - ) - -@@ -16,6 +17,7 @@ cc_library( - cc_library( - name = "flatc_library", - linkopts = ["-lflatbuffers"], -+ copts = ["-I%%LOCALBASE%%/include"], - visibility = ["//visibility:public"], - ) - diff --git a/science/py-tensorflow/files/patch-third__party_llvm_macos__build__fix.patch b/science/py-tensorflow/files/patch-third__party_llvm_macos__build__fix.patch new file mode 100644 index 000000000000..772ba624a877 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_llvm_macos__build__fix.patch @@ -0,0 +1,11 @@ +--- third_party/llvm/macos_build_fix.patch.orig 2022-09-06 16:15:49 UTC ++++ third_party/llvm/macos_build_fix.patch +@@ -38,7 +38,7 @@ index ff64df694048..c9c35b01711c 100644 + - "@bazel_tools//src/conditions:darwin_arm64": native_arch_defines("AArch64", "arm64-apple-darwin"), + - "@bazel_tools//src/conditions:darwin_x86_64": native_arch_defines("X86", "x86_64-unknown-darwin"), + + "//llvm:macos_arm64": native_arch_defines("AArch64", "arm64-apple-darwin"), +-+ "@bazel_tools//src/conditions:darwin": native_arch_defines("X86", "x86_64-unknown-darwin"), +++ "@bazel_tools//src/conditions:freebsd": native_arch_defines("X86", "x86_64-unknown-freebsd13.0"), + "@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"), + "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"), + }) + [ diff --git a/science/py-tensorflow/files/patch-third__party_llvm_workspace.bzl b/science/py-tensorflow/files/patch-third__party_llvm_workspace.bzl new file mode 100644 index 000000000000..e43914b13105 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_llvm_workspace.bzl @@ -0,0 +1,10 @@ +--- third_party/llvm/workspace.bzl.orig 2022-05-22 22:28:22 UTC ++++ third_party/llvm/workspace.bzl +@@ -16,6 +16,6 @@ def repo(name): + "https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT), + ], + build_file = "//third_party/llvm:llvm.BUILD", +- patch_file = ["//third_party/llvm:macos_build_fix.patch"], ++ patch_file = ["//third_party/llvm:macos_build_fix.patch", "//third_party:freebsd_python_fix.patch", "//third_party:fix-environ.patch"], + link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"}, + ) diff --git a/science/py-tensorflow/files/patch-third__party_mlir_BUILD b/science/py-tensorflow/files/patch-third__party_mlir_BUILD deleted file mode 100644 index fd3c96bbf451..000000000000 --- a/science/py-tensorflow/files/patch-third__party_mlir_BUILD +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/mlir/BUILD.orig 2021-07-07 08:13:58 UTC -+++ third_party/mlir/BUILD -@@ -1560,6 +1560,7 @@ cc_binary( - linkopts = [ - "-lm", - "-lpthread", -+ "-lexecinfo", - ], - deps = [ - ":Support", diff --git a/science/py-tensorflow/files/patch-third__party_py_BUILD.tpl b/science/py-tensorflow/files/patch-third__party_py_BUILD.tpl new file mode 100644 index 000000000000..664828c179f7 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_py_BUILD.tpl @@ -0,0 +1,17 @@ +--- third_party/py/BUILD.tpl.orig 2022-09-07 10:53:01 UTC ++++ third_party/py/BUILD.tpl +@@ -9,12 +9,14 @@ load("@bazel_tools//tools/python:toolchain.bzl", "py_r + py_runtime( + name = "py2_runtime", + interpreter_path = "%{PYTHON_BIN_PATH}", ++ stub_shebang = "#!%{PYTHON_BIN_PATH}", + python_version = "PY2", + ) + + py_runtime( + name = "py3_runtime", + interpreter_path = "%{PYTHON_BIN_PATH}", ++ stub_shebang = "#!%{PYTHON_BIN_PATH}", + python_version = "PY3", + ) + diff --git a/science/py-tensorflow/files/patch-third__party_remote__config_remote__platform__configure.bzl b/science/py-tensorflow/files/patch-third__party_remote__config_remote__platform__configure.bzl new file mode 100644 index 000000000000..78ed4f5a6061 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_remote__config_remote__platform__configure.bzl @@ -0,0 +1,19 @@ +--- third_party/remote_config/remote_platform_configure.bzl.orig 2022-08-28 06:50:48 UTC ++++ third_party/remote_config/remote_platform_configure.bzl +@@ -8,6 +8,8 @@ def _remote_platform_configure_impl(repository_ctx): + platform = "windows" + elif os.startswith("mac os"): + platform = "osx" ++ elif os.startswith("freebsd"): ++ platform = "freebsd" + else: + platform = "linux" + +@@ -50,6 +52,6 @@ remote_platform_configure = repository_rule( + implementation = _remote_platform_configure_impl, + attrs = { + "platform_exec_properties": attr.string_dict(mandatory = True), +- "platform": attr.string(default = "linux", values = ["linux", "windows", "local"]), ++ "platform": attr.string(default = "linux", values = ["linux", "windows", "freebsd", "local"]), + }, + ) diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_functools32.BUILD b/science/py-tensorflow/files/patch-third__party_systemlibs_functools32.BUILD deleted file mode 100644 index 087c0a4bc92a..000000000000 --- a/science/py-tensorflow/files/patch-third__party_systemlibs_functools32.BUILD +++ /dev/null @@ -1,18 +0,0 @@ ---- third_party/systemlibs/functools32.BUILD.orig 2021-07-08 13:17:43 UTC -+++ third_party/systemlibs/functools32.BUILD -@@ -0,0 +1,15 @@ -+# Description: -+# functools32 provides a backport of the functools module for Python 2. -+ -+licenses(["notice"]) # Python 2.0 -+ -+package(default_visibility = ["//visibility:public"]) -+ -+filegroup( -+ name = "LICENSE", -+) -+ -+py_library( -+ name = "functools32", -+ srcs_version = "PY2AND3", -+) diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_grpc.BUILD b/science/py-tensorflow/files/patch-third__party_systemlibs_grpc.BUILD deleted file mode 100644 index 18f1b0aeeaa9..000000000000 --- a/science/py-tensorflow/files/patch-third__party_systemlibs_grpc.BUILD +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/systemlibs/grpc.BUILD.orig 2019-10-14 21:08:43 UTC -+++ third_party/systemlibs/grpc.BUILD -@@ -7,7 +7,7 @@ filegroup( - - cc_library( - name = "grpc", -- linkopts = ["-lgrpc"], -+ linkopts = ["-lgrpc", "-lgpr"], - visibility = ["//visibility:public"], - ) - diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_jsoncpp.BUILD b/science/py-tensorflow/files/patch-third__party_systemlibs_jsoncpp.BUILD deleted file mode 100644 index 2c2abe8c9d87..000000000000 --- a/science/py-tensorflow/files/patch-third__party_systemlibs_jsoncpp.BUILD +++ /dev/null @@ -1,21 +0,0 @@ ---- third_party/systemlibs/jsoncpp.BUILD.orig 2019-10-14 21:08:43 UTC -+++ third_party/systemlibs/jsoncpp.BUILD -@@ -8,9 +8,7 @@ filegroup( - HEADERS = [ - "include/json/allocator.h", - "include/json/assertions.h", -- "include/json/autolink.h", - "include/json/config.h", -- "include/json/features.h", - "include/json/forwards.h", - "include/json/json.h", - "include/json/reader.h", -@@ -25,7 +23,7 @@ genrule( - cmd = """ - for i in $(OUTS); do - i=$${i##*/} -- ln -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i -+ ln -sf $(INCLUDEDIR)/json/$$i $(@D)/include/json/$$i - done - """, - ) diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.BUILD b/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.BUILD new file mode 100644 index 000000000000..212f48248ef9 --- /dev/null +++ b/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.BUILD @@ -0,0 +1,25 @@ +--- third_party/systemlibs/protobuf.BUILD.orig 2022-09-01 05:13:59 UTC ++++ third_party/systemlibs/protobuf.BUILD +@@ -61,19 +61,19 @@ genrule( + + cc_library( + name = "protobuf", +- linkopts = ["-lprotobuf"], ++ linkopts = ["-L%%LOCALBASE%%/lib", "-lprotobuf"], + visibility = ["//visibility:public"], + ) + + cc_library( + name = "protobuf_headers", +- linkopts = ["-lprotobuf"], ++ linkopts = ["-L%%LOCALBASE%%/lib", "-lprotobuf"], + visibility = ["//visibility:public"], + ) + + cc_library( + name = "protoc_lib", +- linkopts = ["-lprotoc"], ++ linkopts = ["-L%%LOCALBASE%%/lib", "-lprotoc"], + visibility = ["//visibility:public"], + ) + diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.bzl b/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.bzl deleted file mode 100644 index bfc39a68a605..000000000000 --- a/science/py-tensorflow/files/patch-third__party_systemlibs_protobuf.bzl +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/systemlibs/protobuf.bzl.orig 2021-01-04 20:18:42 UTC -+++ third_party/systemlibs/protobuf.bzl -@@ -76,7 +76,7 @@ def _proto_gen_impl(ctx): - source_dir = _SourceDir(ctx) - gen_dir = _GenDir(ctx) - if source_dir: -- import_flags = ["-I" + source_dir, "-I" + gen_dir] -+ import_flags = ["-I%%LOCALBASE%%/include", "-I" + source_dir, "-I" + gen_dir] - else: - import_flags = ["-I."] - diff --git a/science/py-tensorflow/files/patch-third__party_systemlibs_syslibs__configure.bzl b/science/py-tensorflow/files/patch-third__party_systemlibs_syslibs__configure.bzl deleted file mode 100644 index 9bf43b80d6ac..000000000000 --- a/science/py-tensorflow/files/patch-third__party_systemlibs_syslibs__configure.bzl +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/systemlibs/syslibs_configure.bzl.orig 2021-07-08 11:07:25 UTC -+++ third_party/systemlibs/syslibs_configure.bzl -@@ -22,6 +22,7 @@ VALID_LIBS = [ - "double_conversion", - "enum34_archive", - "flatbuffers", -+ "functools32_archive", - "gast_archive", - "gif_archive", - "grpc", diff --git a/science/py-tensorflow/files/tensorflow.pc b/science/py-tensorflow/files/tensorflow.pc new file mode 100644 index 000000000000..bad6259a848b --- /dev/null +++ b/science/py-tensorflow/files/tensorflow.pc @@ -0,0 +1,11 @@ +prefix=%%LOCALBASE%% +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib +includedir=\${prefix}/include/tensorflow + +Name: TensorFlow +Version: %%VERSION%% +Description: Library for computation using data flow graphs for scalable machine learning +Requires: +Libs: -L\${libdir} -ltensorflow -ltensorflow_framework +Cflags: -I\${includedir} diff --git a/science/py-tensorflow/files/tensorflow_cc.pc b/science/py-tensorflow/files/tensorflow_cc.pc new file mode 100644 index 000000000000..a37142e182e0 --- /dev/null +++ b/science/py-tensorflow/files/tensorflow_cc.pc @@ -0,0 +1,11 @@ +prefix=%%LOCALBASE%% +exec_prefix=\${prefix} +libdir=\${exec_prefix}/${LIBDIR} +includedir=\${prefix}/include/tensorflow + +Name: TensorFlow +Version: %%VERSION%% +Description: Library for computation using data flow graphs for scalable machine learning +Requires: +Libs: -L\${libdir} -ltensorflow_cc -ltensorflow_framework +Cflags: -I\${includedir} diff --git a/science/py-tensorflow/pkg-plist b/science/py-tensorflow/pkg-plist new file mode 100644 index 000000000000..a7dbf5fad401 --- /dev/null +++ b/science/py-tensorflow/pkg-plist @@ -0,0 +1,908 @@ +include/tensorflow/c/c_api.h +include/tensorflow/c/c_api_experimental.h +include/tensorflow/c/c_api_macros.h +include/tensorflow/c/c_api_macros_internal.h +include/tensorflow/c/eager/c_api.h +include/tensorflow/c/eager/c_api_experimental.h +include/tensorflow/c/eager/dlpack.h +include/tensorflow/c/ops.h +include/tensorflow/c/tensor_interface.h +include/tensorflow/c/tf_attrtype.h +include/tensorflow/c/tf_datatype.h +include/tensorflow/c/tf_file_statistics.h +include/tensorflow/c/tf_status.h +include/tensorflow/c/tf_status_helper.h +include/tensorflow/c/tf_status_internal.h +include/tensorflow/c/tf_tensor.h +include/tensorflow/c/tf_tensor_internal.h +include/tensorflow/c/tf_tstring.h +include/tensorflow/cc/client/client_session.h +include/tensorflow/cc/framework/grad_op_registry.h +include/tensorflow/cc/framework/gradient_checker.h +include/tensorflow/cc/framework/gradients.h +include/tensorflow/cc/framework/ops.h +include/tensorflow/cc/framework/scope.h +include/tensorflow/cc/framework/scope_internal.h +include/tensorflow/cc/framework/while_gradients.h +include/tensorflow/cc/ops/array_ops.h +include/tensorflow/cc/ops/array_ops_internal.h +include/tensorflow/cc/ops/audio_ops.h +include/tensorflow/cc/ops/audio_ops_internal.h +include/tensorflow/cc/ops/candidate_sampling_ops.h +include/tensorflow/cc/ops/candidate_sampling_ops_internal.h +include/tensorflow/cc/ops/const_op.h +include/tensorflow/cc/ops/control_flow_ops.h +include/tensorflow/cc/ops/control_flow_ops_internal.h +include/tensorflow/cc/ops/data_flow_ops.h +include/tensorflow/cc/ops/data_flow_ops_internal.h +include/tensorflow/cc/ops/dataset_ops.h +include/tensorflow/cc/ops/dataset_ops_internal.h +include/tensorflow/cc/ops/experimental_dataset_ops.h +include/tensorflow/cc/ops/experimental_dataset_ops_internal.h +include/tensorflow/cc/ops/image_ops.h +include/tensorflow/cc/ops/image_ops_internal.h +include/tensorflow/cc/ops/io_ops.h +include/tensorflow/cc/ops/io_ops_internal.h +include/tensorflow/cc/ops/linalg_ops.h +include/tensorflow/cc/ops/linalg_ops_internal.h +include/tensorflow/cc/ops/list_ops.h +include/tensorflow/cc/ops/list_ops_internal.h +include/tensorflow/cc/ops/logging_ops.h +include/tensorflow/cc/ops/logging_ops_internal.h +include/tensorflow/cc/ops/lookup_ops.h +include/tensorflow/cc/ops/lookup_ops_internal.h +include/tensorflow/cc/ops/manip_ops.h +include/tensorflow/cc/ops/manip_ops_internal.h +include/tensorflow/cc/ops/map_ops.h +include/tensorflow/cc/ops/map_ops_internal.h +include/tensorflow/cc/ops/math_ops.h +include/tensorflow/cc/ops/math_ops_internal.h +include/tensorflow/cc/ops/nn_ops.h +include/tensorflow/cc/ops/nn_ops_internal.h +include/tensorflow/cc/ops/no_op.h +include/tensorflow/cc/ops/no_op_internal.h +include/tensorflow/cc/ops/parsing_ops.h +include/tensorflow/cc/ops/parsing_ops_internal.h +include/tensorflow/cc/ops/random_ops.h +include/tensorflow/cc/ops/random_ops_internal.h +include/tensorflow/cc/ops/resource_variable_ops.h +include/tensorflow/cc/ops/sparse_ops.h +include/tensorflow/cc/ops/sparse_ops_internal.h +include/tensorflow/cc/ops/standard_ops.h +include/tensorflow/cc/ops/state_ops.h +include/tensorflow/cc/ops/state_ops_internal.h +include/tensorflow/cc/ops/string_ops.h +include/tensorflow/cc/ops/string_ops_internal.h +include/tensorflow/cc/ops/training_ops.h +include/tensorflow/cc/ops/training_ops_internal.h +include/tensorflow/cc/ops/user_ops.h +include/tensorflow/cc/ops/user_ops_internal.h +include/tensorflow/cc/ops/while_loop.h +include/tensorflow/cc/saved_model/constants.h +include/tensorflow/cc/saved_model/loader.h +include/tensorflow/cc/saved_model/metrics.h +include/tensorflow/cc/saved_model/reader.h +include/tensorflow/cc/saved_model/signature_constants.h +include/tensorflow/cc/saved_model/tag_constants.h +include/tensorflow/cc/saved_model/util.h +include/tensorflow/cc/tools/freeze_saved_model.h +include/tensorflow/cc/training/coordinator.h +include/tensorflow/cc/training/queue_runner.h +include/tensorflow/compiler/jit/defs.h +include/tensorflow/compiler/mlir/tensorflow/utils/error_util.h +include/tensorflow/compiler/xla/array.h +include/tensorflow/compiler/xla/array2d.h +include/tensorflow/compiler/xla/array3d.h +include/tensorflow/compiler/xla/array4d.h +include/tensorflow/compiler/xla/comparison_util.h +include/tensorflow/compiler/xla/debug_options_flags.h +include/tensorflow/compiler/xla/debug_options_parsers.h +include/tensorflow/compiler/xla/index_util.h +include/tensorflow/compiler/xla/iterator_util.h +include/tensorflow/compiler/xla/layout.h +include/tensorflow/compiler/xla/layout_util.h +include/tensorflow/compiler/xla/literal.h +include/tensorflow/compiler/xla/literal_util.h +include/tensorflow/compiler/xla/map_util.h +include/tensorflow/compiler/xla/overflow_util.h +include/tensorflow/compiler/xla/parse_flags_from_env.h +include/tensorflow/compiler/xla/permutation_util.h +include/tensorflow/compiler/xla/primitive_util.h +include/tensorflow/compiler/xla/protobuf_util.h +include/tensorflow/compiler/xla/service/computation_layout.h +include/tensorflow/compiler/xla/service/computation_placer.h +include/tensorflow/compiler/xla/service/dfs_hlo_visitor.h +include/tensorflow/compiler/xla/service/dfs_hlo_visitor_with_default.h +include/tensorflow/compiler/xla/service/dynamic_parameter_binding.h +include/tensorflow/compiler/xla/service/global_device_id.h +include/tensorflow/compiler/xla/service/hlo.pb.h +include/tensorflow/compiler/xla/service/hlo_casting_utils.h +include/tensorflow/compiler/xla/service/hlo_clone_context.h +include/tensorflow/compiler/xla/service/hlo_computation.h +include/tensorflow/compiler/xla/service/hlo_domain_metadata.h +include/tensorflow/compiler/xla/service/hlo_input_output_alias_config.h +include/tensorflow/compiler/xla/service/hlo_instruction.h +include/tensorflow/compiler/xla/service/hlo_instructions.h +include/tensorflow/compiler/xla/service/hlo_module.h +include/tensorflow/compiler/xla/service/hlo_module_config.h +include/tensorflow/compiler/xla/service/hlo_module_metadata.h +include/tensorflow/compiler/xla/service/hlo_op_metadata.h +include/tensorflow/compiler/xla/service/hlo_opcode.h +include/tensorflow/compiler/xla/service/hlo_schedule.h +include/tensorflow/compiler/xla/service/hlo_sharding.h +include/tensorflow/compiler/xla/service/hlo_sharding_metadata.h +include/tensorflow/compiler/xla/service/name_uniquer.h +include/tensorflow/compiler/xla/shape.h +include/tensorflow/compiler/xla/shape_layout.h +include/tensorflow/compiler/xla/shape_tree.h +include/tensorflow/compiler/xla/shape_util.h +include/tensorflow/compiler/xla/status.h +include/tensorflow/compiler/xla/status_macros.h +include/tensorflow/compiler/xla/statusor.h +include/tensorflow/compiler/xla/types.h +include/tensorflow/compiler/xla/util.h +include/tensorflow/compiler/xla/window_util.h +include/tensorflow/compiler/xla/xla.pb.h +include/tensorflow/compiler/xla/xla_data.pb.h +include/tensorflow/core/common_runtime/all_to_all.h +include/tensorflow/core/common_runtime/allocator_retry.h +include/tensorflow/core/common_runtime/base_collective_executor.h +include/tensorflow/core/common_runtime/bfc_allocator.h +include/tensorflow/core/common_runtime/buf_rendezvous.h +include/tensorflow/core/common_runtime/build_graph_options.h +include/tensorflow/core/common_runtime/collective_executor_mgr.h +include/tensorflow/core/common_runtime/collective_param_resolver_local.h +include/tensorflow/core/common_runtime/collective_rma_local.h +include/tensorflow/core/common_runtime/collective_util.h +include/tensorflow/core/common_runtime/colocation_graph.h +include/tensorflow/core/common_runtime/composite_device.h +include/tensorflow/core/common_runtime/constant_folding.h +include/tensorflow/core/common_runtime/control_flow_deps_to_chains.h +include/tensorflow/core/common_runtime/copy_tensor.h +include/tensorflow/core/common_runtime/costmodel_manager.h +include/tensorflow/core/common_runtime/debugger_state_interface.h +include/tensorflow/core/common_runtime/device.h +include/tensorflow/core/common_runtime/device/device_event_mgr.h +include/tensorflow/core/common_runtime/device/device_host_allocator.h +include/tensorflow/core/common_runtime/device/device_id.h +include/tensorflow/core/common_runtime/device/device_id_manager.h +include/tensorflow/core/common_runtime/device/device_id_utils.h +include/tensorflow/core/common_runtime/device/device_mem_allocator.h +include/tensorflow/core/common_runtime/device_factory.h +include/tensorflow/core/common_runtime/device_mgr.h +include/tensorflow/core/common_runtime/device_resolver_local.h +include/tensorflow/core/common_runtime/device_set.h +include/tensorflow/core/common_runtime/dma_helper.h +include/tensorflow/core/common_runtime/eval_const_tensor.h +include/tensorflow/core/common_runtime/executor.h +include/tensorflow/core/common_runtime/executor_factory.h +include/tensorflow/core/common_runtime/function.h +include/tensorflow/core/common_runtime/function_body.h +include/tensorflow/core/common_runtime/function_def_utils.h +include/tensorflow/core/common_runtime/function_optimization_registry.h +include/tensorflow/core/common_runtime/function_utils.h +include/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h +include/tensorflow/core/common_runtime/gpu/gpu_cudamalloc_allocator.h +include/tensorflow/core/common_runtime/gpu/gpu_cudamallocasync_allocator.h +include/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h +include/tensorflow/core/common_runtime/gpu/gpu_device.h +include/tensorflow/core/common_runtime/gpu/gpu_id.h +include/tensorflow/core/common_runtime/gpu/gpu_id_manager.h +include/tensorflow/core/common_runtime/gpu/gpu_init.h +include/tensorflow/core/common_runtime/gpu/gpu_managed_allocator.h +include/tensorflow/core/common_runtime/gpu/gpu_process_state.h +include/tensorflow/core/common_runtime/gpu/gpu_util.h +include/tensorflow/core/common_runtime/gpu/gpu_virtual_mem_allocator.h +include/tensorflow/core/common_runtime/gpu_device_context.h +include/tensorflow/core/common_runtime/gradients.h +include/tensorflow/core/common_runtime/graph_constructor.h +include/tensorflow/core/common_runtime/graph_def_builder_util.h +include/tensorflow/core/common_runtime/graph_execution_state.h +include/tensorflow/core/common_runtime/graph_optimizer.h +include/tensorflow/core/common_runtime/graph_runner.h +include/tensorflow/core/common_runtime/hierarchical_tree_broadcaster.h +include/tensorflow/core/common_runtime/inline_function_utils.h +include/tensorflow/core/common_runtime/input_colocation_exemption_registry.h +include/tensorflow/core/common_runtime/inspecting_placer.h +include/tensorflow/core/common_runtime/isolate_placer_inspection_required_ops_pass.h +include/tensorflow/core/common_runtime/local_device.h +include/tensorflow/core/common_runtime/local_executor_params.h +include/tensorflow/core/common_runtime/lower_case_op.h +include/tensorflow/core/common_runtime/lower_function_call_inline_policy.h +include/tensorflow/core/common_runtime/lower_function_call_op.h +include/tensorflow/core/common_runtime/lower_functional_ops.h +include/tensorflow/core/common_runtime/lower_if_op.h +include/tensorflow/core/common_runtime/lower_while_op.h +include/tensorflow/core/common_runtime/memory_types.h +include/tensorflow/core/common_runtime/mkl_cpu_allocator.h +include/tensorflow/core/common_runtime/mkl_layout_pass.h +include/tensorflow/core/common_runtime/mkl_tfconversion_pass.h +include/tensorflow/core/common_runtime/node_file_writer.h +include/tensorflow/core/common_runtime/optimization_registry.h +include/tensorflow/core/common_runtime/partitioning_utils.h +include/tensorflow/core/common_runtime/permuter.h +include/tensorflow/core/common_runtime/placer.h +include/tensorflow/core/common_runtime/placer_inspection_required_ops_utils.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_bfc_allocator.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_context.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_init.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_process_state.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_simple_allocator.h +include/tensorflow/core/common_runtime/pluggable_device/pluggable_device_util.h +include/tensorflow/core/common_runtime/pool_allocator.h +include/tensorflow/core/common_runtime/process_function_library_runtime.h +include/tensorflow/core/common_runtime/process_state.h +include/tensorflow/core/common_runtime/process_util.h +include/tensorflow/core/common_runtime/profile_handler.h +include/tensorflow/core/common_runtime/quantize_training.h +include/tensorflow/core/common_runtime/renamed_device.h +include/tensorflow/core/common_runtime/rendezvous_mgr.h +include/tensorflow/core/common_runtime/rendezvous_util.h +include/tensorflow/core/common_runtime/replicate_per_replica_nodes.h +include/tensorflow/core/common_runtime/ring_alg.h +include/tensorflow/core/common_runtime/ring_gatherer.h +include/tensorflow/core/common_runtime/ring_reducer.h +include/tensorflow/core/common_runtime/scoped_allocator.h +include/tensorflow/core/common_runtime/scoped_allocator_mgr.h +include/tensorflow/core/common_runtime/session_factory.h +include/tensorflow/core/common_runtime/shape_refiner.h +include/tensorflow/core/common_runtime/shared_counter.h +include/tensorflow/core/common_runtime/single_threaded_cpu_device.h +include/tensorflow/core/common_runtime/stats_publisher_interface.h +include/tensorflow/core/common_runtime/step_stats_collector.h +include/tensorflow/core/common_runtime/threadpool_device.h +include/tensorflow/core/example/example.pb.h +include/tensorflow/core/example/example_parser_configuration.pb.h +include/tensorflow/core/example/feature.pb.h +include/tensorflow/core/example/feature_util.h +include/tensorflow/core/framework/allocation_description.pb.h +include/tensorflow/core/framework/allocator.h +include/tensorflow/core/framework/allocator_registry.h +include/tensorflow/core/framework/api_def.pb.h +include/tensorflow/core/framework/attr_value.pb.h +include/tensorflow/core/framework/attr_value_util.h +include/tensorflow/core/framework/bfloat16.h +include/tensorflow/core/framework/bounds_check.h +include/tensorflow/core/framework/cancellation.h +include/tensorflow/core/framework/collective.h +include/tensorflow/core/framework/common_shape_fns.h +include/tensorflow/core/framework/control_flow.h +include/tensorflow/core/framework/cost_graph.pb.h +include/tensorflow/core/framework/dataset.h +include/tensorflow/core/framework/dataset_metadata.pb.h +include/tensorflow/core/framework/dataset_options.pb.h +include/tensorflow/core/framework/dataset_stateful_op_allowlist.h +include/tensorflow/core/framework/device.h +include/tensorflow/core/framework/device_attributes.pb.h +include/tensorflow/core/framework/device_base.h +include/tensorflow/core/framework/device_factory.h +include/tensorflow/core/framework/full_type.pb.h +include/tensorflow/core/framework/full_type_inference_util.h +include/tensorflow/core/framework/full_type_util.h +include/tensorflow/core/framework/function.h +include/tensorflow/core/framework/function.pb.h +include/tensorflow/core/framework/function_handle_cache.h +include/tensorflow/core/framework/graph.pb.h +include/tensorflow/core/framework/graph_def_util.h +include/tensorflow/core/framework/graph_to_functiondef.h +include/tensorflow/core/framework/graph_transfer_info.pb.h +include/tensorflow/core/framework/kernel_def.pb.h +include/tensorflow/core/framework/kernel_def_builder.h +include/tensorflow/core/framework/kernel_def_util.h +include/tensorflow/core/framework/kernel_shape_util.h +include/tensorflow/core/framework/local_rendezvous.h +include/tensorflow/core/framework/log_memory.h +include/tensorflow/core/framework/log_memory.pb.h +include/tensorflow/core/framework/logging.h +include/tensorflow/core/framework/lookup_interface.h +include/tensorflow/core/framework/memory_types.h +include/tensorflow/core/framework/metrics.h +include/tensorflow/core/framework/model.h +include/tensorflow/core/framework/model.pb.h +include/tensorflow/core/framework/node_def.pb.h +include/tensorflow/core/framework/node_def_builder.h +include/tensorflow/core/framework/node_def_util.h +include/tensorflow/core/framework/node_properties.h +include/tensorflow/core/framework/numeric_op.h +include/tensorflow/core/framework/numeric_types.h +include/tensorflow/core/framework/op.h +include/tensorflow/core/framework/op_def.pb.h +include/tensorflow/core/framework/op_def_builder.h +include/tensorflow/core/framework/op_def_util.h +include/tensorflow/core/framework/op_kernel.h +include/tensorflow/core/framework/op_requires.h +include/tensorflow/core/framework/op_segment.h +include/tensorflow/core/framework/ops_util.h +include/tensorflow/core/framework/partial_tensor_shape.h +include/tensorflow/core/framework/queue_interface.h +include/tensorflow/core/framework/reader_base.h +include/tensorflow/core/framework/reader_base.pb.h +include/tensorflow/core/framework/reader_interface.h +include/tensorflow/core/framework/reader_op_kernel.h +include/tensorflow/core/framework/register_types.h +include/tensorflow/core/framework/register_types_traits.h +include/tensorflow/core/framework/registration/options.h +include/tensorflow/core/framework/registration/registration.h +include/tensorflow/core/framework/rendezvous.h +include/tensorflow/core/framework/resource_base.h +include/tensorflow/core/framework/resource_handle.h +include/tensorflow/core/framework/resource_handle.pb.h +include/tensorflow/core/framework/resource_mgr.h +include/tensorflow/core/framework/resource_op_kernel.h +include/tensorflow/core/framework/resource_var.h +include/tensorflow/core/framework/rng_alg.h +include/tensorflow/core/framework/run_handler.h +include/tensorflow/core/framework/run_handler_util.h +include/tensorflow/core/framework/session_state.h +include/tensorflow/core/framework/shape_inference.h +include/tensorflow/core/framework/shared_ptr_variant.h +include/tensorflow/core/framework/stats_aggregator.h +include/tensorflow/core/framework/step_stats.pb.h +include/tensorflow/core/framework/summary.pb.h +include/tensorflow/core/framework/tensor.h +include/tensorflow/core/framework/tensor.pb.h +include/tensorflow/core/framework/tensor_description.pb.h +include/tensorflow/core/framework/tensor_key.h +include/tensorflow/core/framework/tensor_reference.h +include/tensorflow/core/framework/tensor_shape.h +include/tensorflow/core/framework/tensor_shape.pb.h +include/tensorflow/core/framework/tensor_slice.h +include/tensorflow/core/framework/tensor_slice.pb.h +include/tensorflow/core/framework/tensor_types.h +include/tensorflow/core/framework/tensor_util.h +include/tensorflow/core/framework/thread_factory.h +include/tensorflow/core/framework/tracking_allocator.h +include/tensorflow/core/framework/type_index.h +include/tensorflow/core/framework/type_traits.h +include/tensorflow/core/framework/typed_allocator.h +include/tensorflow/core/framework/types.h +include/tensorflow/core/framework/types.pb.h +include/tensorflow/core/framework/variable.pb.h +include/tensorflow/core/framework/variant.h +include/tensorflow/core/framework/variant_encode_decode.h +include/tensorflow/core/framework/variant_op_registry.h +include/tensorflow/core/framework/variant_tensor_data.h +include/tensorflow/core/framework/versions.h +include/tensorflow/core/framework/versions.pb.h +include/tensorflow/core/graph/algorithm.h +include/tensorflow/core/graph/collective_order.h +include/tensorflow/core/graph/colors.h +include/tensorflow/core/graph/control_flow.h +include/tensorflow/core/graph/costmodel.h +include/tensorflow/core/graph/default_device.h +include/tensorflow/core/graph/edgeset.h +include/tensorflow/core/graph/graph.h +include/tensorflow/core/graph/graph_def_builder.h +include/tensorflow/core/graph/graph_node_util.h +include/tensorflow/core/graph/graph_partition.h +include/tensorflow/core/graph/mkl_graph_util.h +include/tensorflow/core/graph/node_builder.h +include/tensorflow/core/graph/optimizer_cse.h +include/tensorflow/core/graph/subgraph.h +include/tensorflow/core/graph/tensor_id.h +include/tensorflow/core/graph/testlib.h +include/tensorflow/core/graph/types.h +include/tensorflow/core/graph/validate.h +include/tensorflow/core/graph/while_context.h +include/tensorflow/core/grappler/clusters/cluster.h +include/tensorflow/core/grappler/clusters/utils.h +include/tensorflow/core/grappler/clusters/virtual_cluster.h +include/tensorflow/core/grappler/costs/analytical_cost_estimator.h +include/tensorflow/core/grappler/costs/cost_estimator.h +include/tensorflow/core/grappler/costs/graph_memory.h +include/tensorflow/core/grappler/costs/graph_properties.h +include/tensorflow/core/grappler/costs/op_context.h +include/tensorflow/core/grappler/costs/op_level_cost_estimator.h +include/tensorflow/core/grappler/costs/op_performance_data.pb.h +include/tensorflow/core/grappler/costs/utils.h +include/tensorflow/core/grappler/costs/virtual_placer.h +include/tensorflow/core/grappler/costs/virtual_scheduler.h +include/tensorflow/core/grappler/devices.h +include/tensorflow/core/grappler/graph_topology_view.h +include/tensorflow/core/grappler/graph_view.h +include/tensorflow/core/grappler/grappler_item.h +include/tensorflow/core/grappler/mutable_graph_view.h +include/tensorflow/core/grappler/op_types.h +include/tensorflow/core/grappler/optimizers/arithmetic_optimizer.h +include/tensorflow/core/grappler/optimizers/auto_mixed_precision.h +include/tensorflow/core/grappler/optimizers/auto_mixed_precision_lists.h +include/tensorflow/core/grappler/optimizers/auto_parallel.h +include/tensorflow/core/grappler/optimizers/common_subgraph_elimination.h +include/tensorflow/core/grappler/optimizers/constant_folding.h +include/tensorflow/core/grappler/optimizers/custom_graph_optimizer.h +include/tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.h +include/tensorflow/core/grappler/optimizers/debug_stripper.h +include/tensorflow/core/grappler/optimizers/dependency_optimizer.h +include/tensorflow/core/grappler/optimizers/evaluation_utils.h +include/tensorflow/core/grappler/optimizers/function_api_info.h +include/tensorflow/core/grappler/optimizers/function_optimizer.h +include/tensorflow/core/grappler/optimizers/generic_layout_optimizer.h +include/tensorflow/core/grappler/optimizers/generic_layout_optimizer_transposer.h +include/tensorflow/core/grappler/optimizers/generic_layout_optimizer_transposer_factory.h +include/tensorflow/core/grappler/optimizers/graph_optimizer.h +include/tensorflow/core/grappler/optimizers/graph_optimizer_stage.h +include/tensorflow/core/grappler/optimizers/implementation_selector.h +include/tensorflow/core/grappler/optimizers/loop_optimizer.h +include/tensorflow/core/grappler/optimizers/memory_optimizer.h +include/tensorflow/core/grappler/optimizers/meta_optimizer.h +include/tensorflow/core/grappler/optimizers/model_pruner.h +include/tensorflow/core/grappler/optimizers/pin_to_host_optimizer.h +include/tensorflow/core/grappler/optimizers/remapper.h +include/tensorflow/core/grappler/optimizers/scoped_allocator_optimizer.h +include/tensorflow/core/grappler/optimizers/shape_optimizer.h +include/tensorflow/core/grappler/optimizers/static_schedule.h +include/tensorflow/core/grappler/optimizers/tfg_optimizer_hook.h +include/tensorflow/core/grappler/utils.h +include/tensorflow/core/grappler/utils/canonicalizer.h +include/tensorflow/core/grappler/utils/colocation.h +include/tensorflow/core/grappler/utils/frame.h +include/tensorflow/core/grappler/utils/functions.h +include/tensorflow/core/grappler/utils/graph_view.h +include/tensorflow/core/grappler/utils/graph_view_internal.h +include/tensorflow/core/grappler/utils/pattern_utils.h +include/tensorflow/core/grappler/utils/symbolic_shapes.h +include/tensorflow/core/grappler/utils/topological_sort.h +include/tensorflow/core/grappler/utils/tpu.h +include/tensorflow/core/grappler/utils/transitive_fanin.h +include/tensorflow/core/grappler/utils/traversal.h +include/tensorflow/core/grappler/verifiers/graph_verifier.h +include/tensorflow/core/grappler/verifiers/structure_verifier.h +include/tensorflow/core/ir/attributes.cc.inc +include/tensorflow/core/ir/attributes.h.inc +include/tensorflow/core/ir/dialect.cc.inc +include/tensorflow/core/ir/dialect.h +include/tensorflow/core/ir/dialect.h.inc +include/tensorflow/core/ir/importexport/convert_attributes.h +include/tensorflow/core/ir/importexport/convert_tensor.h +include/tensorflow/core/ir/importexport/convert_types.h +include/tensorflow/core/ir/importexport/export.h +include/tensorflow/core/ir/importexport/functiondef_export.h +include/tensorflow/core/ir/importexport/functiondef_import.h +include/tensorflow/core/ir/importexport/import.h +include/tensorflow/core/ir/importexport/mangling.h +include/tensorflow/core/ir/importexport/parse_text_proto.h +include/tensorflow/core/ir/interfaces.cc.inc +include/tensorflow/core/ir/interfaces.h +include/tensorflow/core/ir/interfaces.h.inc +include/tensorflow/core/ir/ops.cc.inc +include/tensorflow/core/ir/ops.h +include/tensorflow/core/ir/ops.h.inc +include/tensorflow/core/ir/tf_op_wrapper.h +include/tensorflow/core/ir/types/attributes.cc.inc +include/tensorflow/core/ir/types/attributes.h.inc +include/tensorflow/core/ir/types/attributes_enum.cc.inc +include/tensorflow/core/ir/types/attributes_enum.h.inc +include/tensorflow/core/ir/types/dialect.cpp.inc +include/tensorflow/core/ir/types/dialect.h +include/tensorflow/core/ir/types/dialect.h.inc +include/tensorflow/core/ir/types/types.cc.inc +include/tensorflow/core/ir/types/types.def +include/tensorflow/core/ir/types/types.h.inc +include/tensorflow/core/ir/utility.h +include/tensorflow/core/kernels/ops_util.h +include/tensorflow/core/lib/bfloat16/bfloat16.h +include/tensorflow/core/lib/core/arena.h +include/tensorflow/core/lib/core/bitmap.h +include/tensorflow/core/lib/core/bits.h +include/tensorflow/core/lib/core/blocking_counter.h +include/tensorflow/core/lib/core/coding.h +include/tensorflow/core/lib/core/error_codes.pb.h +include/tensorflow/core/lib/core/errors.h +include/tensorflow/core/lib/core/notification.h +include/tensorflow/core/lib/core/raw_coding.h +include/tensorflow/core/lib/core/refcount.h +include/tensorflow/core/lib/core/status.h +include/tensorflow/core/lib/core/status_test_util.h +include/tensorflow/core/lib/core/stringpiece.h +include/tensorflow/core/lib/core/threadpool.h +include/tensorflow/core/lib/core/threadpool_interface.h +include/tensorflow/core/lib/core/threadpool_options.h +include/tensorflow/core/lib/gtl/array_slice.h +include/tensorflow/core/lib/gtl/cleanup.h +include/tensorflow/core/lib/gtl/compactptrset.h +include/tensorflow/core/lib/gtl/edit_distance.h +include/tensorflow/core/lib/gtl/flatmap.h +include/tensorflow/core/lib/gtl/flatrep.h +include/tensorflow/core/lib/gtl/flatset.h +include/tensorflow/core/lib/gtl/inlined_vector.h +include/tensorflow/core/lib/gtl/int_type.h +include/tensorflow/core/lib/gtl/iterator_range.h +include/tensorflow/core/lib/gtl/manual_constructor.h +include/tensorflow/core/lib/gtl/map_util.h +include/tensorflow/core/lib/gtl/optional.h +include/tensorflow/core/lib/gtl/priority_queue_util.h +include/tensorflow/core/lib/gtl/subtle/map_traits.h +include/tensorflow/core/lib/gtl/top_n.h +include/tensorflow/core/lib/hash/crc32c.h +include/tensorflow/core/lib/hash/hash.h +include/tensorflow/core/lib/histogram/histogram.h +include/tensorflow/core/lib/io/block.h +include/tensorflow/core/lib/io/block_builder.h +include/tensorflow/core/lib/io/buffered_inputstream.h +include/tensorflow/core/lib/io/cache.h +include/tensorflow/core/lib/io/compression.h +include/tensorflow/core/lib/io/format.h +include/tensorflow/core/lib/io/inputbuffer.h +include/tensorflow/core/lib/io/inputstream_interface.h +include/tensorflow/core/lib/io/iterator.h +include/tensorflow/core/lib/io/path.h +include/tensorflow/core/lib/io/proto_encode_helper.h +include/tensorflow/core/lib/io/random_inputstream.h +include/tensorflow/core/lib/io/record_reader.h +include/tensorflow/core/lib/io/record_writer.h +include/tensorflow/core/lib/io/snappy/snappy_compression_options.h +include/tensorflow/core/lib/io/snappy/snappy_inputbuffer.h +include/tensorflow/core/lib/io/snappy/snappy_inputstream.h +include/tensorflow/core/lib/io/snappy/snappy_outputbuffer.h +include/tensorflow/core/lib/io/table.h +include/tensorflow/core/lib/io/table_builder.h +include/tensorflow/core/lib/io/table_options.h +include/tensorflow/core/lib/io/two_level_iterator.h +include/tensorflow/core/lib/io/zlib_compression_options.h +include/tensorflow/core/lib/io/zlib_inputstream.h +include/tensorflow/core/lib/io/zlib_outputbuffer.h +include/tensorflow/core/lib/llvm_rtti/llvm_rtti.h +include/tensorflow/core/lib/math/math_util.h +include/tensorflow/core/lib/monitoring/collected_metrics.h +include/tensorflow/core/lib/monitoring/collection_registry.h +include/tensorflow/core/lib/monitoring/counter.h +include/tensorflow/core/lib/monitoring/gauge.h +include/tensorflow/core/lib/monitoring/metric_def.h +include/tensorflow/core/lib/monitoring/percentile_sampler.h +include/tensorflow/core/lib/monitoring/sampler.h +include/tensorflow/core/lib/monitoring/timed.h +include/tensorflow/core/lib/monitoring/types.h +include/tensorflow/core/lib/random/distribution_sampler.h +include/tensorflow/core/lib/random/exact_uniform_int.h +include/tensorflow/core/lib/random/philox_random.h +include/tensorflow/core/lib/random/philox_random_test_utils.h +include/tensorflow/core/lib/random/random.h +include/tensorflow/core/lib/random/random_distributions.h +include/tensorflow/core/lib/random/random_distributions_utils.h +include/tensorflow/core/lib/random/simple_philox.h +include/tensorflow/core/lib/random/weighted_picker.h +include/tensorflow/core/lib/strings/base64.h +include/tensorflow/core/lib/strings/numbers.h +include/tensorflow/core/lib/strings/ordered_code.h +include/tensorflow/core/lib/strings/proto_serialization.h +include/tensorflow/core/lib/strings/proto_text_util.h +include/tensorflow/core/lib/strings/scanner.h +include/tensorflow/core/lib/strings/str_util.h +include/tensorflow/core/lib/strings/strcat.h +include/tensorflow/core/lib/strings/stringprintf.h +include/tensorflow/core/lib/wav/wav_io.h +include/tensorflow/core/platform/abi.h +include/tensorflow/core/platform/base64.h +include/tensorflow/core/platform/bfloat16.h +include/tensorflow/core/platform/blocking_counter.h +include/tensorflow/core/platform/byte_order.h +include/tensorflow/core/platform/casts.h +include/tensorflow/core/platform/cloud/auth_provider.h +include/tensorflow/core/platform/cloud/compute_engine_metadata_client.h +include/tensorflow/core/platform/cloud/compute_engine_zone_provider.h +include/tensorflow/core/platform/cloud/curl_http_request.h +include/tensorflow/core/platform/cloud/expiring_lru_cache.h +include/tensorflow/core/platform/cloud/file_block_cache.h +include/tensorflow/core/platform/cloud/gcs_dns_cache.h +include/tensorflow/core/platform/cloud/gcs_file_system.h +include/tensorflow/core/platform/cloud/gcs_throttle.h +include/tensorflow/core/platform/cloud/google_auth_provider.h +include/tensorflow/core/platform/cloud/http_request.h +include/tensorflow/core/platform/cloud/oauth_client.h +include/tensorflow/core/platform/cloud/ram_file_block_cache.h +include/tensorflow/core/platform/cloud/time_util.h +include/tensorflow/core/platform/cloud/zone_provider.h +include/tensorflow/core/platform/coding.h +include/tensorflow/core/platform/context.h +include/tensorflow/core/platform/cord.h +include/tensorflow/core/platform/cpu_feature_guard.h +include/tensorflow/core/platform/cpu_info.h +include/tensorflow/core/platform/crash_analysis.h +include/tensorflow/core/platform/ctstring.h +include/tensorflow/core/platform/ctstring_internal.h +include/tensorflow/core/platform/cuda.h +include/tensorflow/core/platform/cuda_libdevice_path.h +include/tensorflow/core/platform/default/casts.h +include/tensorflow/core/platform/default/context.h +include/tensorflow/core/platform/default/cord.h +include/tensorflow/core/platform/default/dynamic_annotations.h +include/tensorflow/core/platform/default/integral_types.h +include/tensorflow/core/platform/default/logging.h +include/tensorflow/core/platform/default/mutex.h +include/tensorflow/core/platform/default/mutex_data.h +include/tensorflow/core/platform/default/notification.h +include/tensorflow/core/platform/default/posix_file_system.h +include/tensorflow/core/platform/default/stacktrace.h +include/tensorflow/core/platform/default/subprocess.h +include/tensorflow/core/platform/default/tracing_impl.h +include/tensorflow/core/platform/default/unbounded_work_queue.h +include/tensorflow/core/platform/demangle.h +include/tensorflow/core/platform/denormal.h +include/tensorflow/core/platform/dynamic_annotations.h +include/tensorflow/core/platform/enable_tf2_utils.h +include/tensorflow/core/platform/env.h +include/tensorflow/core/platform/env_time.h +include/tensorflow/core/platform/errors.h +include/tensorflow/core/platform/file_statistics.h +include/tensorflow/core/platform/file_system.h +include/tensorflow/core/platform/file_system_helper.h +include/tensorflow/core/platform/fingerprint.h +include/tensorflow/core/platform/hash.h +include/tensorflow/core/platform/host_info.h +include/tensorflow/core/platform/human_readable_json.h +include/tensorflow/core/platform/init_main.h +include/tensorflow/core/platform/intrusive_ptr.h +include/tensorflow/core/platform/load_library.h +include/tensorflow/core/platform/logger.h +include/tensorflow/core/platform/logging.h +include/tensorflow/core/platform/macros.h +include/tensorflow/core/platform/mem.h +include/tensorflow/core/platform/mutex.h +include/tensorflow/core/platform/net.h +include/tensorflow/core/platform/notification.h +include/tensorflow/core/platform/null_file_system.h +include/tensorflow/core/platform/numa.h +include/tensorflow/core/platform/numbers.h +include/tensorflow/core/platform/path.h +include/tensorflow/core/platform/platform.h +include/tensorflow/core/platform/platform_strings.h +include/tensorflow/core/platform/platform_strings_computed.h +include/tensorflow/core/platform/prefetch.h +include/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h +include/tensorflow/core/platform/profile_utils/clock_cycle_profiler.h +include/tensorflow/core/platform/profile_utils/cpu_utils.h +include/tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h +include/tensorflow/core/platform/protobuf.h +include/tensorflow/core/platform/protobuf_compiler.h +include/tensorflow/core/platform/protobuf_internal.h +include/tensorflow/core/platform/ram_file_system.h +include/tensorflow/core/platform/random.h +include/tensorflow/core/platform/raw_coding.h +include/tensorflow/core/platform/refcount.h +include/tensorflow/core/platform/regexp.h +include/tensorflow/core/platform/resource.h +include/tensorflow/core/platform/resource_loader.h +include/tensorflow/core/platform/retrying_file_system.h +include/tensorflow/core/platform/retrying_utils.h +include/tensorflow/core/platform/rocm.h +include/tensorflow/core/platform/rocm_rocdl_path.h +include/tensorflow/core/platform/scanner.h +include/tensorflow/core/platform/setround.h +include/tensorflow/core/platform/snappy.h +include/tensorflow/core/platform/stack_frame.h +include/tensorflow/core/platform/stacktrace.h +include/tensorflow/core/platform/stacktrace_handler.h +include/tensorflow/core/platform/status.h +include/tensorflow/core/platform/status_matchers.h +include/tensorflow/core/platform/statusor.h +include/tensorflow/core/platform/statusor_internals.h +include/tensorflow/core/platform/str_util.h +include/tensorflow/core/platform/strcat.h +include/tensorflow/core/platform/stream_executor.h +include/tensorflow/core/platform/stream_executor_no_cuda.h +include/tensorflow/core/platform/stringpiece.h +include/tensorflow/core/platform/stringprintf.h +include/tensorflow/core/platform/strong_hash.h +include/tensorflow/core/platform/subprocess.h +include/tensorflow/core/platform/tensor_coding.h +include/tensorflow/core/platform/tensor_float_32_utils.h +include/tensorflow/core/platform/test.h +include/tensorflow/core/platform/test_benchmark.h +include/tensorflow/core/platform/thread_annotations.h +include/tensorflow/core/platform/threadpool.h +include/tensorflow/core/platform/threadpool_interface.h +include/tensorflow/core/platform/threadpool_options.h +include/tensorflow/core/platform/tracing.h +include/tensorflow/core/platform/tstring.h +include/tensorflow/core/platform/types.h +include/tensorflow/core/platform/unbounded_work_queue.h +include/tensorflow/core/profiler/internal/cpu/traceme_recorder.h +include/tensorflow/core/profiler/lib/traceme.h +include/tensorflow/core/profiler/lib/traceme_encode.h +include/tensorflow/core/profiler/profiler_options.pb.h +include/tensorflow/core/profiler/protobuf/xplane.pb.h +include/tensorflow/core/profiler/utils/math_utils.h +include/tensorflow/core/profiler/utils/time_utils.h +include/tensorflow/core/protobuf/bfc_memory_map.pb.h +include/tensorflow/core/protobuf/cluster.pb.h +include/tensorflow/core/protobuf/composite_tensor_variant.pb.h +include/tensorflow/core/protobuf/config.pb.h +include/tensorflow/core/protobuf/control_flow.pb.h +include/tensorflow/core/protobuf/coordination_config.pb.h +include/tensorflow/core/protobuf/data_service.pb.h +include/tensorflow/core/protobuf/debug.pb.h +include/tensorflow/core/protobuf/debug_event.pb.h +include/tensorflow/core/protobuf/device_filters.pb.h +include/tensorflow/core/protobuf/device_properties.pb.h +include/tensorflow/core/protobuf/distributed_runtime_payloads.pb.h +include/tensorflow/core/protobuf/error_codes.pb.h +include/tensorflow/core/protobuf/graph_debug_info.pb.h +include/tensorflow/core/protobuf/meta_graph.pb.h +include/tensorflow/core/protobuf/named_tensor.pb.h +include/tensorflow/core/protobuf/queue_runner.pb.h +include/tensorflow/core/protobuf/remote_tensor_handle.pb.h +include/tensorflow/core/protobuf/rewriter_config.pb.h +include/tensorflow/core/protobuf/saved_model.pb.h +include/tensorflow/core/protobuf/saved_object_graph.pb.h +include/tensorflow/core/protobuf/saver.pb.h +include/tensorflow/core/protobuf/service_config.pb.h +include/tensorflow/core/protobuf/snapshot.pb.h +include/tensorflow/core/protobuf/status.pb.h +include/tensorflow/core/protobuf/struct.pb.h +include/tensorflow/core/protobuf/tensor_bundle.pb.h +include/tensorflow/core/protobuf/tensorflow_server.pb.h +include/tensorflow/core/protobuf/tpu/optimization_parameters.pb.h +include/tensorflow/core/protobuf/tpu/tpu_embedding_configuration.pb.h +include/tensorflow/core/protobuf/trackable_object_graph.pb.h +include/tensorflow/core/protobuf/transport_options.pb.h +include/tensorflow/core/protobuf/verifier_config.pb.h +include/tensorflow/core/public/session.h +include/tensorflow/core/public/session_options.h +include/tensorflow/core/public/version.h +include/tensorflow/core/tpu/ops/tpu_embedding_ops.h +include/tensorflow/core/tpu/ops/tpu_embedding_shape_util.h +include/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h +include/tensorflow/core/tpu/tpu_embedding_output_layout_utils.h +include/tensorflow/core/transforms/cf_sink/cf_sink.h +include/tensorflow/core/transforms/consolidate_attrs/pass.h +include/tensorflow/core/transforms/const_dedupe_hoist/pass.h +include/tensorflow/core/transforms/drop_unregistered_attribute/output_shapes.h +include/tensorflow/core/transforms/graph_to_func/graph_to_func.h +include/tensorflow/core/transforms/graph_to_func/graph_to_func_pass.h +include/tensorflow/core/transforms/pass_detail.h +include/tensorflow/core/transforms/pass_registration.h +include/tensorflow/core/transforms/passes.h.inc +include/tensorflow/core/transforms/remapper/remapper_pass.h +include/tensorflow/core/transforms/toposort/toposort_pass.h +include/tensorflow/core/transforms/utils/utils.h +include/tensorflow/core/util/activation_mode.h +include/tensorflow/core/util/batch_util.h +include/tensorflow/core/util/bcast.h +include/tensorflow/core/util/command_line_flags.h +include/tensorflow/core/util/debug_events_writer.h +include/tensorflow/core/util/determinism.h +include/tensorflow/core/util/device_name_utils.h +include/tensorflow/core/util/dump_graph.h +include/tensorflow/core/util/einsum_op_util.h +include/tensorflow/core/util/env_var.h +include/tensorflow/core/util/equal_graph_def.h +include/tensorflow/core/util/event.pb.h +include/tensorflow/core/util/events_writer.h +include/tensorflow/core/util/example_proto_fast_parsing.h +include/tensorflow/core/util/example_proto_helper.h +include/tensorflow/core/util/exec_on_stall.h +include/tensorflow/core/util/gpu_cuda_alias.h +include/tensorflow/core/util/gpu_device_functions.h +include/tensorflow/core/util/gpu_kernel_helper.h +include/tensorflow/core/util/gpu_launch_config.h +include/tensorflow/core/util/guarded_philox_random.h +include/tensorflow/core/util/managed_stack_trace.h +include/tensorflow/core/util/matmul_autotune.h +include/tensorflow/core/util/matmul_bcast.h +include/tensorflow/core/util/memmapped_file_system.h +include/tensorflow/core/util/memmapped_file_system.pb.h +include/tensorflow/core/util/memmapped_file_system_writer.h +include/tensorflow/core/util/mirror_pad_mode.h +include/tensorflow/core/util/mkl_threadpool.h +include/tensorflow/core/util/mkl_util.h +include/tensorflow/core/util/onednn_env_vars.h +include/tensorflow/core/util/overflow.h +include/tensorflow/core/util/padding.h +include/tensorflow/core/util/permutation_input_iterator.h +include/tensorflow/core/util/permutation_output_iterator.h +include/tensorflow/core/util/port.h +include/tensorflow/core/util/presized_cuckoo_map.h +include/tensorflow/core/util/ptr_util.h +include/tensorflow/core/util/ragged_to_dense_util.h +include/tensorflow/core/util/ragged_to_dense_util_common.h +include/tensorflow/core/util/reffed_status_callback.h +include/tensorflow/core/util/saved_tensor_slice.pb.h +include/tensorflow/core/util/saved_tensor_slice_util.h +include/tensorflow/core/util/sparse/dim_comparator.h +include/tensorflow/core/util/sparse/group_iterator.h +include/tensorflow/core/util/sparse/sparse_tensor.h +include/tensorflow/core/util/stat_summarizer.h +include/tensorflow/core/util/stat_summarizer_options.h +include/tensorflow/core/util/stats_calculator.h +include/tensorflow/core/util/stream_executor_util.h +include/tensorflow/core/util/strided_slice_op.h +include/tensorflow/core/util/tensor_bundle/byte_swap.h +include/tensorflow/core/util/tensor_bundle/naming.h +include/tensorflow/core/util/tensor_bundle/tensor_bundle.h +include/tensorflow/core/util/tensor_format.h +include/tensorflow/core/util/tensor_ops_util.h +include/tensorflow/core/util/tensor_slice_reader.h +include/tensorflow/core/util/tensor_slice_reader_cache.h +include/tensorflow/core/util/tensor_slice_set.h +include/tensorflow/core/util/tensor_slice_util.h +include/tensorflow/core/util/tensor_slice_writer.h +include/tensorflow/core/util/test_log.pb.h +include/tensorflow/core/util/transform_output_iterator.h +include/tensorflow/core/util/use_cudnn.h +include/tensorflow/core/util/util.h +include/tensorflow/core/util/work_sharder.h +include/tensorflow/core/util/xla_config_registry.h +include/tensorflow/lite/kernels/shim/op_kernel.h +include/tensorflow/lite/kernels/shim/shape.h +include/tensorflow/lite/kernels/shim/status_macros.h +include/tensorflow/lite/kernels/shim/tensor_view.h +include/tensorflow/lite/kernels/shim/tf_op_shim.h +include/tensorflow/lite/kernels/shim/tf_tensor_view.h +include/tensorflow/stream_executor/allocator_stats.h +include/tensorflow/stream_executor/blas.h +include/tensorflow/stream_executor/cuda/cuda_dnn.h +include/tensorflow/stream_executor/cuda/cuda_platform_id.h +include/tensorflow/stream_executor/data_type.h +include/tensorflow/stream_executor/device_description.h +include/tensorflow/stream_executor/device_memory.h +include/tensorflow/stream_executor/device_memory_allocator.h +include/tensorflow/stream_executor/device_options.h +include/tensorflow/stream_executor/dnn.h +include/tensorflow/stream_executor/dnn.pb.h +include/tensorflow/stream_executor/event.h +include/tensorflow/stream_executor/executor_cache.h +include/tensorflow/stream_executor/fft.h +include/tensorflow/stream_executor/gpu_launch_dim.h +include/tensorflow/stream_executor/host/host_gpu_executor.h +include/tensorflow/stream_executor/host/host_platform.h +include/tensorflow/stream_executor/host/host_platform_id.h +include/tensorflow/stream_executor/host/host_stream.h +include/tensorflow/stream_executor/host/host_timer.h +include/tensorflow/stream_executor/host_or_device_scalar.h +include/tensorflow/stream_executor/kernel.h +include/tensorflow/stream_executor/kernel_cache_config.h +include/tensorflow/stream_executor/kernel_spec.h +include/tensorflow/stream_executor/launch_dim.h +include/tensorflow/stream_executor/lib/array_slice.h +include/tensorflow/stream_executor/lib/demangle.h +include/tensorflow/stream_executor/lib/env.h +include/tensorflow/stream_executor/lib/error.h +include/tensorflow/stream_executor/lib/human_readable.h +include/tensorflow/stream_executor/lib/initialize.h +include/tensorflow/stream_executor/lib/mathutil.h +include/tensorflow/stream_executor/lib/numbers.h +include/tensorflow/stream_executor/lib/path.h +include/tensorflow/stream_executor/lib/process_state.h +include/tensorflow/stream_executor/lib/stacktrace.h +include/tensorflow/stream_executor/lib/static_threadlocal.h +include/tensorflow/stream_executor/lib/status.h +include/tensorflow/stream_executor/lib/status_macros.h +include/tensorflow/stream_executor/lib/statusor.h +include/tensorflow/stream_executor/lib/thread_options.h +include/tensorflow/stream_executor/lib/threadpool.h +include/tensorflow/stream_executor/module_spec.h +include/tensorflow/stream_executor/multi_platform_manager.h +include/tensorflow/stream_executor/platform.h +include/tensorflow/stream_executor/platform/default/dso_loader.h +include/tensorflow/stream_executor/platform/default/initialize.h +include/tensorflow/stream_executor/platform/dso_loader.h +include/tensorflow/stream_executor/platform/initialize.h +include/tensorflow/stream_executor/platform/logging.h +include/tensorflow/stream_executor/platform/platform.h +include/tensorflow/stream_executor/platform/port.h +include/tensorflow/stream_executor/plugin.h +include/tensorflow/stream_executor/plugin_registry.h +include/tensorflow/stream_executor/rng.h +include/tensorflow/stream_executor/rocm/rocm_platform_id.h +include/tensorflow/stream_executor/scratch_allocator.h +include/tensorflow/stream_executor/stream.h +include/tensorflow/stream_executor/stream_executor.h +include/tensorflow/stream_executor/stream_executor_internal.h +include/tensorflow/stream_executor/stream_executor_pimpl.h +include/tensorflow/stream_executor/temporary_device_memory.h +include/tensorflow/stream_executor/temporary_memory_manager.h +include/tensorflow/stream_executor/timer.h +include/tensorflow/stream_executor/trace_listener.h +lib/libtensorflow.so +lib/libtensorflow.so.2 +lib/libtensorflow.so.%%TF_PORT_VERSION%% +lib/libtensorflow_cc.so +lib/libtensorflow_cc.so.2 +lib/libtensorflow_cc.so.%%TF_PORT_VERSION%% +lib/libtensorflow_framework.so +lib/libtensorflow_framework.so.2 +lib/libtensorflow_framework.so.%%TF_PORT_VERSION%% +libdata/pkgconfig/tensorflow.pc +libdata/pkgconfig/tensorflow_cc.pc