Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfurmanek committed Jul 10, 2024
1 parent 090f58e commit f269324
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions build_rocm_python3
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ while getopts "hrn" opt; do
done
shift "$((OPTIND-1))"

# This is not a release branch, so force a nightly build
# TODO remove this when branching for release
nightly=true

# First positional argument (if any) specifies the ROCM_INSTALL_DIR
ROCM_INSTALL_DIR=/opt/rocm-6.1.1
ROCM_INSTALL_DIR=/opt/rocm-6.2.0
if [[ -n $1 ]]; then
ROCM_INSTALL_DIR=$1
fi
Expand All @@ -55,15 +51,13 @@ if [ -f /usertools/rocm.bazelrc ]; then
rm -f $TF_PKG_LOC/tf_nightly_rocm*.whl
export project_name=tf_nightly_rocm
python3 tensorflow/tools/ci_build/update_version.py --nightly --rocm_version &&
bazel --bazelrc=/usertools/rocm.bazelrc build $RESOURCE_OPTION --config=rocm --repo_env=WHEEL_NAME=tf_nightly_rocm --action_env=project_name=tf_nightly_rocm --action_env=TF_PYTHON_VERSION=$PYTHON_VERSION tensorflow/tools/pip_package:wheel --verbose_failures &&
cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tf_nightly_rocm*.whl $TF_PKG_LOC/ &&
bazel --bazelrc=/usertools/rocm.bazelrc build $RESOURCE_OPTION --config=rocm --repo_env=WHEEL_NAME=tf_nightly_rocm --repo_env=OUTPUT_PATH=$TF_PKG_LOC --action_env=project_name=tf_nightly_rocm --action_env=TF_PYTHON_VERSION=$PYTHON_VERSION tensorflow/tools/pip_package:wheel --verbose_failures &&
pip3 install --upgrade $TF_PKG_LOC/tf_nightly_rocm*.whl
else
# Remove any previous builds and build release
rm -f $TF_PKG_LOC/tensorflow*.whl
python3 tensorflow/tools/ci_build/update_version.py --rocm_version &&
bazel --bazelrc=/usertools/rocm.bazelrc build $RESOURCE_OPTION --config=rocm --repo_env=WHEEL_NAME=tensorflow_rocm --action_env=project_name=tensorflow_rocm --action_env=TF_PYTHON_VERSION=$PYTHON_VERSION tensorflow/tools/pip_package:wheel --verbose_failures &&
cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tensorflow*.whl $TF_PKG_LOC/ &&
bazel --bazelrc=/usertools/rocm.bazelrc build $RESOURCE_OPTION --config=rocm --repo_env=WHEEL_NAME=tensorflow_rocm --repo_env=OUTPUT_PATH=$TF_PKG_LOC --action_env=project_name=tensorflow_rocm --action_env=TF_PYTHON_VERSION=$PYTHON_VERSION tensorflow/tools/pip_package:wheel --verbose_failures &&
pip3 install --upgrade $TF_PKG_LOC/tensorflow*.whl
fi
else
Expand All @@ -73,14 +67,12 @@ else
if [[ -n $nightly ]]; then
# Remove any previous builds and build nightly
rm -f $TF_PKG_LOC/tf_nightly_rocm*.whl
bazel build $RESOURCE_OPTION --config=opt --config=rocm --repo_env=WHEEL_NAME=tf_nightly_rocm --action_env=project_name=tf_nightly_rocm //tensorflow/tools/pip_package:wheel --verbose_failures &&
cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tf_nightly_rocm*.whl $TF_PKG_LOC/ &&
bazel build $RESOURCE_OPTION --config=opt --config=rocm --repo_env=WHEEL_NAME=tf_nightly_rocm --repo_env=OUTPUT_PATH=$TF_PKG_LOC --action_env=project_name=tf_nightly_rocm //tensorflow/tools/pip_package:wheel --verbose_failures &&
pip3 install --upgrade $TF_PKG_LOC/tf_nightly_rocm*.whl
else
# Remove any previous builds and build release
rm -f $TF_PKG_LOC/tensorflow*.whl
bazel build $RESOURCE_OPTION --config=opt --config=rocm --repo_env=WHEEL_NAME=tensorflow_rocm --action_env=project_name=tensorflow_rocm //tensorflow/tools/pip_package:wheel --verbose_failures &&
cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tensorflow*.whl $TF_PKG_LOC/ &&
bazel build $RESOURCE_OPTION --config=opt --config=rocm --repo_env=WHEEL_NAME=tensorflow_rocm --repo_env=OUTPUT_PATH=$TF_PKG_LOC --action_env=project_name=tensorflow_rocm //tensorflow/tools/pip_package:wheel --verbose_failures &&
pip3 install --upgrade $TF_PKG_LOC/tensorflow*.whl
fi
fi

0 comments on commit f269324

Please sign in to comment.