Welcome to sycl-info
!
This is the readme for sycl-info, a tool designed to report the SYCL platforms that are available to the system.
The sycl-info man page for instruction on how to use sycl-info.
This is also generated as an HTML and additionally as a man page on Linux.
You can find the generated html document here:
<sycl_info_install_dir>/share/doc/sycl-info.1.html
On Linux you can view the man page by doing:
man <sycl_info_install_dir>/share/man/man1/sycl-info.1
CMake | Conan | Default | Notes |
---|---|---|---|
BUILD_TESTING |
build_testing |
OFF /False |
Builds the unit tests. Requires doctest. |
BUILD_DOCS |
build_docs |
OFF /False |
Builds the man page. Requires ronn. |
BUILD_SHARED_LIBS |
shared |
OFF /False |
Building:
git clone https://github.com/codeplaysoftware/sycl-info.git
mkdir -p build install
conan install sycl-info/ --build missing -if build/ \
--profile default --profile sycl-info/config/conan/profiles/build-tools \
# Optional flags:
# [-obuild_testing=False] [-obuild_docs=False]
conan build sycl-info -bf build/ -pf install/
conan package sycl-info -bf build/ -pf install/
For an example of how a complete script looks like refer to the PKGBUILD on the AUR.
- OpenCL 1.2 or later
- CMake ≥ 3.13.0
- Lyra ≥ 1.1
- nlohmann/json ≥ 3.6.1
- ronn (Only if
-DBUILD_DOCS=ON
)
- doctest ≥ 2.2.0 (Only if
-DBUILD_TESTING=ON
)
mkdir -p dep-install/include
git clone https://github.com/KhronosGroup/OpenCL-Headers OpenCL-Headers
git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader OpenCL-ICD-Loader
git clone https://github.com/nlohmann/json json
git clone https://github.com/bfgroup/Lyra Lyra
git clone https://github.com/onqtam/doctest doctest # Only needed for the tests
gem install ronn # Only needed to build the man page
cp -r OpenCL-Headers/CL install/include/
cp -r Lyra/include/lyra install/include/
for dep in OpenCL-ICD-Loader json doctest; do
mkdir ${dep}-build
cmake -S $dep -B ${dep}-build \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release
cmake --build ${dep}-build --target install
done
mkdir build install
git clone https://this/repo.git sycl-info
cmake -S sycl-info -B build \
# Optional flags:
# [-DBUILD_TESTING=OFF] [-DBUILD_DOCS=OFF] \
-DCMAKE_PREFIX_PATH=dep-install \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release
cmake --build build/ --target install
After sycl-info is built it can be packaged into a .deb
, .rpm
, or a tarball using CPack:
Tarball:
conan install ..
# Optional, but recommended:
# -obuild_docs=True -oshared=True
conan build ..
source ./activate_run.sh
cpack -G TXZ
Source Tarball:
conan install ..
conan build .. -c # configure only
source ./activate_run.sh
cpack -G TXZ --config CPackSourceConfig.cmake
Ubuntu:
conan install ..
# Optional, but recommended:
# -obuild_docs=True -oshared=True
conan build ..
source ./activate_run.sh
cpack -G DEB
sudo dpkg -i packages/sycl-info-0.1-Linux.deb packages/target-selector-0.1-Linux.deb
sycl-info --help
man sycl-info
The generated packages will end up in build/packages
.