Skip to content

Latest commit

 

History

History
135 lines (99 loc) · 3.98 KB

GetStartedGuide.md

File metadata and controls

135 lines (99 loc) · 3.98 KB

Getting Started with SYCLomatic

Table of contents

Prerequisites

Create SYCLomatic workspace

Throughout this document SYCLOMATIC_HOME denotes the path to the local directory created as SYCLomatic workspace. It might be useful to create an environment variable with the same name.

Linux:

export SYCLOMATIC_HOME=~/workspace
export PATH_TO_C2S_INSTALL_FOLDER=~/workspace/c2s_install
mkdir $SYCLOMATIC_HOME
cd $SYCLOMATIC_HOME

git clone https://github.com/oneapi-src/SYCLomatic.git

Windows (64-bit):

Open a developer command prompt using one of two methods:

  • Click start menu and search for "x64 Native Tools Command Prompt for VS XXXX", where XXXX is a version of installed Visual Studio.
  • Ctrl-R, write "cmd", click enter, then run "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set SYCLOMATIC_HOME=%USERPROFILE%\workspace
set PATH_TO_C2S_INSTALL_FOLDER=%USERPROFILE%\workspace\c2s_install
mkdir %SYCLOMATIC_HOME%
cd %SYCLOMATIC_HOME%

git clone https://github.com/oneapi-src/SYCLomatic.git

Build SYCLomatic

Linux:

cd $SYCLOMATIC_HOME
mkdir build
cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$PATH_TO_C2S_INSTALL_FOLDER  -DCMAKE_BUILD_TYPE=Release  -DLLVM_ENABLE_PROJECTS="clang"  -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" ../SYCLomatic/llvm
ninja install-c2s

Windows (64-bit):

cd %SYCLOMATIC_HOME%
mkdir build
cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=%PATH_TO_C2S_INSTALL_FOLDER%  -DCMAKE_BUILD_TYPE=Release  -DLLVM_ENABLE_PROJECTS="clang"  -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" ..\SYCLomatic\llvm
ninja install-c2s

Deployment

Linux:

export PATH=$PATH_TO_C2S_INSTALL_FOLDER/bin:$PATH
export CPATH=$PATH_TO_C2S_INSTALL_FOLDER/include:$CPATH

Windows (64-bit):

SET PATH=%PATH_TO_C2S_INSTALL_FOLDER%\bin;%PATH%
SET INCLUDE=%PATH_TO_C2S_INSTALL_FOLDER%\include;%INCLUDE%
SET CPATH=%PATH_TO_C2S_INSTALL_FOLDER%\include;%CPATH%

Test SYCLomatic

Run in-tree LIT tests

Note: Certain CUDA header files may need to be accessible to the tool. After build the SYCLomatic, you can run the list test by:

ninja check-clang-c2s

Run E2E test suite

Follow instructions from the link below to build and run tests: README

Run c2s command

Get c2s help information by running "c2s --help". dpct is an alias command for c2s.

Known Issues and Limitations

  • SYCL* 2020 support work is in progress.
  • 32-bit host/target is not supported.

Find More

Trademarks information

Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. *Other names and brands may be claimed as the property of others. SYCL is a trademark of the Khronos Group Inc.