@@ -39,8 +39,12 @@ with the same name.
39
39
** Linux**
40
40
41
41
``` 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
44
48
```
45
49
46
50
** Windows (64-bit)**
@@ -55,55 +59,49 @@ Open a developer command prompt using one of two methods:
55
59
``` bat
56
60
set DPCPP_HOME=%USERPROFILE%\sycl_workspace
57
61
mkdir %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
58
67
```
59
68
60
69
# Build DPC++ toolchain
61
70
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.
68
75
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**
75
77
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
77
81
```
78
82
79
- ** Windows (64-bit)**
83
+ ** Windows**
84
+
80
85
``` 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
+ ```
85
89
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**
93
91
94
- ninja sycl-toolchain
95
- ```
92
+ You can use the following flags with ` configure.py ` :
96
93
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)
99
98
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
99
100
+ Ahead-of-time compilation for the Intel® ; processors is enabled by default.
105
101
For more, see [ opencl-aot documentation] ( ../../opencl-aot/README.md ) .
106
102
103
+ ** Deployment**
104
+
107
105
TODO: add instructions how to deploy built DPC++ toolchain.
108
106
109
107
## Build DPC++ toolchain with libc++ library
@@ -124,20 +122,7 @@ should be used.
124
122
There is experimental support for DPC++ for CUDA devices.
125
123
126
124
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
- ```
125
+ DPC++ toolchain, but add the ` --cuda ` flag to ` configure.py `
141
126
142
127
Enabling this flag requires an installation of
143
128
[ CUDA 10.1] ( https://developer.nvidia.com/cuda-10.1-download-archive-update2 ) on the system,
0 commit comments