diff --git a/.ci_support/linux_64_cuda_compiler_version12.8microarch_level1.yaml b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level1.yaml similarity index 99% rename from .ci_support/linux_64_cuda_compiler_version12.8microarch_level1.yaml rename to .ci_support/linux_64_cuda_compiler_version12.9microarch_level1.yaml index 5aff393aa..ffa2d8198 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.8microarch_level1.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level1.yaml @@ -13,7 +13,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.8' +- '12.9' cudnn: - '9' cxx_compiler: diff --git a/.ci_support/linux_64_cuda_compiler_version12.8microarch_level3.yaml b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level3.yaml similarity index 99% rename from .ci_support/linux_64_cuda_compiler_version12.8microarch_level3.yaml rename to .ci_support/linux_64_cuda_compiler_version12.9microarch_level3.yaml index c5a81064d..6f62428cf 100644 --- a/.ci_support/linux_64_cuda_compiler_version12.8microarch_level3.yaml +++ b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level3.yaml @@ -13,7 +13,7 @@ channel_targets: cuda_compiler: - cuda-nvcc cuda_compiler_version: -- '12.8' +- '12.9' cudnn: - '9' cxx_compiler: diff --git a/.ci_support/linux_64_cuda_compiler_version12.9microarch_level4.yaml b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level4.yaml new file mode 100644 index 000000000..fbbe45d88 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_version12.9microarch_level4.yaml @@ -0,0 +1,80 @@ +c_compiler: +- gcc +c_compiler_version: +- '14' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.9' +cudnn: +- '9' +cxx_compiler: +- gxx +cxx_compiler_version: +- '14' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma9 +flatbuffers: +- 25.9.23 +giflib: +- '5.2' +github_actions_labels: +- cirun-openstack-cpu-2xlarge +icu: +- '78' +libabseil: +- '20250512' +libcurl: +- '8' +libgrpc: +- '1.73' +libjpeg_turbo: +- '3' +libpng: +- '1.6' +libprotobuf: +- 6.31.1 +libtensorflow_cc: +- '2.16' +microarch_level: +- '4' +nccl: +- '2' +numpy: +- '2' +openssl: +- '3.5' +perl: +- 5.32.1 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +- 3.11.* *_cpython +- 3.12.* *_cpython +- 3.13.* *_cp313 +snappy: +- '1.2' +sqlite: +- '3' +target_platform: +- linux-64 +tensorflow: +- '2.16' +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - c_stdlib_version + - cuda_compiler_version +zlib: +- '1' diff --git a/.ci_support/linux_64_cuda_compiler_versionNonemicroarch_level4.yaml b/.ci_support/linux_64_cuda_compiler_versionNonemicroarch_level4.yaml new file mode 100644 index 000000000..3f964bf28 --- /dev/null +++ b/.ci_support/linux_64_cuda_compiler_versionNonemicroarch_level4.yaml @@ -0,0 +1,80 @@ +c_compiler: +- gcc +c_compiler_version: +- '14' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- None +cudnn: +- '9' +cxx_compiler: +- gxx +cxx_compiler_version: +- '14' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma9 +flatbuffers: +- 25.9.23 +giflib: +- '5.2' +github_actions_labels: +- cirun-openstack-cpu-2xlarge +icu: +- '78' +libabseil: +- '20250512' +libcurl: +- '8' +libgrpc: +- '1.73' +libjpeg_turbo: +- '3' +libpng: +- '1.6' +libprotobuf: +- 6.31.1 +libtensorflow_cc: +- '2.16' +microarch_level: +- '4' +nccl: +- '2' +numpy: +- '2' +openssl: +- '3.5' +perl: +- 5.32.1 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +- 3.11.* *_cpython +- 3.12.* *_cpython +- 3.13.* *_cp313 +snappy: +- '1.2' +sqlite: +- '3' +target_platform: +- linux-64 +tensorflow: +- '2.16' +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - c_stdlib_version + - cuda_compiler_version +zlib: +- '1' diff --git a/.ci_support/migrations/cuda128.yaml b/.ci_support/migrations/cuda128.yaml deleted file mode 100644 index c6fa8e4d3..000000000 --- a/.ci_support/migrations/cuda128.yaml +++ /dev/null @@ -1,52 +0,0 @@ -migrator_ts: 1738229377 -__migrator: - kind: - version - migration_number: - 1 - build_number: - 1 - paused: false - use_local: true - override_cbc_keys: - - cuda_compiler_stub - check_solvable: false - primary_key: cuda_compiler_version - ordering: - cuda_compiler_version: - - 11.8 - - 12.4 - - 12.6 - - None - - 12.8 - - 12.9 - - 13.0 - commit_message: | - Upgrade to CUDA 12.8 - - With CUDA 12.8, the following new architectures are added `sm_100`, `sm_101` and `sm_120`. - To build for these architectures, maintainers will need to add these to list of architectures - that their package builds for. - - ref: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#new-features - -cuda_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 12.8 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -c_stdlib_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 2.17 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -cudnn: # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 9 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -c_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11 # [linux and aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 14 # [linux and x86_64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -cxx_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11 # [linux and aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 14 # [linux and x86_64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - -fortran_compiler_version: # [linux and (x86_64 or aarch64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 11 # [linux and aarch64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] - - 14 # [linux and x86_64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 550fea6be..db7f6d5e4 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -21,15 +21,20 @@ jobs: fail-fast: false matrix: include: - - CONFIG: linux_64_cuda_compiler_version12.8microarch_level1 + - CONFIG: linux_64_cuda_compiler_version12.9microarch_level1 UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_version12.8microa_hc8cea6d2', 'linux', 'x64', 'self-hosted'] + runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_version12.9microa_h28a6e8b1', 'linux', 'x64', 'self-hosted'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - - CONFIG: linux_64_cuda_compiler_version12.8microarch_level3 + - CONFIG: linux_64_cuda_compiler_version12.9microarch_level3 UPLOAD_PACKAGES: True os: ubuntu - runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_version12.8microa_h82e5350b', 'linux', 'x64', 'self-hosted'] + runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_version12.9microa_h764a83b2', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_cuda_compiler_version12.9microarch_level4 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_version12.9microa_h5fa35844', 'linux', 'x64', 'self-hosted'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - CONFIG: linux_64_cuda_compiler_versionNonemicroarch_level1 UPLOAD_PACKAGES: True @@ -41,6 +46,11 @@ jobs: os: ubuntu runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_versionNonemicroa_hb1134425', 'linux', 'x64', 'self-hosted'] DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + - CONFIG: linux_64_cuda_compiler_versionNonemicroarch_level4 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-2xlarge--${{ github.run_id }}-linux_64_cuda_compiler_versionNonemicroa_h0ea2bc29', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - CONFIG: linux_aarch64_cuda_compiler_versionNone UPLOAD_PACKAGES: True os: ubuntu @@ -49,7 +59,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Build on Linux id: build-linux diff --git a/LICENSE.txt b/LICENSE.txt index 2ec51d75f..c5aa738f1 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,5 @@ BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. +Copyright (c) 2015-2026, conda-forge contributors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 98ba490ba..f25775e13 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Current release info | [![Conda Recipe](https://img.shields.io/badge/recipe-libtensorflow__framework-green.svg)](https://anaconda.org/conda-forge/libtensorflow_framework) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libtensorflow_framework.svg)](https://anaconda.org/conda-forge/libtensorflow_framework) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libtensorflow_framework.svg)](https://anaconda.org/conda-forge/libtensorflow_framework) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libtensorflow_framework.svg)](https://anaconda.org/conda-forge/libtensorflow_framework) | | [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow-green.svg)](https://anaconda.org/conda-forge/tensorflow) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow.svg)](https://anaconda.org/conda-forge/tensorflow) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow.svg)](https://anaconda.org/conda-forge/tensorflow) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow.svg)](https://anaconda.org/conda-forge/tensorflow) | | [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow--avx2-green.svg)](https://anaconda.org/conda-forge/tensorflow-avx2) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow-avx2.svg)](https://anaconda.org/conda-forge/tensorflow-avx2) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow-avx2.svg)](https://anaconda.org/conda-forge/tensorflow-avx2) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow-avx2.svg)](https://anaconda.org/conda-forge/tensorflow-avx2) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow--avx512-green.svg)](https://anaconda.org/conda-forge/tensorflow-avx512) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow-avx512.svg)](https://anaconda.org/conda-forge/tensorflow-avx512) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow-avx512.svg)](https://anaconda.org/conda-forge/tensorflow-avx512) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow-avx512.svg)](https://anaconda.org/conda-forge/tensorflow-avx512) | | [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow--base-green.svg)](https://anaconda.org/conda-forge/tensorflow-base) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow-base.svg)](https://anaconda.org/conda-forge/tensorflow-base) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow-base.svg)](https://anaconda.org/conda-forge/tensorflow-base) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow-base.svg)](https://anaconda.org/conda-forge/tensorflow-base) | | [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow--cpu-green.svg)](https://anaconda.org/conda-forge/tensorflow-cpu) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow-cpu.svg)](https://anaconda.org/conda-forge/tensorflow-cpu) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow-cpu.svg)](https://anaconda.org/conda-forge/tensorflow-cpu) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow-cpu.svg)](https://anaconda.org/conda-forge/tensorflow-cpu) | | [![Conda Recipe](https://img.shields.io/badge/recipe-tensorflow--estimator-green.svg)](https://anaconda.org/conda-forge/tensorflow-estimator) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/tensorflow-estimator.svg)](https://anaconda.org/conda-forge/tensorflow-estimator) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/tensorflow-estimator.svg)](https://anaconda.org/conda-forge/tensorflow-estimator) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/tensorflow-estimator.svg)](https://anaconda.org/conda-forge/tensorflow-estimator) | @@ -52,16 +53,16 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `libtensorflow, libtensorflow_cc, libtensorflow_framework, tensorflow, tensorflow-avx2, tensorflow-base, tensorflow-cpu, tensorflow-estimator, tensorflow-gpu, tensorflow-sse3` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `libtensorflow, libtensorflow_cc, libtensorflow_framework, tensorflow, tensorflow-avx2, tensorflow-avx512, tensorflow-base, tensorflow-cpu, tensorflow-estimator, tensorflow-gpu, tensorflow-sse3` can be installed with `conda`: ``` -conda install libtensorflow libtensorflow_cc libtensorflow_framework tensorflow tensorflow-avx2 tensorflow-base tensorflow-cpu tensorflow-estimator tensorflow-gpu tensorflow-sse3 +conda install libtensorflow libtensorflow_cc libtensorflow_framework tensorflow tensorflow-avx2 tensorflow-avx512 tensorflow-base tensorflow-cpu tensorflow-estimator tensorflow-gpu tensorflow-sse3 ``` or with `mamba`: ``` -mamba install libtensorflow libtensorflow_cc libtensorflow_framework tensorflow tensorflow-avx2 tensorflow-base tensorflow-cpu tensorflow-estimator tensorflow-gpu tensorflow-sse3 +mamba install libtensorflow libtensorflow_cc libtensorflow_framework tensorflow tensorflow-avx2 tensorflow-avx512 tensorflow-base tensorflow-cpu tensorflow-estimator tensorflow-gpu tensorflow-sse3 ``` It is possible to list all of the versions of `libtensorflow` available on your platform with `conda`: diff --git a/build-locally.py b/build-locally.py index 9dfe44039..825a4aff9 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,5 +1,6 @@ #!/bin/sh """exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on + # # This file has been generated by conda-smithy in order to build the recipe # locally. diff --git a/recipe/build.sh b/recipe/build.sh index 6041b3523..5a90ef1a5 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -2,6 +2,9 @@ set -ex +# See https://github.com/conda-forge/bazel-feedstock/issues/273 +find $BUILD_PREFIX/share/bazel/install | xargs -n 1 touch -mt 203601010101 + for ver in 3.9 3.10 3.11 3.12; do export PY_VER=$ver echo "Building for $PY_VER" diff --git a/recipe/build_common.sh b/recipe/build_common.sh index ca6481208..a76c59127 100644 --- a/recipe/build_common.sh +++ b/recipe/build_common.sh @@ -80,12 +80,17 @@ export BAZEL_MKL_OPT="" mkdir -p ./bazel_output_base export BAZEL_OPTS="" # Set this to something as otherwise, it would include CFLAGS which itself contains a host path and this then breaks bazel's include path validation. -if [[ "${target_platform}" != *-64 ]]; then - export CC_OPT_FLAGS="-O2" -elif [[ "${microarch_level}" == "1" ]]; then - export CC_OPT_FLAGS="-O2 -march=nocona -mtune=haswell" -else - export CC_OPT_FLAGS="-O2 -march=x86-64-v${microarch_level}" +export CC_OPT_FLAGS="-O2" + +if [[ "${target_platform}" == "linux-64" && "${microarch_level}" == "4" && "${CROSSCOMPILING_EMULATOR:-}" != "" ]]; then + # we can't use the x86-64-v4 emulator from Intel with bazel. Instead build with + # - v4 for TF libraries + # - v3 for external libraries + # - v3 for TF executables + CFLAGS=$(echo "$CFLAGS" | sed 's/-march=x86-64-v4/-march=x86-64-v3/g') + CXXFLAGS=$(echo "$CXXFLAGS" | sed 's/-march=x86-64-v4/-march=x86-64-v3/g') + CPPFLAGS=$(echo "$CPPFLAGS" | sed 's/-march=x86-64-v4/-march=x86-64-v3/g') + BAZEL_OPTS="${BAZEL_OPTS} --copt=-march=x86-64-v${microarch_level} --host_copt=-march=x86-64-v3" fi # Quick debug: @@ -250,7 +255,7 @@ rm -f tensorflow/lite/acceleration/configuration/configuration_generated.h sed -ie "s;BUILD_PREFIX;${BUILD_PREFIX};g" tensorflow/tools/pip_package/build_pip_package.py # build using bazel -bazel ${BAZEL_OPTS} build ${BUILD_TARGET} +bazel build ${BUILD_TARGET} ${BAZEL_OPTS} # build a whl file mkdir -p $SRC_DIR/tensorflow_pkg diff --git a/recipe/build_estimator.sh b/recipe/build_estimator.sh deleted file mode 100644 index d4c9152ef..000000000 --- a/recipe/build_estimator.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -exuo pipefail - -pushd tensorflow-estimator - -WHEEL_DIR=${PWD}/wheel_dir${PY_VER} -mkdir -p ${WHEEL_DIR} -if [[ "${build_platform}" == linux-* ]]; then - $RECIPE_DIR/add_py_toolchain.sh -fi -bazel build tensorflow_estimator/tools/pip_package:build_pip_package -bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package ${WHEEL_DIR} -${PYTHON} -m pip install --no-deps ${WHEEL_DIR}/*.whl -bazel clean -popd diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 3a1169a10..ce03c7c7a 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -13,3 +13,4 @@ microarch_level: - 1 # hmaarrfk -- temporary, uncomment during actual build - 3 # [linux and x86_64] +- 4 # [linux and x86_64] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b3074c7c8..ac034836d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,4 @@ {% set version = "2.19.1" %} -{% set estimator_version = "2.15.0" %} {% set build = 3 %} {% if cuda_compiler_version != "None" %} @@ -77,9 +76,6 @@ source: # backport https://github.com/openxla/xla/pull/22572 into vendored xla - patches/0044-PR-22572-Fix-build-break-in-convolution_thunk_intern.patch - patches/0045-Force-python-wheel-architecture-to-aarch64.patch # [aarch64 and target_platform != build_platform] - - url: https://github.com/tensorflow/estimator/archive/refs/tags/v{{ estimator_version.replace(".rc", "-rc") }}.tar.gz - sha256: 2d7e100b1878084da34b5e23b49a0cbb5ee8a7add74b7dd189a82ada1cf85530 - folder: tensorflow-estimator build: number: {{ build }} @@ -90,6 +86,7 @@ build: skip: true # [osx] # TODO: debug issues with CUDA cross-compilation skip: true # [aarch64 and cuda_compiler_version != "None"] + skip: true # [microarch_level == 1] requirements: build: @@ -381,7 +378,6 @@ outputs: run: - python - {{ pin_subpackage('tensorflow-base', exact=True) }} - - {{ pin_subpackage('tensorflow-estimator', exact=True) }} # avoid that people without GPUs needlessly download ~0.5-1GB # This also helps mamba give preference to the CPU build - __cuda # [cuda_compiler_version != "None"] @@ -390,71 +386,20 @@ outputs: - test_tensorflow.py requires: - pip - imports: - - tensorflow # [build_platform == target_platform] commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } - pip check # [build_platform == target_platform] - cat test_tensorflow.py # [unix] - - python test_tensorflow.py # [build_platform == target_platform] - - tf_upgrade_v2 --help # [build_platform == target_platform] + - run python test_tensorflow.py # [build_platform == target_platform] + - run tf_upgrade_v2 --help # [build_platform == target_platform] # --help exits with exit code 1 - test -x $PREFIX/bin/saved_model_cli # [unix] - - tflite_convert --help # [build_platform == target_platform] - - toco --help # [build_platform == target_platform] - - python -c 'import tensorflow as tf; assert tf.test.is_built_with_cuda()' # [cuda_compiler_version != "None" and build_platform == target_platform] - - python -c 'import tensorflow as tf; assert not tf.test.is_built_with_cuda()' # [cuda_compiler_version == "None" and build_platform == target_platform] + - run tflite_convert --help # [build_platform == target_platform] + - run toco --help # [build_platform == target_platform] + - run python -c 'import tensorflow as tf; assert tf.test.is_built_with_cuda()' # [cuda_compiler_version != "None" and build_platform == target_platform] + - run python -c 'import tensorflow as tf; assert not tf.test.is_built_with_cuda()' # [cuda_compiler_version == "None" and build_platform == target_platform] # See https://github.com/conda-forge/tensorflow-feedstock/issues/364 - - python -c "import tensorflow as tf;graph = tf.function(lambda x:x).get_concrete_function(1.).graph;tf.compat.v1.train.export_meta_graph(graph=graph,graph_def=graph.as_graph_def())" # [build_platform == target_platform] - - - name: tensorflow-estimator - script: build_estimator.sh # [unix] - script: build_estimator.bat # [win] - build: - # tensorflow 2.18 doesn't support py313 until 2.20, see - # https://github.com/tensorflow/tensorflow/issues/78774 - skip: true # [py==313] - string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] - string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] - requirements: - build: - - {{ compiler('c') }} - - {{ stdlib("c") }} - - {{ compiler('cxx') }} - # Keep the cuda compiler here since it helps package solvers - # decide on the cuda variant - # https://github.com/conda-forge/tensorflow-feedstock/issues/162 - - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] - - x86_64-microarch-level {{ microarch_level }} # [linux and x86_64] - - bazel 6.* - - bazel-toolchain - - python # [build_platform != target_platform] - - cross-python_{{ target_platform }} # [build_platform != target_platform] - - libabseil # [build_platform != target_platform] - - libgrpc # [build_platform != target_platform] - - icu # [build_platform != target_platform] - - {{ pin_subpackage('tensorflow-base') }} # [build_platform != target_platform] - host: - - python - - pip - - packaging - - setuptools - - wheel - # This ensures that a consistent version of openssl is chosen between - # all packages. - # https://github.com/conda-forge/conda-forge.github.io/issues/1528 - - openssl - - {{ pin_subpackage('tensorflow-base', exact=True) }} - # Keep the cuda version here since it helps package solvers - # decide on the cuda variant - - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] - run: - - python - - {{ pin_subpackage('tensorflow-base', exact=True) }} - test: - requires: - - pip - commands: - - pip check # [build_platform == target_platform] + - run python -c "import tensorflow as tf;graph = tf.function(lambda x:x).get_concrete_function(1.).graph;tf.compat.v1.train.export_meta_graph(graph=graph,graph_def=graph.as_graph_def())" # [build_platform == target_platform] - name: libtensorflow script: cp_libtensorflow.sh @@ -565,8 +510,9 @@ outputs: run: - tensorflow {{ version }} cpu*_{{ PKG_BUILDNUM }} test: - imports: - - tensorflow # [build_platform == target_platform] + commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } # [build_platform == target_platform] + - run python -c "import tensorflow" # [build_platform == target_platform] - name: tensorflow-gpu build: @@ -576,8 +522,9 @@ outputs: run: - tensorflow {{ version }} cuda{{ cuda_compiler_version | replace('.', '') }}*_{{ PKG_BUILDNUM }} test: - imports: - - tensorflow # [build_platform == target_platform] + commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } # [build_platform == target_platform] + - run python -c "import tensorflow" # [build_platform == target_platform] - name: tensorflow-sse3 build: @@ -594,8 +541,9 @@ outputs: run: - {{ pin_subpackage("tensorflow", exact=True) }} test: - imports: - - tensorflow + commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } + - run python -c "import tensorflow" - name: tensorflow-avx2 build: @@ -612,8 +560,9 @@ outputs: run: - {{ pin_subpackage("tensorflow", exact=True) }} test: - imports: - - tensorflow + commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } + - run python -c "import tensorflow" - name: tensorflow-avx512 build: @@ -630,8 +579,9 @@ outputs: run: - {{ pin_subpackage("tensorflow", exact=True) }} test: - imports: - - tensorflow + commands: + - function run() { ${CROSSCOMPILING_EMULATOR} $@; } + - run python -c "import tensorflow" about: home: http://tensorflow.org/