Skip to content

Commit a4fcb3a

Browse files
authored
Merge pull request #25 from PaliC/palic/to_action
2 parents 5329a0b + f0c6e6c commit a4fcb3a

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

Diff for: .github/actions/inductor-test.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test build/test linux gpu
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
workflow_call:
7+
inputs:
8+
triton_pin:
9+
description: 'Triton branch or commit to pin'
10+
default: 'main'
11+
required: false
12+
pytorch_pin:
13+
description: 'PyTorch branch or commit to pin'
14+
default: 'main'
15+
required: false
16+
17+
jobs:
18+
build-test:
19+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
20+
with:
21+
runner: linux.g5.48xlarge.nvidia.gpu
22+
gpu-arch-type: cuda
23+
gpu-arch-version: "12.1"
24+
timeout: 360
25+
# docker-image: nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
26+
script: |
27+
set -x
28+
pushd ..
29+
echo "Installing triton"
30+
git clone https://github.com/triton-lang/triton.git
31+
pushd triton
32+
echo "Checking out triton branch or commit"
33+
git checkout ${{ github.event.inputs.triton_pin || 'main' }}
34+
sudo yum install -y zlib-devel
35+
echo "Installing build-time dependencies"
36+
pip install ninja==1.11.1.1 cmake==3.30.2 wheel==0.44.0
37+
export llvm_hash=$(cat cmake/llvm-hash.txt)
38+
echo "llvm_hash: $llvm_hash"
39+
pushd ..
40+
echo "Cloning llvm-project"
41+
git clone https://github.com/llvm/llvm-project.git
42+
pushd llvm-project
43+
echo "Checking out llvm hash"
44+
git checkout "$llvm_hash"
45+
mkdir build
46+
pushd build
47+
echo "Building llvm"
48+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm -DLLVM_ENABLE_PROJECTS="mlir;llvm" -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
49+
ninja
50+
export LLVM_BUILD_DIR=$(pwd)
51+
popd
52+
popd
53+
popd
54+
LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib LLVM_SYSPATH=$LLVM_BUILD_DIR pip install -e python
55+
echo "Installing triton python package"
56+
popd
57+
echo "Cloning pytorch"
58+
git clone https://github.com/pytorch/pytorch.git
59+
pushd pytorch
60+
echo "Checking out pytorch branch or commit"
61+
git checkout ${{ github.event.inputs.pytorch_pin || 'main' }}
62+
git submodule sync
63+
git submodule update --init --recursive
64+
pip install -r requirements.txt
65+
pip install mkl-static mkl-include pytest pytest-xdist
66+
echo "Installing magma-cuda121"
67+
conda install -y -c pytorch magma-cuda121
68+
python setup.py install
69+
pytest -n 1 test/inductor/test_torchinductor.py

Diff for: .github/workflows/inductor.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
inputs:
88
triton_pin:
99
description: 'Triton branch or commit to pin'
10+
type: string
1011
default: 'main'
1112
required: false
1213
pytorch_pin:
1314
description: 'PyTorch branch or commit to pin'
15+
type: string
1416
default: 'main'
1517
required: false
1618

0 commit comments

Comments
 (0)