@@ -39,8 +39,12 @@ with the same name.
3939** Linux**
4040
4141``` bash
42- export DPCPP_HOME=/export/home/sycl_workspace
43- mkdir $DPCPP_HOME
42+ export DPCPP_HOME=~ /sycl_workspace
43+ mkdir -p $DPCPP_HOME /build
44+ cd $DPCPP_HOME
45+
46+ git clone https://github.com/intel/llvm -b sycl
47+ cd $DPCPP_HOME /build
4448```
4549
4650** Windows (64-bit)**
@@ -55,55 +59,49 @@ Open a developer command prompt using one of two methods:
5559``` bat
5660set DPCPP_HOME=%USERPROFILE%\sycl_workspace
5761mkdir %DPCPP_HOME%
62+ cd %DPCPP_HOME%
63+
64+ git clone https://github.com/intel/llvm -b sycl
65+ mkdir %DPCPP_HOME%\build
66+ cd %DPCPP_HOME%\build
5867```
5968
6069# Build DPC++ toolchain
6170
62- ** Linux**
63- ``` bash
64- cd $DPCPP_HOME
65- git clone https://github.com/intel/llvm -b sycl
66- mkdir $DPCPP_HOME /build
67- cd $DPCPP_HOME /build
71+ The easiest way to get started is to use the buildbot [ configure] ( ../../buildbot/configure.py )
72+ and [ compile] ( ../../buildbot/configure.py ) scripts.
73+
74+ In case you want to configure CMake manually the up-to-date reference for variables is in these files.
6875
69- cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=" X86" \
70- -DLLVM_EXTERNAL_PROJECTS=" llvm-spirv;sycl" \
71- -DLLVM_ENABLE_PROJECTS=" clang;llvm-spirv;sycl" \
72- -DLLVM_EXTERNAL_SYCL_SOURCE_DIR=$DPCPP_HOME /llvm/sycl \
73- -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=$DPCPP_HOME /llvm/llvm-spirv \
74- $DPCPP_HOME /llvm/llvm
76+ ** Linux**
7577
76- make -j` nproc` sycl-toolchain
78+ ``` bash
79+ python $DPCPP_HOME /llvm/buildbot/configure.py -s $DPCPP_HOME /llvm -o $DPCPP_HOME /build -t release
80+ python $DPCPP_HOME /llvm/buildbot/compile.py -s $DPCPP_HOME /llvm -o $DPCPP_HOME /build
7781```
7882
79- ** Windows (64-bit)**
83+ ** Windows**
84+
8085``` bat
81- cd %DPCPP_HOME%
82- git clone https://github.com/intel/llvm -b sycl
83- mkdir %DPCPP_HOME%\build
84- cd %DPCPP_HOME%\build
86+ python %DPCPP_HOME%\llvm\buildbot\configure.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME%\build -t release
87+ python %DPCPP_HOME%\llvm\buildbot\compile.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME%\build
88+ ```
8589
86- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" ^
87- -DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl" ^
88- -DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl" ^
89- -DLLVM_EXTERNAL_SYCL_SOURCE_DIR="%DPCPP_HOME%\llvm\sycl" ^
90- -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR="%DPCPP_HOME%\llvm\llvm-spirv" ^
91- -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl ^
92- "%DPCPP_HOME%\llvm\llvm"
90+ ** Options**
9391
94- ninja sycl-toolchain
95- ```
92+ You can use the following flags with ` configure.py ` :
9693
97- To use ahead-of-time compilation for the Intel® ; processors, additionally
98- build opencl-aot target:
94+ * ` --no-ocl ` -> Download OpenCL deps via cmake (can be useful in case of troubles)
95+ * ` --cuda ` -> use the cuda backend (see [ Nvidia CUDA] ( #build-dpc-toolchain-with-support-for-nvidia-cuda ) )
96+ * ` --shared-libs ` -> Build shared libraries
97+ * ` -t ` -> Build type (debug or release)
9998
100- 1 . add ``` opencl-aot ``` to ``` -DLLVM_EXTERNAL_PROJECTS ``` and
101- ``` -DLLVM_ENABLE_PROJECTS ``` variables above
102- 2 . add ``` opencl-aot ``` to
103- ``` make ``` (for Linux) or ``` ninja ``` (for Windows) commands above
10499
100+ Ahead-of-time compilation for the Intel® ; processors is enabled by default.
105101For more, see [ opencl-aot documentation] ( ../../opencl-aot/README.md ) .
106102
103+ ** Deployment**
104+
107105TODO: add instructions how to deploy built DPC++ toolchain.
108106
109107## Build DPC++ toolchain with libc++ library
@@ -124,20 +122,7 @@ should be used.
124122There is experimental support for DPC++ for CUDA devices.
125123
126124To enable support for CUDA devices, follow the instructions for the Linux
127- DPC++ toolchain, but replace the cmake command with the following one:
128-
129-
130- ```
131- cmake -DCMAKE_BUILD_TYPE=Release \
132- -DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl" \
133- -DLLVM_EXTERNAL_SYCL_SOURCE_DIR=$DPCPP_HOME/llvm/sycl \
134- -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=$DPCPP_HOME/llvm/llvm-spirv \
135- -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/ \
136- -DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl;libclc" \
137- -DSYCL_BUILD_PI_CUDA=ON \
138- -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \
139- -DLIBCLC_TARGETS_TO_BUILD="nvptx64--;nvptx64--nvidiacl"
140- ```
125+ DPC++ toolchain, but add the ` --cuda ` flag to ` configure.py `
141126
142127Enabling this flag requires an installation of
143128[ CUDA 10.1] ( https://developer.nvidia.com/cuda-10.1-download-archive-update2 ) on the system,
0 commit comments