File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments