A lightweight Python package exposing a subset of SYCL functionalities.
- Install Conda
- Install Intel oneAPI
- Set environment variable
ONEAPI_ROOT
- Windows:
C:\Program Files (x86)\Intel\oneAPI\
- Linux:
/opt/intel/oneapi
- Windows:
- Set environment variable
- Install OpenCL HD graphics drivers
- Create and activate conda build environment
conda create -n build-env conda-build
conda activate build-env
- Set environment variable
ONEAPI_ROOT
and build conda package
export ONEAPI_ROOT=/opt/intel/oneapi
conda build conda-recipe -c ${ONEAPI_ROOT}/conda_channel
On Windows to cope with long file names
use croot
with short folder path:
set "ONEAPI_ROOT=C:\Program Files (x86)\Intel\oneAPI\"
conda build --croot=C:/tmp conda-recipe -c "%ONEAPI_ROOT%\conda_channel"
- Install conda package
conda install dpctl
dpCtl relies on DPC++ runtime. With Intel oneAPI installed you should activate it.
For install:
python setup.py install
For development:
python setup.py develop
dpCtl relies on DPC++ runtime. With Intel oneAPI installed you could activate it.
On Windows:
call "%ONEAPI_ROOT%\compiler\latest\env\vars.bat"
On Linux:
source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh
When dpCtl is installed via conda package
then it uses DPC++ runtime from dpcpp_cpp_rt
package
and it is not necessary to activate oneAPI DPC++ compiler environment.
dpcpp_cpp_rt
package is provided by oneAPI conda_channel
.
See examples in folder examples
.
Run examples:
python examples/create_sycl_queues.py
See tests in folder dpctl/tests
.
Run tests:
python -m unittest dpctl.tests