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

tools: mirror pytorch-triton-rocm #3804

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions tools/mirror-pypi/mirror_pytorch_triton_rocm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash

############################################################################
#
# Upload versions of pytorch-triton-rocm to download.pytorch.org
#
# Usage:
# bash mirror_pytorch_triton_rocm.sh
#
############################################################################

set -eou pipefail

VERSION=${VERSION:-2.0.0.dev20230218}
TMPDIR=$(mktemp -d)

trap 'rm -rf ${TMPDIR};' EXIT

(
pushd "${TMPDIR}" >/dev/null
for abi in 37m 38 39 310 311; do
weiwangmeta marked this conversation as resolved.
Show resolved Hide resolved
(
echo -n "+ Downloading py${abi/m/}..."
pip download \
--quiet \
--pre \
--platform manylinux2014_x86_64 \
--python-version ${abi/m/} \
--abi "cp${abi}" \
--no-deps \
"pytorch-triton-rocm==${VERSION}"
echo "done"
)
done
popd >/dev/null
)

echo

# Dry run by default
DRY_RUN=${DRY_RUN:-enabled}
DRY_RUN_FLAG="--dryrun"
if [[ $DRY_RUN = "disabled" ]]; then
DRY_RUN_FLAG=""
fi
BASE_BUCKET=${BASE_BUCKET:-s3://pytorch/whl}

for channel in test nightly; do
echo "+ Uploading whls to ${BASE_BUCKET}/${channel}/"
(
set -x
aws s3 sync \
${DRY_RUN_FLAG} \
--only-show-errors \
--acl public-read \
${TMPDIR}/ \
"${BASE_BUCKET}/${channel}/"
)
done