Skip to content

Commit 8870ef4

Browse files
Add a workflow to install nightly intel/llvm + drivers
Build dpctl with that
1 parent d469c84 commit 8870ef4

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build with Open Source LLVM-Sycl compiler
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
install-compiler:
9+
name: Install Nightly build of DPC++ toolchain
10+
runs-on: ubuntu-20.04
11+
12+
env:
13+
OCLCPUEXP_FN: oclcpuexp-2021.12.6.0.19_rel.tar.gz
14+
FPGAEMU_FN: fpgaemu-2021.12.6.0.19_rel.tar.gz
15+
TBB_FN: oneapi-tbb-2021.4.0-lin.tgz
16+
17+
steps:
18+
- name: Cancel Previous Runs
19+
uses: styfle/cancel-workflow-action@0.6.0
20+
with:
21+
access_token: ${{ github.token }}
22+
23+
- name: Download nightly and components
24+
shell: bash -l {0}
25+
run: |
26+
cd /home/runner/work
27+
mkdir -p sycl_bundle
28+
cd sycl_bundle
29+
git clone http://github.com/intel/llvm.git llvm_src
30+
cd llvm_src
31+
export NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" $(git tag | sort -V | tail -1))
32+
cd ..
33+
export DOWNLOAD_URL_PREFIX=https://github.com/intel/llvm/releases/download
34+
wget ${DOWNLOAD_URL_PREFIX}/${NIGHTLY_TAG}/dpcpp-compiler.tar.gz
35+
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${OCLCPUEXP_FN}
36+
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${FPGAEMU_FN}
37+
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.4.0/${TBB_FN}
38+
39+
- name: Install system components
40+
shell: bash -l {0}
41+
run: |
42+
sudo apt-get install cmake libtinfo5
43+
44+
- name: Setup Python
45+
uses: actions/setup-python@v2
46+
with:
47+
python-version: '3.9'
48+
architecture: x64
49+
50+
- name: Install dpctl dependencies
51+
shell: bash -l {0}
52+
run: |
53+
pip install numpy cython setuptools pytest
54+
55+
- name: install nightly
56+
shell: bash -l {0}
57+
run: |
58+
cd /home/runner/work/sycl_bundle
59+
tar xf dpcpp-compiler.tar.gz
60+
mkdir -p oclcpuexp
61+
mkdir -p fpgaemu
62+
mkdir -p tbb
63+
tar xf ${OCLCPUEXP_FN} -C oclcpuexp
64+
tar xf ${FPGAEMU_FN} -C fpgaemu
65+
tar xf ${TBB_FN}
66+
grep export dpcpp_compiler/startup.sh > activate.sh
67+
68+
- name: Checkout repo
69+
uses: actions/checkout@v2
70+
with:
71+
fetch-depth: 0
72+
73+
- name: build dpctl
74+
shell: bash -l {0}
75+
run: |
76+
export SYCL_BUNDLE_FOLDER=/home/runner/work/sycl_bundle
77+
source ${SYCL_BUNDLE_FOLDER}/activate.sh
78+
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/oclcpuexp/x64:${LD_LIBRARY_PATH}
79+
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/fpgaemu/x64:${LD_LIBRARY_PATH}
80+
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/oneapi-tbb-2021.4.0/lib/intel64/gcc4.8:${LD_LIBRARY_PATH}
81+
clang++ --version
82+
sycl-ls
83+
python setup.py develop --sycl-compiler-prefix=$(dirname $(dirname `which clang++`))
84+
python -m pytest -v dpctl/tests

0 commit comments

Comments
 (0)