8000 Merge branch 'master' of github.com:pytorch/pytorch into UCC_sequence… · pytorch/pytorch@79b3554 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79b3554

Browse files
committed
Merge branch 'master' of github.com:pytorch/pytorch into UCC_sequence_number_support
2 parents 0fa204d + dde43d0 commit 79b3554

File tree

484 files changed

+12777
-11060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

484 files changed

+12777
-11060
lines changed

.circleci/config.yml

Lines changed: 105 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/docker/centos-rocm/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ ARG ROCM_VERSION
7171
COPY ./common/install_rocm.sh install_rocm.sh
7272
RUN bash ./install_rocm.sh
7373
RUN rm install_rocm.sh
74+
COPY ./common/install_rocm_magma.sh install_rocm_magma.sh
75+
RUN bash ./install_rocm_magma.sh
76+
RUN rm install_rocm_magma.sh
7477
ENV PATH /opt/rocm/bin:$PATH
7578
ENV PATH /opt/rocm/hcc/bin:$PATH
7679
ENV PATH /opt/rocm/hip/bin:$PATH

.circleci/docker/common/install_rocm.sh

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,6 @@
22

33
set -ex
44

5-
install_magma() {
6-
# "install" hipMAGMA into /opt/rocm/magma by copying after build
7-
git clone https://bitbucket.org/icl/magma.git
8-
pushd magma
9-
# Fixes memory leaks of magma found while executing linalg UTs
10-
git checkout 5959b8783e45f1809812ed96ae762f38ee701972
11-
cp make.inc-examples/make.inc.hip-gcc-mkl make.inc
12-
echo 'LIBDIR += -L$(MKLROOT)/lib' >> make.inc
13-
echo 'LIB += -Wl,--enable-new-dtags -Wl,--rpath,/opt/rocm/lib -Wl,--rpath,$(MKLROOT)/lib -Wl,--rpath,/opt/rocm/magma/lib' >> make.inc
14-
echo 'DEVCCFLAGS += --gpu-max-threads-per-block=256' >> make.inc
15-
export PATH="${PATH}:/opt/rocm/bin"
16-
if [[ -n "$PYTORCH_ROCM_ARCH" ]]; then
17-
amdgpu_targets=`echo $PYTORCH_ROCM_ARCH | sed 's/;/ /g'`
18-
else
19-
amdgpu_targets=`rocm_agent_enumerator | grep -v gfx000 | sort -u | xargs`
20-
fi
21-
for arch in $amdgpu_targets; do
22-
echo "DEVCCFLAGS += --amdgpu-target=$arch" >> make.inc
23-
done
24-
# hipcc with openmp flag may cause isnan() on __device__ not to be found; depending on context, compiler may attempt to match with host definition
25-
sed -i 's/^FOPENMP/#FOPENMP/g' make.inc
26-
make -f make.gen.hipMAGMA -j $(nproc)
27-
LANG=C.UTF-8 make lib/libmagma.so -j $(nproc) MKLROOT=/opt/conda
28-
make testing/testing_dgemm -j $(nproc) MKLROOT=/opt/conda
29-
popd
30-
mv magma /opt/rocm
31-
}
32-
335
ver() {
346
printf "%3d%03d%03d%03d" $(echo "$1" | tr '.' ' ');
357
}
@@ -89,8 +61,6 @@ install_ubuntu() {
8961
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated ${MIOPENKERNELS}
9062
fi
9163

92-
install_magma
93-
9464
# Cleanup
9565
apt-get autoclean && apt-get clean
9666
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -135,8 +105,6 @@ install_centos() {
135105
rocprofiler-dev \
136106
roctracer-dev
137107

138-
install_magma
139-
140108
# Cleanup
141109
yum clean all
142110
rm -rf /var/cache/yum
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
# "install" hipMAGMA into /opt/rocm/magma by copying after build
6+
git clone https://bitbucket.org/icl/magma.git
7+
pushd magma
8+
# Fixes memory leaks of magma found while executing linalg UTs
9+
git checkout 5959b8783e45f1809812ed96ae762f38ee701972
10+
cp make.inc-examples/make.inc.hip-gcc-mkl make.inc
11+
echo 'LIBDIR += -L$(MKLROOT)/lib' >> make.inc
12+
echo 'LIB += -Wl,--enable-new-dtags -Wl,--rpath,/opt/rocm/lib -Wl,--rpath,$(MKLROOT)/lib -Wl,--rpath,/opt/rocm/magma/lib' >> make.inc
13+
echo 'DEVCCFLAGS += --gpu-max-threads-per-block=256' >> make.inc
14+
export PATH="${PATH}:/opt/rocm/bin"
15+
if [[ -n "$PYTORCH_ROCM_ARCH" ]]; then
16+
amdgpu_targets=`echo $PYTORCH_ROCM_ARCH | sed 's/;/ /g'`
17+
else
18+
amdgpu_targets=`rocm_agent_enumerator | grep -v gfx000 | sort -u | xargs`
19+
fi
20+
for arch in $amdgpu_targets; do
21+
echo "DEVCCFLAGS += --amdgpu-target=$arch" >> make.inc
22+
done
23+
# hipcc with openmp flag may cause isnan() on __device__ not to be found; depending on context, compiler may attempt to match with host definition
24+
sed -i 's/^FOPENMP/#FOPENMP/g' make.inc
25+
make -f make.gen.hipMAGMA -j $(nproc)
26+
LANG=C.UTF-8 make lib/libmagma.so -j $(nproc) MKLROOT=/opt/conda
27+
make testing/testing_dgemm -j $(nproc) MKLROOT=/opt/conda
28+
popd
29+
mv magma /opt/rocm

.circleci/docker/requirements-ci.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ numba==0.55.2 ; python_version == "3.10"
124124
#Pinned versions: 1.9.0
125125
#test that import:
126126

127+
opt-einsum==3.3
128+
#Description: Python library to optimize tensor contraction order, used in einsum
129+
#Pinned versions: 3.3
130+
#test that import: test_linalg.py
131+
127132
#pillow
128133
#Description: Python Imaging Library fork
129134
#Pinned versions:

.circleci/docker/ubuntu-rocm/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ ARG ROCM_VERSION
6464
COPY ./common/install_rocm.sh install_rocm.sh
6565
RUN bash ./install_rocm.sh
6666
RUN rm install_rocm.sh
67+
COPY ./common/install_rocm_magma.sh install_rocm_magma.sh
68+
RUN bash ./install_rocm_magma.sh
69+
RUN rm install_rocm_magma.sh
6770
ENV PATH /opt/rocm/bin:$PATH
6871
ENV PATH /opt/rocm/hcc/bin:$PATH
6972
ENV PATH /opt/rocm/hip/bin:$PATH

.circleci/generate_config_yml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def gen_build_workflows_tree():
143143
cimodel.data.simple.mobile_definitions.get_workflow_jobs,
144144
cimodel.data.simple.nightly_ios.get_workflow_jobs,
145145
cimodel.data.simple.anaconda_prune_defintions.get_workflow_jobs,
146-
# cimodel.data.simple.macos_definitions.get_new_workflow_jobs,
147-
# cimodel.data.simple.upload_test_stats_definition.get_workflow_job,
148-
# cimodel.data.simple.ios_definitions.get_workflow_jobs,
146+
cimodel.data.simple.macos_definitions.get_new_workflow_jobs,
147+
cimodel.data.simple.upload_test_stats_definition.get_workflow_job,
148+
cimodel.data.simple.ios_definitions.get_workflow_jobs,
149149
]
150150
build_jobs = [f() for f in build_workflows_functions]
151151
build_jobs.extend(

.circleci/scripts/binary_ios_test.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
#!/bin/bash
22
set -ex -o pipefail
33

4+
if ! [ "$IOS_PLATFORM" == "SIMULATOR" ]; then
5+
exit 0
6+
fi
7+
48
echo ""
59
echo "DIR: $(pwd)"
610
PROJ_ROOT=/Users/distiller/project
711
cd ${PROJ_ROOT}/ios/TestApp
812
# install fastlane
913
sudo gem install bundler && bundle install
10-
# install certificates
11-
echo "${IOS_CERT_KEY_2022}" >> cert.txt
12-
base64 --decode cert.txt -o Certificates.p12
13-
rm cert.txt
14-
bundle exec fastlane install_root_cert
15-
bundle exec fastlane install_dev_cert
16-
# install the provisioning profile
17-
PROFILE=PyTorch_CI_2022.mobileprovision
18-
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
19-
mkdir -pv "${PROVISIONING_PROFILES}"
20-
cd "${PROVISIONING_PROFILES}"
21-
echo "${IOS_SIGN_KEY_2022}" >> cert.txt
22-
base64 --decode cert.txt -o ${PROFILE}
23-
rm cert.txt
2414
# run the ruby build script
2515
if ! [ -x "$(command -v xcodebuild)" ]; then
2616
echo 'Error: xcodebuild is not installed.'
2717
exit 1
2818
fi
29-
PROFILE=PyTorch_CI_2022
30-
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM} -c ${PROFILE} -t ${IOS_DEV_TEAM_ID}
19+
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM}

