Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on both pytorch-triton and triton-main #63

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ci/tritonbench/install-triton-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@ conda activate "${CONDA_ENV}"
cd /workspace
git clone https://github.com/triton-lang/triton.git
cd /workspace/triton
# delete the original triton directory
TRITON_PKG_DIR=$(python -c "import triton; import os; print(os.path.dirname(triton.__file__))")
# make sure all pytorch triton has been uninstalled
pip uninstall -y triton
pip uninstall -y triton
pip uninstall -y triton
rm -rf "${TRITON_PKG_DIR}"

# install main triton
pip install ninja cmake wheel pybind11; # build-time dependencies
pip install -e python

# test main branch installation with importing experimental descriptor
python -c "import triton.tools.experimental_descriptor"
32 changes: 32 additions & 0 deletions .github/workflows/_linux-test-h100.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: linux-test-h100
on:
workflow_call:
inputs:
conda_env:
required: True
type: string
description: |
Conda environment to activate when testing Triton

jobs:
linux-test-h100:
if: github.repository_owner == 'pytorch-labs'
runs-on: [gcp-h100-runner]
timeout-minutes: 240
environment: docker-s3-upload
env:
SETUP_SCRIPT: "/workspace/setup_instance.sh"
CONDA_ENV: ${{ inputs.conda_env }}
steps:
- name: Checkout Tritonbench
uses: actions/checkout@v3
with:
submodules: recursive
- name: Tune Nvidia GPU
run: |
sudo nvidia-smi -pm 1
sudo ldconfig
nvidia-smi
- name: Test Tritonbench operators on H100 GPU
run: |
bash ./.ci/tritonbench/test-gpu.sh
29 changes: 7 additions & 22 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,13 @@ on:

jobs:
h100-pytorch-test:
# Don't run on forked repos
if: github.repository_owner == 'pytorch-labs'
runs-on: [gcp-h100-runner]
timeout-minutes: 240
environment: docker-s3-upload
env:
CONDA_ENV: "pytorch"
SETUP_SCRIPT: "/workspace/setup_instance.sh"
steps:
- name: Checkout Tritonbench
uses: actions/checkout@v3
with:
# no need to checkout submodules recursively
submodules: true
- name: Tune Nvidia GPU
run: |
sudo nvidia-smi -pm 1
sudo ldconfig
nvidia-smi
- name: Test Tritonbench operators on H100 GPU
run: |
bash ./.ci/tritonbench/test-gpu.sh
uses: ./.github/workflows/_linux-test-h100.yml
with:
conda_env: "pytorch"
h100-triton-main-test:
uses: ./.github/workflows/_linux-test-h100.yml
with:
conda_env: "triton-main"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
Expand Down
Loading