|
17 | 17 | jobs:
|
18 | 18 | build-test:
|
19 | 19 | continue-on-error: true
|
20 |
| - runs-on: linux.g5.48xlarge.nvidia.gpu |
21 |
| - timeout-minutes: 30 |
22 |
| - steps: |
23 |
| - - name: "conda setup" |
24 |
| - run: | |
25 |
| - set -x |
26 |
| - pushd .. |
27 |
| - export base_dir=$(pwd) |
28 |
| - echo $base_dir |
29 |
| - # conda installation + setting up dependencies |
30 |
| - # Miniconda3 script expects to be run from a filename ending in .sh |
31 |
| - export mc3_dir="${base_dir}/miniconda3" |
32 |
| - export mc3_setup_script=$(mktemp -t mc3XXXXX.sh) |
33 |
| - wget -q -O${mc3_setup_script} \ |
34 |
| - https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh |
35 |
| - chmod u+x ${mc3_setup_script} |
36 |
| -
|
37 |
| - export mc3_setup_opts="-b -p ${mc3_dir}" |
38 |
| - # Miniconda setup does not handle existing installations well. |
39 |
| - # Backup existing installation before a clean new install. |
40 |
| - if [ -d "$mc3_dir" ]; then |
41 |
| - bkup_mc3_dir=$(mktemp -u -p $(dirname "$mc3_dir") miniconda3.bkup.XXXX) |
42 |
| - echo "Backing up existing Miniconda3 installation to: ${bkup_mc3_dir}" |
43 |
| - mv $mc3_dir $bkup_mc3_dir |
44 |
| - fi |
45 |
| -
|
46 |
| - sh ${mc3_setup_script} ${mc3_setup_opts} |
47 |
| - ${mc3_dir}/bin/conda config --set default_python 3.11 |
48 |
| - export PATH=${mc3_dir}/bin:$PATH |
49 |
| -
|
50 |
| - # Pass shell name to conda init |
51 |
| - ${mc3_dir}/bin/conda init $(basename ${SHELL}) |
52 |
| - ${mc3_dir}/bin/conda config --set solver classic |
53 |
| - ${mc3_dir}/bin/conda install -y ninja cmake wheel |
54 |
| - sudo dnf groupinstall -y "Development Tools" |
55 |
| - sudo yum install -y zlib-devel |
56 |
| - # zlib-devel to resolve libz.so cannot be found error |
57 |
| - # https://fburl.com/workplace/o8gp4ock |
58 |
| - sudo dnf install zlib-devel libzstd-devel |
59 |
| - ${mc3_dir}/bin/conda config --set solver libmamba |
60 |
| - pushd $base_dir |
61 |
| - - name: "Checkout" |
62 |
| - run: | |
63 |
| - echo "Installing triton" |
64 |
| - git clone https://github.com/triton-lang/triton.git |
65 |
| - pushd triton |
66 |
| - echo "Checking out triton branch or commit" |
67 |
| - git checkout ${{ github.event.inputs.triton_pin || 'main' }} |
68 |
| - export llvm_hash=$(cat cmake/llvm-hash.txt) |
69 |
| - echo "llvm_hash: $llvm_hash" |
70 |
| - pushd .. |
71 |
| - echo "Cloning llvm-project" |
72 |
| - git clone https://github.com/llvm/llvm-project.git |
73 |
| - pushd llvm-project |
74 |
| - echo "Checking out llvm hash" |
75 |
| - git checkout "$llvm_hash" |
76 |
| - mkdir build |
77 |
| - pushd build |
78 |
| - echo "Building llvm" |
79 |
| - - name: "installs" |
80 |
| - run: | |
81 |
| - echo "Installing build-time dependencies" |
82 |
| - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm -DLLVM_ENABLE_PROJECTS="mlir;llvm" -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" |
83 |
| - ninja |
84 |
| - export LLVM_BUILD_DIR=$(pwd) |
85 |
| - popd |
86 |
| - popd |
87 |
| - popd |
88 |
| - LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib LLVM_SYSPATH=$LLVM_BUILD_DIR pip install -e python |
89 |
| - echo "Installing triton python package" |
90 |
| - popd |
91 |
| - - name: "pytorch download" |
92 |
| - run: | |
93 |
| - echo "Cloning pytorch" |
94 |
| - git clone https://github.com/pytorch/pytorch.git |
95 |
| - pushd pytorch |
96 |
| - echo "Checking out pytorch branch or commit" |
97 |
| - git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} |
98 |
| - git submodule sync |
99 |
| - git submodule update --init --recursive |
100 |
| - - name: "post pytorch installs" |
101 |
| - run: | |
102 |
| - pip install -r requirements.txt |
103 |
| - pip install mkl-static mkl-include pytest pytest-xdist |
104 |
| - echo "Installing magma-cuda121" |
105 |
| - conda install -y -c pytorch magma-cuda121 |
106 |
| - python setup.py install |
107 |
| - - name: test |
108 |
| - env: |
109 |
| - gpu-arch-type: cuda |
110 |
| - gpu-arch-version: "12.1" |
111 |
| - # docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 |
112 |
| - run: | |
113 |
| - pytest -n 1 test/inductor/test_torchinductor.py |
114 |
| - - name: "cleanup" |
115 |
| - if: always() |
116 |
| - run: | |
117 |
| - pwd |
118 |
| - pushd .. |
119 |
| - pwd |
120 |
| - ls |
121 |
| - if [ -d triton ]; then |
122 |
| - echo "triton removed" |
123 |
| - rm -r triton |
124 |
| - else |
125 |
| - echo "triton not removed" |
126 |
| - fi |
127 |
| - if [ -d pytorch ]; then |
128 |
| - echo "pytorch removed" |
129 |
| - rm -r pytorch |
130 |
| - else |
131 |
| - echo "pytorch not removed" |
132 |
| - fi |
133 |
| - if [ -d llvm-project ]; then |
134 |
| - echo "llvm-project removed" |
135 |
| - rm -r llvm-project |
136 |
| - else |
137 |
| - echo "llvm not removed" |
138 |
| - fi |
139 |
| - pwd |
140 |
| - ls |
| 20 | + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main |
| 21 | + with: |
| 22 | + runner: linux.g5.48xlarge.nvidia.gpu |
| 23 | + gpu-arch-type: cuda |
| 24 | + gpu-arch-version: "12.1" |
| 25 | + timeout: 360 |
| 26 | + # docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 |
| 27 | + script: | |
| 28 | + set -x |
| 29 | + pushd .. |
| 30 | + echo "Installing triton" |
| 31 | + git clone https://github.com/triton-lang/triton.git |
| 32 | + pushd triton |
| 33 | + echo "Checking out triton branch or commit" |
| 34 | + git checkout ${{ github.event.inputs.triton_pin || 'main' }} |
| 35 | + sudo yum install -y zlib-devel |
| 36 | + echo "Installing build-time dependencies" |
| 37 | + pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0 |
| 38 | + export llvm_hash=$(cat cmake/llvm-hash.txt) |
| 39 | + echo "llvm_hash: $llvm_hash" |
| 40 | + pip install -e python |
| 41 | + pushd .. |
| 42 | + echo "Cloning pytorch" |
| 43 | + git clone https://github.com/pytorch/pytorch.git |
| 44 | + pushd pytorch |
| 45 | + echo "Checking out pytorch branch or commit" |
| 46 | + git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} |
| 47 | + git submodule sync |
| 48 | + git submodule update --init --recursive |
| 49 | + pip install -r requirements.txt |
| 50 | + pip install mkl-static mkl-include pytest pytest-xdist |
| 51 | + echo "Installing magma-cuda121" |
| 52 | + conda install -y -c pytorch magma-cuda121 |
| 53 | + python setup.py install |
| 54 | + pip freeze |
| 55 | + pytest -n 1 test/inductor/test_torchinductor.py |
0 commit comments