Skip to content

Commit c2d6c9a

Browse files
committed
tools: mirror pytorch-triton-rocm
Signed-off-by: Eli Uriegas <[email protected]>
1 parent c5cc7e3 commit c2d6c9a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
3+
############################################################################
4+
#
5+
# Upload versions of pytorch-triton-rocm to download.pytorch.org
6+
#
7+
# Usage:
8+
# bash mirror_pytorch_triton_rocm.sh
9+
#
10+
############################################################################
11+
12+
set -eou pipefail
13+
14+
VERSION=${VERSION:-2.0.0.dev20230218}
15+
TMPDIR=$(mktemp -d)
16+
17+
trap 'rm -rf ${TMPDIR};' EXIT
18+
19+
(
20+
pushd "${TMPDIR}" >/dev/null
21+
for abi in 37m 38 39 310 311; do
22+
(
23+
echo -n "+ Downloading py${abi/m/}..."
24+
pip download \
25+
--quiet \
26+
--pre \
27+
--platform manylinux2014_x86_64 \
28+
--python-version ${abi/m/} \
29+
--abi "cp${abi}" \
30+
--no-deps \
31+
"pytorch-triton-rocm==${VERSION}"
32+
echo "done"
33+
)
34+
done
35+
popd >/dev/null
36+
)
37+
38+
echo
39+
40+
# Dry run by default
41+
DRY_RUN=${DRY_RUN:-enabled}
42+
DRY_RUN_FLAG="--dryrun"
43+
if [[ $DRY_RUN = "disabled" ]]; then
44+
DRY_RUN_FLAG=""
45+
fi
46+
BASE_BUCKET=${BASE_BUCKET:-s3://pytorch/whl}
47+
48+
for channel in test nightly; do
49+
echo "+ Uploading whls to ${BASE_BUCKET}/${channel}/"
50+
(
51+
set -x
52+
aws s3 sync \
53+
${DRY_RUN_FLAG} \
54+
--only-show-errors \
55+
--acl public-read \
56+
${TMPDIR}/ \
57+
"${BASE_BUCKET}/${channel}/"
58+
)
59+
done

0 commit comments

Comments
 (0)