diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..6a6add5 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,75 @@ +name: TritonBench Verification + +on: + push: + branches: + - main + - dev + pull_request: + +jobs: + amd: + name: AMD Verification + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: ['3.10'] + + steps: + - name: Show memory and disk (start) (Debug) + run: | + echo "=== MEMORY ===" + free -h + echo "=== DISK ===" + df -h + + - name: Free disk space + run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo docker image prune -af + sudo apt-get clean + sudo rm -rf /var/lib/apt/lists/* + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install system dependencies (ROCm) + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake git wget python3-pip + + - name: Show memory & disk (before PyTorch install) (Debug) + run: | + echo "=== MEMORY ===" + free -h + echo "=== DISK ===" + df -h + + - name: show repo tree (Debug) + run: ls -R . + + - name: Install Python dependencies & setup kernelGeneration (ROCm) + run: | + pip download torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm6.4 -d whls/rocm + pip install --no-index --find-links=whls/rocm torch torchvision + python install.py + + - name: Show memory & disk (after PyTorch install) (Debug) + run: | + echo "=== MEMORY ===" + free -h + echo "=== DISK ===" + df -h + + - name: Run TritonBench test (ROCm) + run: | + export TRITON_F32_DEFAULT=1 + python tritonbench/run.py --op bf16_layernorm