From bac0d190c64d5230a4a00942d03cb90d0d48ea44 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 7 Aug 2024 15:06:39 -0700 Subject: [PATCH 01/31] inductor workflow --- .github/workflows/inductor.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/inductor.yml diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml new file mode 100644 index 0000000..d36a1cb --- /dev/null +++ b/.github/workflows/inductor.yml @@ -0,0 +1,30 @@ +name: Test build/test linux gpu + +on: + pull_request: + +jobs: + build-test: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + runner: linux.4xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "11.6" + script: | + pushd .. + # install triton + git clone git@github.com:triton-lang/triton.git + pushd triton + pip install ninja cmake wheel; # build-time dependencies + pip install -e python + git clone git@github.com:pytorch/pytorch.git + pushd pytorch + git submodule sync + git submodule update --init --recursive + pip install -r requirements.txt + pip install mkl-static mkl-include + # CUDA only: Add LAPACK support for the GPU if needed + conda install -c pytorch magma-cuda121 + python setup.py install + pytest test/inductor + \ No newline at end of file From 67ca80094c8724a688fe3f75dc4cefe94c40d438 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 7 Aug 2024 15:20:55 -0700 Subject: [PATCH 02/31] stuff --- .github/workflows/inductor.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index d36a1cb..df24c79 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -27,4 +27,11 @@ jobs: conda install -c pytorch magma-cuda121 python setup.py install pytest test/inductor - \ No newline at end of file + + build-test-cpu: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + script: | + pip install -r requirements.txt + python setup.py develop + make test \ No newline at end of file From aa8260e01284444370bd7fb70ab3409a6dcd4ed8 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 7 Aug 2024 15:23:58 -0700 Subject: [PATCH 03/31] stuff --- .github/workflows/inductor.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index df24c79..42baa44 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -32,6 +32,15 @@ jobs: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: script: | + pushd .. + # install triton + git clone git@github.com:pytorch/pytorch.git + ls + pushd pytorch + ls + git submodule sync + git submodule update --init --recursive + ls pip install -r requirements.txt - python setup.py develop - make test \ No newline at end of file + python setup.py install + pytest test/inductor \ No newline at end of file From 2a32c01d6c30761832ec4ee942e579ea328794e0 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 7 Aug 2024 16:20:03 -0700 Subject: [PATCH 04/31] stuff --- .github/workflows/inductor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 42baa44..1592f94 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -26,7 +26,7 @@ jobs: # CUDA only: Add LAPACK support for the GPU if needed conda install -c pytorch magma-cuda121 python setup.py install - pytest test/inductor + # pytest test/inductor build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main @@ -43,4 +43,4 @@ jobs: ls pip install -r requirements.txt python setup.py install - pytest test/inductor \ No newline at end of file + # pytest test/inductor \ No newline at end of file From 1ba6d10152446e8d6e7f77638192ce142f0c7fb3 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 7 Aug 2024 16:45:52 -0700 Subject: [PATCH 05/31] stuff --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 1592f94..d5f991c 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -9,7 +9,7 @@ jobs: with: runner: linux.4xlarge.nvidia.gpu gpu-arch-type: cuda - gpu-arch-version: "11.6" + gpu-arch-version: "12.1" script: | pushd .. # install triton From ffc828cd368fdb2b6b53178f0122cdac85166279 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 13 Aug 2024 11:47:28 -0700 Subject: [PATCH 06/31] lint fix --- .github/workflows/inductor.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index d5f991c..3dcdb12 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -33,14 +33,20 @@ jobs: with: script: | pushd .. + echo "Installing triton..." "hello" # install triton git clone git@github.com:pytorch/pytorch.git + echo "Checking directory..." "hello" ls pushd pytorch + echo "Checking submodule..." "hello" ls git submodule sync + echo "Updating submodule..." "hello" + ls git submodule update --init --recursive + echo "Installing requirements..." "hello" ls pip install -r requirements.txt - python setup.py install + # python setup.py install # pytest test/inductor \ No newline at end of file From 82d23fa72465ef6613bbcd6140a1e049b9f49dcc Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 13 Aug 2024 16:21:28 -0700 Subject: [PATCH 07/31] lint fix --- .github/workflows/inductor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 3dcdb12..7eb54fb 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -10,6 +10,7 @@ jobs: runner: linux.4xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "12.1" + timeout: 240 script: | pushd .. # install triton @@ -26,10 +27,11 @@ jobs: # CUDA only: Add LAPACK support for the GPU if needed conda install -c pytorch magma-cuda121 python setup.py install - # pytest test/inductor + pytest test/inductor build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + timeout: 240 with: script: | pushd .. @@ -48,5 +50,5 @@ jobs: echo "Installing requirements..." "hello" ls pip install -r requirements.txt - # python setup.py install + python setup.py install # pytest test/inductor \ No newline at end of file From 097c32ff5b54e9255fcae8d492a3c635159ebdaf Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 14 Aug 2024 10:29:48 -0700 Subject: [PATCH 08/31] lint fix --- .github/workflows/inductor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 7eb54fb..7fc48ba 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,10 +29,11 @@ jobs: python setup.py install pytest test/inductor + build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - timeout: 240 with: + timeout: 240 script: | pushd .. echo "Installing triton..." "hello" From 4b910cb61e85aae99d895d3381ca963e494c811a Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 14 Aug 2024 10:29:52 -0700 Subject: [PATCH 09/31] lint fix --- .github/workflows/inductor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 7fc48ba..cffb159 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,7 +29,6 @@ jobs: python setup.py install pytest test/inductor - build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: From 3113537827595a5f7158daa57b116f5010dfabc1 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 15 Aug 2024 10:58:19 -0700 Subject: [PATCH 10/31] lint fix --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index cffb159..a5c33a8 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -32,7 +32,7 @@ jobs: build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - timeout: 240 + timeout: 240 script: | pushd .. echo "Installing triton..." "hello" From d0c1cdba107c18f55f93cded7a19821da13216d4 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 15 Aug 2024 16:15:04 -0700 Subject: [PATCH 11/31] lint fix --- .github/workflows/inductor.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index a5c33a8..eea39ce 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -12,13 +12,14 @@ jobs: gpu-arch-version: "12.1" timeout: 240 script: | + set -x pushd .. # install triton - git clone git@github.com:triton-lang/triton.git + git clone https://github.com:triton-lang/triton.git pushd triton pip install ninja cmake wheel; # build-time dependencies pip install -e python - git clone git@github.com:pytorch/pytorch.git + git clone https://github.com/pytorch/pytorch.git pushd pytorch git submodule sync git submodule update --init --recursive @@ -34,10 +35,11 @@ jobs: with: timeout: 240 script: | + set -x pushd .. echo "Installing triton..." "hello" # install triton - git clone git@github.com:pytorch/pytorch.git + git clone https://github.com/pytorch/pytorch.git echo "Checking directory..." "hello" ls pushd pytorch From 3325a62278e5743379892fe663c7ca22f2376ccc Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Fri, 16 Aug 2024 11:44:35 -0700 Subject: [PATCH 12/31] fix script --- .github/workflows/inductor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index eea39ce..1937362 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -15,7 +15,7 @@ jobs: set -x pushd .. # install triton - git clone https://github.com:triton-lang/triton.git + git clone https://github.com/triton-lang/triton.git pushd triton pip install ninja cmake wheel; # build-time dependencies pip install -e python @@ -53,4 +53,4 @@ jobs: ls pip install -r requirements.txt python setup.py install - # pytest test/inductor \ No newline at end of file + pytest test/inductor \ No newline at end of file From 8fc433c523cf3be42bd7f8f99d8c5f218ca79a46 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Fri, 16 Aug 2024 12:59:23 -0700 Subject: [PATCH 13/31] lint fix --- .github/workflows/inductor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 1937362..81ee656 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -17,14 +17,15 @@ jobs: # install triton git clone https://github.com/triton-lang/triton.git pushd triton - pip install ninja cmake wheel; # build-time dependencies + pip install ninja cmake wheel # build-time dependencies + sleep 1000 pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch git submodule sync git submodule update --init --recursive pip install -r requirements.txt - pip install mkl-static mkl-include + pip install mkl-static mkl-include pytest # CUDA only: Add LAPACK support for the GPU if needed conda install -c pytorch magma-cuda121 python setup.py install @@ -52,5 +53,6 @@ jobs: echo "Installing requirements..." "hello" ls pip install -r requirements.txt + pip install pytest python setup.py install pytest test/inductor \ No newline at end of file From 98895bfab71236afb9af68bd37e7607b540ffa24 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 20 Aug 2024 13:23:18 -0700 Subject: [PATCH 14/31] lint fix --- .github/workflows/inductor.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 81ee656..78a0551 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -2,6 +2,16 @@ name: Test build/test linux gpu on: pull_request: + workflow_dispatch: + inputs: + triton_pin: + description: 'Triton branch or commit to pin' + default: 'main' + required: false + pytorch_pin: + description: 'PyTorch branch or commit to pin' + default: 'main' + required: false jobs: build-test: @@ -17,11 +27,13 @@ jobs: # install triton git clone https://github.com/triton-lang/triton.git pushd triton + git checkout ${{ github.event.inputs.triton_pin || 'main' }} pip install ninja cmake wheel # build-time dependencies sleep 1000 pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch + git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} git submodule sync git submodule update --init --recursive pip install -r requirements.txt @@ -40,19 +52,18 @@ jobs: pushd .. echo "Installing triton..." "hello" # install triton + git clone https://github.com/triton-lang/triton.git + pushd triton + git checkout ${{ github.event.inputs.triton_pin || 'main' }} + pip install ninja cmake wheel + sleep 1000 + pip install -e python git clone https://github.com/pytorch/pytorch.git - echo "Checking directory..." "hello" - ls pushd pytorch - echo "Checking submodule..." "hello" - ls + git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} git submodule sync - echo "Updating submodule..." "hello" - ls git submodule update --init --recursive - echo "Installing requirements..." "hello" - ls pip install -r requirements.txt pip install pytest python setup.py install - pytest test/inductor \ No newline at end of file + pytest test/inductor From db0f4ceec39ac9b268b8dba61dfa26f0b1e51fd8 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 20 Aug 2024 13:55:31 -0700 Subject: [PATCH 15/31] lint fix --- .github/workflows/inductor.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 78a0551..bedd2bd 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -50,14 +50,6 @@ jobs: script: | set -x pushd .. - echo "Installing triton..." "hello" - # install triton - git clone https://github.com/triton-lang/triton.git - pushd triton - git checkout ${{ github.event.inputs.triton_pin || 'main' }} - pip install ninja cmake wheel - sleep 1000 - pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} From 067713d5af2b86182592ac9744f25e006c1e6e90 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 20 Aug 2024 14:33:26 -0700 Subject: [PATCH 16/31] lint fix --- .github/workflows/inductor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index bedd2bd..d49c65c 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,7 +29,6 @@ jobs: pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} pip install ninja cmake wheel # build-time dependencies - sleep 1000 pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch From 25862747cd03e16c3144871a0939a5634596d931 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 21 Aug 2024 15:39:42 -0700 Subject: [PATCH 17/31] lint fix --- .github/workflows/inductor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index d49c65c..e8a613f 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,6 +29,7 @@ jobs: pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} pip install ninja cmake wheel # build-time dependencies + sleep 10000 pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch From 44a81c306f8ab3440f0e11beaf9a1f72af3184ef Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 22 Aug 2024 15:42:37 -0700 Subject: [PATCH 18/31] lint fix --- .github/workflows/inductor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index e8a613f..a4715e5 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -21,6 +21,7 @@ jobs: gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 240 + docker-image: pytorch/manylinux-cuda124 script: | set -x pushd .. @@ -29,7 +30,7 @@ jobs: pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} pip install ninja cmake wheel # build-time dependencies - sleep 10000 + # sleep 10000 pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch From 5d43e25e0b17a360d5d81fa894efe09c617be344 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 22 Aug 2024 15:49:20 -0700 Subject: [PATCH 19/31] lint fix --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index a4715e5..ca851d1 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,8 +29,8 @@ jobs: git clone https://github.com/triton-lang/triton.git pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} - pip install ninja cmake wheel # build-time dependencies # sleep 10000 + pip install ninja cmake wheel # build-time dependencies pip install -e python git clone https://github.com/pytorch/pytorch.git pushd pytorch From 4c196775083b43ac06a472ea8dc3c68996823759 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 22 Aug 2024 16:00:40 -0700 Subject: [PATCH 20/31] trigger sleep --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index ca851d1..3923c00 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -29,7 +29,7 @@ jobs: git clone https://github.com/triton-lang/triton.git pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} - # sleep 10000 + sleep 10000 pip install ninja cmake wheel # build-time dependencies pip install -e python git clone https://github.com/pytorch/pytorch.git From 0d1172d1f6400a2c337f6a3bd0d7396a6add0c23 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 22 Aug 2024 16:12:23 -0700 Subject: [PATCH 21/31] try nvidia build --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 3923c00..77b884d 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -21,7 +21,7 @@ jobs: gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 240 - docker-image: pytorch/manylinux-cuda124 + docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 script: | set -x pushd .. From 5bc569d94e1c158772c98eeb9fb7359a8ee1bc3f Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 22 Aug 2024 16:49:48 -0700 Subject: [PATCH 22/31] try nvidia build --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 77b884d..150454e 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -21,7 +21,7 @@ jobs: gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 240 - docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 + # docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 script: | set -x pushd .. From 543c55683520e7a0ecfd48600577c7a1ac82229b Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Fri, 23 Aug 2024 13:00:33 -0700 Subject: [PATCH 23/31] add llvm build --- .github/workflows/inductor.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 150454e..89bf03d 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -17,7 +17,7 @@ jobs: build-test: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - runner: linux.4xlarge.nvidia.gpu + runner: linux.8xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 240 @@ -29,9 +29,24 @@ jobs: git clone https://github.com/triton-lang/triton.git pushd triton git checkout ${{ github.event.inputs.triton_pin || 'main' }} - sleep 10000 - pip install ninja cmake wheel # build-time dependencies + sudo yum install zlib-devel + pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0 # build-time dependencies + llvm_hash=$(cat cmake/llvm-hash.txt) + pushd .. + https://github.com/llvm/llvm-project.git + pushd llvm-project + git checkout "$llvm_hash" + mkdir build + pushd build + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm -DLLVM_ENABLE_PROJECTS="mlir;llvm" -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" + ninja + LLVM_BUILD_DIR=$(pwd) + popd + popd + popd + LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib LLVM_SYSPATH=$LLVM_BUILD_DIR pip install -e python pip install -e python + popd git clone https://github.com/pytorch/pytorch.git pushd pytorch git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} From 414c59ab5052988a5c54dc00ce6b848f92638166 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Mon, 26 Aug 2024 09:55:21 -0700 Subject: [PATCH 24/31] better logging --- .github/workflows/inductor.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 89bf03d..a5a5495 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -20,24 +20,29 @@ jobs: runner: linux.8xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "12.1" - timeout: 240 + timeout: 360 # docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 script: | set -x pushd .. - # install triton + echo "Installing triton" git clone https://github.com/triton-lang/triton.git pushd triton + echo "Checking out triton branch or commit" git checkout ${{ github.event.inputs.triton_pin || 'main' }} sudo yum install zlib-devel - pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0 # build-time dependencies + echo "Installing build-time dependencies" + pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0 llvm_hash=$(cat cmake/llvm-hash.txt) pushd .. - https://github.com/llvm/llvm-project.git + echo "Cloning llvm-project" + git clone https://github.com/llvm/llvm-project.git pushd llvm-project + echo "Checking out llvm hash" git checkout "$llvm_hash" mkdir build pushd build + echo "Building llvm" cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm -DLLVM_ENABLE_PROJECTS="mlir;llvm" -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ninja LLVM_BUILD_DIR=$(pwd) @@ -45,24 +50,26 @@ jobs: popd popd LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib LLVM_SYSPATH=$LLVM_BUILD_DIR pip install -e python + echo "Installing triton python package" pip install -e python popd + echo "Cloning pytorch" git clone https://github.com/pytorch/pytorch.git pushd pytorch + echo "Checking out pytorch branch or commit" git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} git submodule sync git submodule update --init --recursive pip install -r requirements.txt pip install mkl-static mkl-include pytest - # CUDA only: Add LAPACK support for the GPU if needed + echo "Installing magma-cuda121" conda install -c pytorch magma-cuda121 - python setup.py install - pytest test/inductor + python setup.py install # pytest test/inductor build-test-cpu: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - timeout: 240 + timeout: 360 script: | set -x pushd .. @@ -74,4 +81,4 @@ jobs: pip install -r requirements.txt pip install pytest python setup.py install - pytest test/inductor + # pytest test/inductor From 61dded47aaf898af932ebfd615f9f134746ba65f Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 09:09:19 -0700 Subject: [PATCH 25/31] better logging --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index a5a5495..37d89e0 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -26,7 +26,7 @@ jobs: set -x pushd .. echo "Installing triton" - git clone https://github.com/triton-lang/triton.git + git clone git@github.com:triton-lang/triton.git pushd triton echo "Checking out triton branch or commit" git checkout ${{ github.event.inputs.triton_pin || 'main' }} From f6f3446a631a135ef8696667743a9d4c59e16623 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 15:18:58 -0700 Subject: [PATCH 26/31] do autoinstalls --- .github/workflows/inductor.yml | 47 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 37d89e0..9f7601c 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -30,10 +30,11 @@ jobs: pushd triton echo "Checking out triton branch or commit" git checkout ${{ github.event.inputs.triton_pin || 'main' }} - sudo yum install zlib-devel + sudo yum install -y zlib-devel echo "Installing build-time dependencies" pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0 - llvm_hash=$(cat cmake/llvm-hash.txt) + export llvm_hash=$(cat cmake/llvm-hash.txt) + echo "llvm_hash: $llvm_hash" pushd .. echo "Cloning llvm-project" git clone https://github.com/llvm/llvm-project.git @@ -45,7 +46,7 @@ jobs: echo "Building llvm" cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm -DLLVM_ENABLE_PROJECTS="mlir;llvm" -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" ninja - LLVM_BUILD_DIR=$(pwd) + export LLVM_BUILD_DIR=$(pwd) popd popd popd @@ -61,24 +62,26 @@ jobs: git submodule sync git submodule update --init --recursive pip install -r requirements.txt - pip install mkl-static mkl-include pytest + pip install mkl-static mkl-include pytest pytest-xdist echo "Installing magma-cuda121" - conda install -c pytorch magma-cuda121 - python setup.py install # pytest test/inductor - - build-test-cpu: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - timeout: 360 - script: | - set -x - pushd .. - git clone https://github.com/pytorch/pytorch.git - pushd pytorch - git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} - git submodule sync - git submodule update --init --recursive - pip install -r requirements.txt - pip install pytest + conda install -y -c pytorch magma-cuda121 python setup.py install - # pytest test/inductor + pytest -n 2 test/inductor/test_torchinductor.py + + + # build-test-cpu: + # uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + # with: + # timeout: 360 + # script: | + # set -x + # pushd .. + # git clone https://github.com/pytorch/pytorch.git + # pushd pytorch + # git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} + # git submodule sync + # git submodule update --init --recursive + # pip install -r requirements.txt + # pip install pytest + # python setup.py install + # # pytest test/inductor From d25a2e8972ce7826c1f9dcb806e998f487819f53 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 15:28:23 -0700 Subject: [PATCH 27/31] do autoinstalls --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 9f7601c..d688db6 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -26,7 +26,7 @@ jobs: set -x pushd .. echo "Installing triton" - git clone git@github.com:triton-lang/triton.git + git clone https://github.com/triton-lang/triton.git pushd triton echo "Checking out triton branch or commit" git checkout ${{ github.event.inputs.triton_pin || 'main' }} From e66b688f137b5094a38a77e9c39449328c30a787 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 16:15:18 -0700 Subject: [PATCH 28/31] fix script --- .github/workflows/inductor.yml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index d688db6..9c62061 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -52,7 +52,6 @@ jobs: popd LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib LLVM_SYSPATH=$LLVM_BUILD_DIR pip install -e python echo "Installing triton python package" - pip install -e python popd echo "Cloning pytorch" git clone https://github.com/pytorch/pytorch.git @@ -66,22 +65,4 @@ jobs: echo "Installing magma-cuda121" conda install -y -c pytorch magma-cuda121 python setup.py install - pytest -n 2 test/inductor/test_torchinductor.py - - - # build-test-cpu: - # uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - # with: - # timeout: 360 - # script: | - # set -x - # pushd .. - # git clone https://github.com/pytorch/pytorch.git - # pushd pytorch - # git checkout ${{ github.event.inputs.pytorch_pin || 'main' }} - # git submodule sync - # git submodule update --init --recursive - # pip install -r requirements.txt - # pip install pytest - # python setup.py install - # # pytest test/inductor + pytest -n 2 test/inductor/test_torchinductor.py \ No newline at end of file From e79968d966273ca912bdffdfb9ba7d74a51251f8 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 22:41:07 -0700 Subject: [PATCH 29/31] fix script --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 9c62061..dc3df59 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -17,7 +17,7 @@ jobs: build-test: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - runner: linux.8xlarge.nvidia.gpu + runner: linux.g5.4xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 360 From 250cbae2c4600607f8a8fef66586e8960bb9d69a Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Tue, 27 Aug 2024 23:09:26 -0700 Subject: [PATCH 30/31] fix script --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index dc3df59..34519b4 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -65,4 +65,4 @@ jobs: echo "Installing magma-cuda121" conda install -y -c pytorch magma-cuda121 python setup.py install - pytest -n 2 test/inductor/test_torchinductor.py \ No newline at end of file + pytest -n 1 test/inductor/test_torchinductor.py \ No newline at end of file From d34eac7b4cf1730c57d417d161f256d82d263ed4 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Wed, 28 Aug 2024 06:55:45 -0700 Subject: [PATCH 31/31] fix script --- .github/workflows/inductor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/inductor.yml b/.github/workflows/inductor.yml index 34519b4..174cd02 100644 --- a/.github/workflows/inductor.yml +++ b/.github/workflows/inductor.yml @@ -17,7 +17,7 @@ jobs: build-test: uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: - runner: linux.g5.4xlarge.nvidia.gpu + runner: linux.g5.48xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "12.1" timeout: 360