@@ -317,7 +317,7 @@ jobs:
317
317
runs-on : ${{ matrix.runner }}
318
318
strategy :
319
319
matrix :
320
- python : [3.8 ]
320
+ python : [3.9 ]
321
321
experimental : [false]
322
322
runner : [ubuntu-latest]
323
323
continue-on-error : ${{ matrix.experimental }}
@@ -363,39 +363,64 @@ jobs:
363
363
restore-keys : |
364
364
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
365
365
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
366
- - name : Install dpctl
366
+ - name : Install example requirements
367
367
shell : bash -l {0}
368
368
run : |
369
+ CHANNELS="${{ env.CHANNELS }}"
369
370
source $CONDA/etc/profile.d/conda.sh
370
- conda activate
371
- CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
372
- conda install -y $PACKAGE_NAME pytest python=${{ matrix.python }} $CHANNELS
373
- # Test installed packages
374
- conda list
375
- - name : Install example requirements
371
+ conda create -n examples -y pytest python=${{ matrix.python }} $CHANNELS
372
+ conda install -n examples -y cmake">=3.22" $CHANNELS || exit 1
373
+ conda install -n examples -y ninja $CHANNELS || exit 1
374
+ conda install -n examples -y pybind11 cython scikit-build $CHANNELS || exit 1
375
+ conda install -n examples -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $CHANNELS || exit 1
376
+ conda list -n examples
377
+ conda create -y -n build_env -c intel dpcpp_linux-64
378
+ - name : Install dpctl
376
379
shell : bash -l {0}
377
380
run : |
378
381
source $CONDA/etc/profile.d/conda.sh
379
- conda install -y pybind11 cython
380
- conda install -y -c intel mkl-dpcpp mkl-devel-dpcpp numba-dppy
381
- conda create -y -n build_env -c intel dpcpp_linux-64
382
+ conda activate
383
+ CHANNELS="-c $GITHUB_WORKSPACE/channel -c dppy/label/dev -c intel --override-channels"
384
+ conda install -n examples -y $CHANNELS numba-dppy dpctl || exit 1
385
+ # Test installed packages
386
+ conda list -n examples
382
387
- name : Build and run examples with native extensions
383
388
shell : bash -l {0}
384
389
run : |
385
390
source $CONDA/etc/profile.d/conda.sh
386
391
export OCL_ICD_FILENAMES=libintelocl.so
387
392
export SYCL_ENABLE_HOST_DEVICE=1
388
- conda activate
393
+ conda activate examples
394
+ conda list
389
395
cd examples/pybind11
390
- export CC=dpcpp
391
- export CXX=dpcpp
392
396
for d in $(ls)
393
397
do
394
398
pushd $d
399
+ export MKLROOT=${CONDA_PREFIX}
400
+ export TBBROOT=${CONDA_PREFIX}
395
401
conda activate --stack build_env
396
- python setup.py build_ext --inplace || exit 1
402
+ if [ -e CMakeLists.txt ]
403
+ then
404
+ python setup.py build_ext --inplace -- -G Ninja \
405
+ -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx \
406
+ -DTBB_LIBRARY_DIR=${TBBROOT}/lib \
407
+ -DMKL_LIBRARY_DIR=${MKLROOT}/lib \
408
+ -DMKL_INCLUDE_DIR=${MKLROOT}/include \
409
+ -DTBB_INCLUDE_DIR=${TBBROOT}/include || exit 1
410
+ else
411
+ CC=dpcpp CXX=dpcpp LD_SHARED="dpcpp -shared" \
412
+ python setup.py build_ext --inplace || exit 1
413
+ fi
397
414
conda deactivate
398
- python example.py
415
+ if [ -e tests ]
416
+ then
417
+ python -m pytest tests || exit 1
418
+ else
419
+ conda list dpcpp
420
+ ls -l ${CONDA_PREFIX}/lib/libsycl*
421
+ ldd external_usm_alloc*so
422
+ python example.py || exit 1
423
+ fi
399
424
popd
400
425
done
401
426
cd ../cython
@@ -405,7 +430,7 @@ jobs:
405
430
conda activate --stack build_env
406
431
python setup.py build_ext --inplace || exit 1
407
432
conda deactivate
408
- python run.py
433
+ python run.py || exit 1
409
434
popd
410
435
done
411
436
- name : Run Python examples
0 commit comments