Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow 2.15.0 #353

Merged
merged 17 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 12 additions & 12 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions recipe/add_py_toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
#
# Create a Python toolchain in the current working directory.

mkdir -p py_toolchain
cp $RECIPE_DIR/py_toolchain.bzl py_toolchain/BUILD
sed -i "s;@@SRC_DIR@@;$SRC_DIR;" py_toolchain/BUILD

cat > python.shebang <<EOF
#!/bin/bash
export PYTHONSAFEPATH=1
${PYTHON} "\$@"
EOF
chmod +x python.shebang

cat >> .bazelrc <<EOF
build --extra_toolchains=//py_toolchain:py_toolchain
EOF
9 changes: 7 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export TF_PYTHON_VERSION=$PY_VER
# Needs c++17, try on linux
# com_googlesource_code_re2
export TF_SYSTEM_LIBS="
absl_py
astor_archive
astunparse_archive
boringssl
Expand Down Expand Up @@ -86,6 +85,10 @@ else
export LDFLAGS="${LDFLAGS} -lrt"
fi

if [[ ${cuda_compiler_version} != "None" ]]; then
export LDFLAGS="${LDFLAGS} -lcusparse"
fi

source ${RECIPE_DIR}/gen-bazel-toolchain.sh

if [[ "${target_platform}" == "osx-64" ]]; then
Expand Down Expand Up @@ -165,6 +168,8 @@ fi

./configure

$RECIPE_DIR/add_py_toolchain.sh

cat >> .bazelrc <<EOF
build --crosstool_top=//custom_toolchain:toolchain
build --logging=6
Expand Down Expand Up @@ -208,7 +213,7 @@ mkdir -p $SRC_DIR/libtensorflow_cc_output/include/tensorflow
rsync -r --chmod=D777,F666 --exclude '_solib*' --exclude '_virtual_includes/' --exclude 'pip_package/' --exclude 'lib_package/' --include '*/' --include '*.h' --include '*.inc' --exclude '*' bazel-bin/ $SRC_DIR/libtensorflow_cc_output/include
rsync -r --chmod=D777,F666 --include '*/' --include '*.h' --include '*.inc' --exclude '*' tensorflow/cc $SRC_DIR/libtensorflow_cc_output/include/tensorflow/
rsync -r --chmod=D777,F666 --include '*/' --include '*.h' --include '*.inc' --exclude '*' tensorflow/core $SRC_DIR/libtensorflow_cc_output/include/tensorflow/
rsync -r --chmod=D777,F666 --include '*/' --include '*.h' --include '*.inc' --exclude '*' tensorflow/tsl $SRC_DIR/libtensorflow_cc_output/include/tensorflow/
rsync -r --chmod=D777,F666 --include '*/' --include '*.h' --include '*.inc' --exclude '*' third_party/xla/third_party/tsl/ $SRC_DIR/libtensorflow_cc_output/include/
rsync -r --chmod=D777,F666 --include '*/' --include '*' --exclude '*.cc' third_party/ $SRC_DIR/libtensorflow_cc_output/include/third_party/
rsync -r --chmod=D777,F666 --include '*/' --include '*' --exclude '*.txt' bazel-work/external/eigen_archive/Eigen/ $SRC_DIR/libtensorflow_cc_output/include/Eigen/
rsync -r --chmod=D777,F666 --include '*/' --include '*' --exclude '*.txt' bazel-work/external/eigen_archive/unsupported/ $SRC_DIR/libtensorflow_cc_output/include/unsupported/
Expand Down
1 change: 1 addition & 0 deletions recipe/build_estimator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pushd tensorflow-estimator

WHEEL_DIR=${PWD}/wheel_dir
mkdir -p ${WHEEL_DIR}
$RECIPE_DIR/add_py_toolchain.sh
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
Expand Down
6 changes: 4 additions & 2 deletions recipe/cp_libtensorflow_cc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
tar -C ${PREFIX} -xf $SRC_DIR/libtensorflow_cc_output.tar
mkdir -p ${PREFIX}/include/tensorflow/tsl/platform/include
cp float8.h ${PREFIX}/include/tensorflow/tsl/platform/include
mkdir -p ${PREFIX}/include/ml_dtypes/include/
cp float8.h ${PREFIX}/include/ml_dtypes/include/float8.h
cp int4.h ${PREFIX}/include/ml_dtypes/include/int4.h
rsync -av ${PREFIX}/include/external/local_tsl/tsl/ ${PREFIX}/include/tsl