@@ -20,7 +20,7 @@ while getopts "hrn" opt; do
20
20
restriction=true
21
21
;;
22
22
n)
23
- nightly=true
23
+ nightly=true
24
24
esac
25
25
done
26
26
shift " $(( OPTIND- 1 )) "
47
47
fi
48
48
49
49
if [ -f /usertools/rocm.bazelrc ]; then
50
- # Use the bazelrc files in /usertools if available
51
- TF_PKG_LOC=bazel-bin/tensorflow/tools/pip_package/wheel_house
52
- if [[ -n $nightly ]]; then
53
- # Remove any previous builds and build nightly
54
- rm -f $TF_PKG_LOC /tf_nightly_rocm* .whl
55
- export project_name=tf_nightly_rocm
56
- python3 tensorflow/tools/ci_build/update_version.py --nightly --rocm_version &&
57
- 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 &&
58
- pip3 install --upgrade $TF_PKG_LOC /tf_nightly_rocm* .whl
59
- else
60
- # Remove any previous builds and build release
61
- rm -f $TF_PKG_LOC /tensorflow* .whl
62
- python3 tensorflow/tools/ci_build/update_version.py --rocm_version &&
63
- 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 &&
64
- pip3 install --upgrade $TF_PKG_LOC /tensorflow* .whl
65
- fi
50
+ # Use the bazelrc files in /usertools if available
51
+ # Also, this is likely a tensorflow-build container so put the whl in /tf/pkg
52
+ TF_PKG_LOC=/tf/pkg
53
+ # Remove any previous builds and build nightly
54
+ rm -f $TF_PKG_LOC /tensorflow* .whl
55
+ python3 tensorflow/tools/ci_build/update_version.py --nightly --rocm_version &&
56
+ bazel --bazelrc=/usertools/rocm.bazelrc build $RESOURCE_OPTION --config=rocm --action_env=TF_PYTHON_VERSION=$PYTHON_VERSION tensorflow/tools/pip_package:wheel --verbose_failures &&
57
+ cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tensorflow* .whl $TF_PKG_LOC / &&
58
+ pip3 install --upgrade $TF_PKG_LOC /tensorflow* .whl
66
59
else
67
- # Legacy style: run configure then build
68
- TF_PKG_LOC=bazel-bin/tensorflow/tools/pip_package/wheel_house
69
- yes " " | TF_NEED_CLANG=0 ROCM_PATH=$ROCM_INSTALL_DIR TF_NEED_ROCM=1 PYTHON_BIN_PATH=/usr/bin/python3 ./configure &&
70
- if [[ -n $nightly ]]; then
71
- # Remove any previous builds and build nightly
72
- rm -f $TF_PKG_LOC /tf_nightly_rocm* .whl
73
- 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 &&
74
- pip3 install --upgrade $TF_PKG_LOC /tf_nightly_rocm* .whl
75
- else
76
- # Remove any previous builds and build release
77
- rm -f $TF_PKG_LOC /tensorflow* .whl
78
- 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 &&
79
- pip3 install --upgrade $TF_PKG_LOC /tensorflow* .whl
80
- fi
60
+ # Legacy style: run configure then build
61
+ TF_PKG_LOC=/tmp/tensorflow_pkg
62
+ yes " " | TF_NEED_CLANG=0 ROCM_PATH=$ROCM_INSTALL_DIR TF_NEED_ROCM=1 PYTHON_BIN_PATH=/usr/bin/python3 ./configure &&
63
+ # Remove any previous builds and build nightly
64
+ rm -f $TF_PKG_LOC /tensorflow* .whl
65
+ bazel build $RESOURCE_OPTION --config=opt --config=rocm //tensorflow/tools/pip_package:wheel --verbose_failures &&
66
+ cp ./bazel-bin/tensorflow/tools/pip_package/wheel_house/tensorflow* .whl $TF_PKG_LOC / &&
67
+ pip3 install --upgrade $TF_PKG_LOC /tf_nightly_rocm* .whl
81
68
fi
0 commit comments