File: prepare_e2e.sh

package info (click to toggle)
pytorch 1.13.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 139,252 kB
  • sloc: cpp: 1,100,274; python: 706,454; ansic: 83,052; asm: 7,618; java: 3,273; sh: 2,841; javascript: 612; makefile: 323; xml: 269; ruby: 185; yacc: 144; objc: 68; lex: 44
file content (66 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#! /bin/bash
set -e

if [ -z "${PYTORCH_REPO_PATH}" ]; then
  echo "Please specify \`PYTORCH_REPO_PATH\`"
  exit 1
fi

cd "${PYTORCH_REPO_PATH}"

# Helper function to manage conda environments.
make_clean_env(){
    ENV_NAME="$1"

    # Cleanup prior if it exists
    conda env remove --name "${ENV_NAME}" 2> /dev/null || true

    conda create -yn "${ENV_NAME}" python=3
    source activate "${ENV_NAME}"
    conda install -y numpy ninja pyyaml mkl mkl-include setuptools cmake cffi hypothesis
    conda install -y -c pytorch magma-cuda102
    conda deactivate
}

make_clean_env ref_39850
make_clean_env pr_39850
make_clean_env ref_39967
make_clean_env pr_39967
make_clean_env ref_39744
make_clean_env pr_39744

git submodule update --init --recursive --jobs 0
wget https://github.com/pytorch/pytorch/pull/39850.diff
wget https://github.com/pytorch/pytorch/pull/39744.diff

source activate ref_39850
git checkout 766889b6bfeb9802f892fa0782d629554b2c71b4
python setup.py install
conda deactivate

source activate pr_39850
git apply 39850.diff
python setup.py install
git checkout .
conda deactivate

source activate ref_39967
git checkout c4fc278fa8cbd0fb45b8130a679c62f673087484
python setup.py install
conda deactivate

source activate pr_39967
git checkout 7a3c223bbb711c7a93910ce406a0126b8000b43b
python setup.py install
conda deactivate

source activate ref_39744
git checkout 541814f2b7eacabacdc87ccb1b4495bf486f501a
python setup.py install
conda deactivate

source activate pr_39744
git apply 39744.diff
python setup.py install
git checkout .
conda deactivate