Skip to content

Test with pip

Test with pip #721

Workflow file for this run

name: Test with pip
on:
workflow_dispatch:
# run workflow on changes to the driver, which handles the libraries logic
pull_request:
branches:
- main
paths:
- third_party/intel/backend/driver.py
push:
branches:
- main
paths:
- third_party/intel/backend/driver.py
# run workflow after building nightly wheels
workflow_run:
workflows:
- Triton wheels
types:
- completed
permissions: read-all
env:
PYTHON_VERSION: '3.10'
TRITON_TEST_CMD: scripts/test-triton.sh --skip-pytorch-install
jobs:
tests:
name: Tests
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on:
- rolling
- runner-0.0.22
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install wheels
uses: ./.github/actions/install-wheels
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
python_version: ${{ env.PYTHON_VERSION }}
# transformers package is required for the inductor (e2e) test
wheels_pattern: 'torch-*.whl'
- name: Install Triton
uses: ./.github/actions/setup-triton
- name: Install runtime dependencies
run: |
curl -sSLO --retry 10 https://raw.githubusercontent.com/pytorch/pytorch/$(<.github/pins/pytorch.txt)/.github/scripts/generate_binary_build_matrix.py
sed -i '/^validate_nccl_dep_consistency.*/d' generate_binary_build_matrix.py
python -c "from generate_binary_build_matrix import PYTORCH_EXTRA_INSTALL_REQUIREMENTS; print('\n'.join(PYTORCH_EXTRA_INSTALL_REQUIREMENTS['xpu'].split(' | ')))" | tee /tmp/requirements.txt
pip install -r /tmp/requirements.txt
pip install transformers==4.54.0
- name: Run core tests
run: |
${{ env.TRITON_TEST_CMD }} --core
- name: Run interpreter tests
run: |
${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
- name: Run triton kernels tests
run: |
${{ env.TRITON_TEST_CMD }} --triton-kernels --skip-pip-install
- name: Run Tutorials
run: |
${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
- name: Run inductor test
run: |
${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install