.circleci/scripts/binary_upload.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ UPLOAD_CHANNEL=${UPLOAD_CHANNEL:-nightly}
1414
UPLOAD_SUBFOLDER=${UPLOAD_SUBFOLDER:-cpu}
1515
UPLOAD_BUCKET="s3://pytorch"
1616
BACKUP_BUCKET="s3://pytorch-backup"
17+
BUILD_NAME=${BUILD_NAME:-}
18+
19+
# this is temporary change to upload pypi-cudnn builds to separate folder
20+
if [[ ${BUILD_NAME} == *with-pypi-cudnn* ]]; then
21+
UPLOAD_SUBFOLDER="${UPLOAD_SUBFOLDER}_pypi_cudnn"
22+
fi
1723

1824
DRY_RUN=${DRY_RUN:-enabled}
1925
# Don't actually do work unless explicit
@@ -26,7 +32,7 @@ fi
2632

2733
# Sleep 2 minutes between retries for conda upload
2834
retry () {
29-
"$@" || (sleep 2m && "$@") || (sleep 2m && "$@")
35+
"$@" || (sleep 5m && "$@") || (sleep 5m && "$@") || (sleep 5m && "$@") || (sleep 5m && "$@")
3036
}
3137

3238
do_backup() {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# =================== The following code **should** be executed inside Docker container ===================
2+
3+
# Install dependencies
4+
sudo apt-get -y update
5+
sudo apt-get -y install expect-dev
6+
7+
# This is where the local pytorch install in the docker image is located
8+
pt_checkout="/var/lib/jenkins/workspace"
9+
source "$pt_checkout/.jenkins/pytorch/common_utils.sh"
10+
echo "functorch_doc_push_script.sh: Invoked with $*"
11+
12+
set -ex
13+
14+
version=${DOCS_VERSION:-nightly}
15+
echo "version: $version"
16+
17+
# Build functorch docs
18+
pushd $pt_checkout/functorch/docs
19+
pip -q install -r requirements.txt
20+
make html
21+
popd
22+
23+
git clone https://github.com/pytorch/functorch -b gh-pages --depth 1 functorch_ghpages
24+
pushd functorch_ghpages
25+
26+
if [ $version == "master" ]; then
27+
version=nightly
28+
fi
29+
30+
git rm -rf "$version" || true
31+
mv "$pt_checkout/functorch/docs/build/html" "$version"
32+
33+
git add "$version" || true
34+
git status
35+
git config user.email "soumith+bot@pytorch.org"
36+
git config user.name "pytorchbot"
37+
# If there aren't changes, don't make a commit; push is no-op
38+
git commit -m "Generate Python docs from pytorch/pytorch@${GITHUB_SHA}" || true
39+
git status
40+
41+
if [[ "${WITH_PUSH:-}" == true ]]; then
42+
git push -u origin gh-pages
43+
fi
44+
45+
popd
46+
# =================== The above code **should** be executed inside Docker container ===================

0 commit comments

Comments
 (0)
0