@@ -36,11 +36,16 @@ Throughout this document `DPCPP_HOME` denotes the path to the local directory
36
36
created as DPC++ workspace. It might be useful to create an environment variable
37
37
with the same name.
38
38
39
+
39
40
** Linux**
40
41
41
42
``` bash
42
- export DPCPP_HOME=/export/home/sycl_workspace
43
- mkdir $DPCPP_HOME
43
+ export DPCPP_HOME=~ /sycl_workspace
44
+ mkdir -p $DPCPP_HOME /build
45
+ cd $DPCPP_HOME
46
+
47
+ git clone https://github.com/intel/llvm -b sycl
48
+ cd $DPCPP_HOME /build
44
49
```
45
50
46
51
** Windows (64-bit)**
@@ -55,55 +60,49 @@ Open a developer command prompt using one of two methods:
55
60
``` bat
56
61
set DPCPP_HOME=%USERPROFILE%\sycl_workspace
57
62
mkdir %DPCPP_HOME%
63
+ cd %DPCPP_HOME%
64
+
65
+ git clone https://github.com/intel/llvm -b sycl
66
+ mkdir %DPCPP_HOME%\build
67
+ cd %DPCPP_HOME%\build
58
68
```
59
69
60
70
# Build DPC++ toolchain
61
71
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
72
+ The easiest way to get started is to use the buildbot [ configure] ( ../../buildbot/configure.py )
73
+ and [ compile] ( ../../buildbot/configure.py ) scripts.
68
74
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
75
+ In case you want to configure Cmake manually the up-to-date reference for variables is in these files.
75
76
76
- make -j` nproc` sycl-toolchain
77
+ ** Linux**
78
+
79
+ ``` bash
80
+ python $DPCPP_HOME /llvm/buildbot/configure.py -s $DPCPP_HOME /llvm -o $DPCPP_HOME /build -t release
81
+ python $DPCPP_HOME /llvm/buildbot/compile.py -s $DPCPP_HOME /llvm -o $DPCPP_HOME /build
77
82
```
78
83
79
- ** Windows (64-bit)**
84
+ ** Windows**
85
+
80
86
``` 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
87
+ python %DPCPP_HOME%\llvm\buildbot\configure.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME%\build -t release
88
+ python %DPCPP_HOME%\llvm\buildbot\compile.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME%\build
89
+ ```
85
90
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"
91
+ ** Options**
93
92
94
- ninja sycl-toolchain
95
- ```
93
+ You can use the following flags with ` configure.py ` :
96
94
97
- To use ahead-of-time compilation for the Intel® ; processors, additionally
98
- build opencl-aot target:
95
+ * ` --no-ocl ` -> Download OpenCL deps via cmake (can be useful in case of troubles)
96
+ * ` --cuda ` -> use the cuda backend (see [ Nvidia CUDA] ( #build-dpc-toolchain-with-support-for-nvidia-cuda ) )
97
+ * ` --shared-libs ` -> Build shared libraries
98
+ * ` -t ` -> Build type (debug or release)
99
99
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
104
100
101
+ Ahead-of-time compilation for the Intel® ; processors is enabled by default.
105
102
For more, see [ opencl-aot documentation] ( ../../opencl-aot/README.md ) .
106
103
104
+ ** Deployment**
105
+
107
106
TODO: add instructions how to deploy built DPC++ toolchain.
108
107
109
108
## Build DPC++ toolchain with libc++ library
@@ -124,20 +123,7 @@ should be used.
124
123
There is experimental support for DPC++ for CUDA devices.
125
124
126
125
To 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
- ```
126
+ DPC++ toolchain, but add the ` --cuda ` flag to ` configure.py `
141
127
142
128
Enabling this flag requires an installation of
143
129
[ CUDA 10.1] ( https://developer.nvidia.com/cuda-10.1-download-archive-update2 ) on the system,
0 commit comments