File tree Expand file tree Collapse file tree 2 files changed +98
-0
lines changed
Expand file tree Collapse file tree 2 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test with pip
2+
3+ on :
4+ workflow_dispatch :
5+
6+ # run workflow on changes to the driver, which handles the libraries logic
7+ pull_request :
8+ branches :
9+ - main
10+ paths :
11+ - third_party/intel/backend/driver.py
12+ push :
13+ branches :
14+ - main
15+ paths :
16+ - third_party/intel/backend/driver.py
17+
18+ # run workflow after building nightly wheels
19+ workflow_run :
20+ workflows :
21+ - nightly-wheels.yml
22+ types :
23+ - completed
24+
25+ permissions : read-all
26+
27+ env :
28+ PYTHON_VERSION : ' 3.9'
29+ TRITON_TEST_CMD : " scripts/test-triton.sh --skip-pytorch-install"
30+
31+ jobs :
32+ tests :
33+ name : Tests
34+ if : ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
35+ runs-on :
36+ - rolling
37+ - runner-0.0.20
38+ steps :
39+ - name : Checkout repository
40+ uses : actions/checkout@v4
41+
42+ - name : Install Python
43+ uses : actions/setup-python@v5
44+ with :
45+ python-version : ${{ env.PYTHON_VERSION }}
46+
47+ - name : Install wheels
48+ uses : ./.github/actions/install-wheels
49+ with :
50+ gh_token : ${{ secrets.GITHUB_TOKEN }}
51+ python_version : ${{ env.PYTHON_VERSION }}
52+ # transformers package is required for the inductor (e2e) test
53+ wheels_pattern : ' {torch,transformers}-*.whl'
54+
55+ - name : Setup Triton
56+ uses : ./.github/actions/setup-triton
57+
58+ - name : Install Triton runtime dependencies
59+ run : |
60+ pip install intel-sycl-rt intel-pti
61+
62+ - name : Run core tests
63+ run : |
64+ ${{ env.TRITON_TEST_CMD }} --core
65+
66+ - name : Run interpreter tests
67+ run : |
68+ ${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
69+
70+ - name : Run Tutorials
71+ run : |
72+ ${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
73+
74+ - name : Run inductor test
75+ run : |
76+ ${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
Original file line number Diff line number Diff line change 1+ """Prints a lib directory for intel-sycl-rt."""
2+
3+ import importlib .metadata
4+ import pathlib
5+
6+
7+ def get_sycl_rt_lib_path () -> pathlib .Path :
8+ """Returns library path for intel-sycl-rt.
9+
10+ Raises:
11+ importlib.metadata.PackageNotFoundError: if intel-sycl-rt not installed.
12+ AssertionError: if libsycl.so not found.
13+ """
14+ files = importlib .metadata .files ('intel-sycl-rt' ) or []
15+ for f in files :
16+ if f .name == 'libsycl.so' :
17+ return pathlib .Path (f .locate ()).parent .resolve ()
18+ raise AssertionError ('libsycl.so not found' )
19+
20+
21+ if __name__ == '__main__' :
22+ print (get_sycl_rt_lib_path ())
You can’t perform that action at this time.
0 commit comments