Skip to content

Test with pip

Test with pip #765

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: Build PTI && Run Proton tests
run: |
PTI_COMMIT_ID="$(<.github/pins/pti.txt)"
git clone https://github.com/intel/pti-gpu.git
cd pti-gpu
git checkout $PTI_COMMIT_ID
cd sdk
cmake --preset linux-icpx-release
BUILD_TESTING=1 PTI_BUILD_SAMPLES=1 cmake --build --preset linux-icpx-release
PTI_LIBS_DIR="$(pwd)/build-linux-icpx-release/lib/"
cd ../..
export LD_LIBRARY_PATH=$PTI_LIBS_DIR:$LD_LIBRARY_PATH
export TRITON_XPUPTI_LIB_PATH=$PTI_LIBS_DIR
cd third_party/proton/test
pytest test_api.py test_cmd.py test_lib.py test_profile.py test_viewer.py --device xpu -s -v
cd ..
- 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