Skip to content

[UPDATE]: update to oneapi toolkit 2024 and torch version 2.1.0 #74

[UPDATE]: update to oneapi toolkit 2024 and torch version 2.1.0

[UPDATE]: update to oneapi toolkit 2024 and torch version 2.1.0 #74

name: Build and test
on:
workflow_dispatch:
pull_request:
branches:
- llvm-target
env:
BASE: /home/runner
LLVM_SYSPATH: /home/runner/packages/llvm
BACKEND: XPU
TRITON_DISABLE_LINE_INFO: 1
jobs:
pre-commit:
name: Pre-commit checks
runs-on:
- glados
- spr
- cpu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: |
.pre-commit-config.yaml
- name: Run pre-commit checks
run: |
pip install --upgrade pre-commit
# TODO: ignore the first yapf failure until https://github.com/google/yapf/issues/1164 is fixed
python3 -m pre_commit run --all-files --verbose yapf &> /dev/null || true
python3 -m pre_commit run --all-files --verbose
integration-tests:
name: Integration tests
runs-on:
- glados
- spr
- oneapi-2024.0.1
defaults:
run:
shell: bash -noprofile --norc -eo pipefail -c "source /home/runner/intel/oneapi/setvars.sh > /dev/null; source {0}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: |
python/pyproject.toml
python/setup.py
- name: Read packages from cache
id: packages-cache
uses: actions/cache@v3
env:
# Increase this value to reset cache
CACHE_NUMBER: 1
with:
path: /home/runner/packages
key: packages-${{ hashFiles('scripts/compile-triton.sh', 'cmake/llvm-hash.txt') }}-${{ env.CACHE_NUMBER }}
- name: Build packages
if: steps.packages-cache.outputs.cache-hit != 'true'
run: |
./scripts/compile-triton.sh
- name: Build Triton
run: |
cd python
pip install wheel
pip install --no-build-isolation '.[tests]'
- name: Run lit tests
run: |
pip install lit
cd python
lit -v build/*/test
- name: Run core tests
run: |
pip install pytest pytest-xdist
pip install torch==2.1.0a0+cxx11.abi intel_extension_for_pytorch==2.1.10+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
cd python/test/unit/language
python3 -m pytest -n auto --verbose --device xpu --ignore=test_line_info.py --ignore=test_subprocess.py
# run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
TRITON_DISABLE_LINE_INFO=0 python3 -m pytest -n auto test_line_info.py
- name: Run assert/print tests
run: |
cd python/test/unit/language
python3 assert_helper.py device_assert
python3 print_helper.py device_print float 1> /dev/null
- name: Run XPU python tests
run: |
cd python/test/backend/third_party_backends
python3 -m pytest -n auto --verbose test_xpu_backend.py
- name: Run CXX unittests
run: |
cd python/build/*cmake*
ctest