Skip to content

Commit 6aa6a39

Browse files
Add SYCL C++ tests to XGBoost CI (#18)
* initial * print icpx version and list of sycl devicese * source compiler before use * Update .github/workflows/main.yml Co-authored-by: Andreas Huber <[email protected]> --------- Co-authored-by: Dmitry Razdoburdin <> Co-authored-by: Andreas Huber <[email protected]>
1 parent aba1a0d commit 6aa6a39

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,49 @@ jobs:
6363
cd build
6464
ctest --extra-verbose
6565
66+
gtest-cpu-sycl:
67+
name: Test Google C++ unittest (CPU SYCL)
68+
runs-on: ${{ matrix.os }}
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
os: [ubuntu-latest]
73+
steps:
74+
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
75+
with:
76+
submodules: 'true'
77+
- name: Install SYCL runtime
78+
run: |
79+
sudo apt-get update
80+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
81+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
82+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
83+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
84+
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
85+
sudo apt-get update
86+
sudo apt-get install -y intel-dpcpp-cpp-compiler-2023.2.1
87+
source /opt/intel/oneapi/compiler/latest/env/vars.sh
88+
source /opt/intel/oneapi/tbb/latest/env/vars.sh
89+
icpx --version
90+
sycl-ls
91+
92+
- name: Build and install XGBoost
93+
shell: bash -l {0}
94+
run: |
95+
source /opt/intel/oneapi/compiler/latest/env/vars.sh
96+
source /opt/intel/oneapi/tbb/latest/env/vars.sh
97+
mkdir build
98+
cd build
99+
cmake .. -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON -DPLUGIN_SYCL=ON
100+
make -j$(nproc)
101+
102+
- name: Run gtest binary
103+
run: |
104+
source /opt/intel/oneapi/compiler/latest/env/vars.sh
105+
source /opt/intel/oneapi/tbb/latest/env/vars.sh
106+
cd build
107+
./testxgboost --gtest_filter=Sycl*
108+
66109
c-api-demo:
67110
name: Test installing XGBoost lib + building the C API demo
68111
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)