mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/166730 Approved by: https://github.com/jeffdaily Co-authored-by: Jeff Daily <jeff.daily@amd.com>
38 lines
1015 B
Bash
38 lines
1015 B
Bash
#!/usr/bin/env bash
|
|
# Script used only in CD pipeline
|
|
|
|
set -eou pipefail
|
|
|
|
function do_install() {
|
|
rocm_version=$1
|
|
if [[ ${rocm_version} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
# chop off any patch version
|
|
rocm_version="${rocm_version%.*}"
|
|
fi
|
|
|
|
rocm_version_nodot=${rocm_version//./}
|
|
|
|
# post merge of https://github.com/icl-utk-edu/magma/pull/65
|
|
MAGMA_VERSION=c0792ae825fb36872784892ea643dd6f3456bc5f
|
|
magma_archive="magma-rocm${rocm_version_nodot}-${MAGMA_VERSION}-1.tar.bz2"
|
|
|
|
rocm_dir="/opt/rocm"
|
|
(
|
|
set -x
|
|
tmp_dir=$(mktemp -d)
|
|
pushd ${tmp_dir}
|
|
curl -OLs https://ossci-linux.s3.us-east-1.amazonaws.com/${magma_archive}
|
|
if tar -xvf "${magma_archive}"
|
|
then
|
|
mkdir -p "${rocm_dir}/magma"
|
|
mv include "${rocm_dir}/magma/include"
|
|
mv lib "${rocm_dir}/magma/lib"
|
|
else
|
|
echo "${magma_archive} not found, skipping magma install"
|
|
fi
|
|
popd
|
|
)
|
|
}
|
|
|
|
do_install $1
|