Skip to content

Commit 94ee028

Browse files
v-klochkovbader
authored andcommitted
[SYCL][DOC] Add notes for low level runtime setup/installation
Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
1 parent 627a137 commit 94ee028

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

sycl/doc/GetStartedWithSYCLCompiler.md

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ git clone https://github.com/intel/llvm -b sycl
8282
mkdir %SYCL_HOME%\build
8383
cd %SYCL_HOME%\build
8484
85-
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86"^
86-
-DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl"^
87-
-DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl"^
88-
-DLLVM_EXTERNAL_SYCL_SOURCE_DIR="%SYCL_HOME%\llvm\sycl"^
89-
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR="%SYCL_HOME%\llvm\llvm-spirv"^
90-
-DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_FLAGS="/GS"^
91-
-DCMAKE_CXX_FLAGS="/GS" -DCMAKE_EXE_LINKER_FLAGS="/NXCompat /DynamicBase"^
92-
-DCMAKE_SHARED_LINKER_FLAGS="/NXCompat /DynamicBase"^
85+
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" ^
86+
-DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl" ^
87+
-DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl" ^
88+
-DLLVM_EXTERNAL_SYCL_SOURCE_DIR="%SYCL_HOME%\llvm\sycl" ^
89+
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR="%SYCL_HOME%\llvm\llvm-spirv" ^
90+
-DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_FLAGS="/GS" ^
91+
-DCMAKE_CXX_FLAGS="/GS" -DCMAKE_EXE_LINKER_FLAGS="/NXCompat /DynamicBase" ^
92+
-DCMAKE_SHARED_LINKER_FLAGS="/NXCompat /DynamicBase" ^
9393
"%SYCL_HOME%\llvm\llvm"
9494
9595
ninja sycl-toolchain
@@ -117,25 +117,57 @@ should be used.
117117
To run SYCL applications on OpenCL devices, OpenCL implementation(s) must be
118118
present in the system.
119119

120-
To execute SYCL tests on Intel devices following runtimes should be installed:
120+
Please, refer to [the Release Notes](../ReleaseNotes.md) for recommended Intel
121+
runtime versions.
121122

122-
**Linux**
123+
The `GPU` runtime that is needed to run SYCL application on Intel `GPU` devices
124+
can be downloaded from the following web pages:
123125

124-
* Intel GPU [Intel&reg; Graphics Compute Runtime for
126+
* Linux: [Intel&reg; Graphics Compute Runtime for
125127
OpenCL&trade;](https://github.com/intel/compute-runtime/releases)
126-
* Intel CPU - [Experimental Intel&reg; CPU Runtime for OpenCL&trade; Applications
127-
with SYCL support](https://github.com/intel/llvm/releases)
128-
* Intel FPGA - TBD.
129128

130-
**Windows**
131-
* OpenCL&trade; runtime for Intel GPU [Intel&reg; Download
129+
* Windows: [Intel&reg; Download
132130
Center](https://downloadcenter.intel.com/product/80939/Graphics-Drivers)
133131

134-
* The experimental Intel&reg; CPU Runtime for OpenCL&trade; Applications with
135-
SYCL support on Windows will be available soon.
136132

137-
Please, refer to [the Release Notes](../ReleaseNotes.md) for recommended Intel
138-
runtime versions.
133+
To install Intel `CPU` runtime for OpenCL devices the corresponding runtime
134+
asset/archive should be downloaded from
135+
[SYCL Compiler and Runtime updates](../ReleaseNotes.md) and installed using
136+
the following procedure.
137+
138+
**Linux**
139+
140+
1) Extract the archive. For example, for the archive
141+
`oclcpu_rt_<new_version>.tar.gz` you would run the following commands
142+
```bash
143+
mkdir -p /opt/intel/oclcpuexp
144+
cd /opt/intel/oclcpuexp
145+
tar -zxvf oclcpu_rt_<new_version>.tar.gz
146+
```
147+
2) Create ICD file pointing to the new runtime
148+
```bash
149+
echo /opt/intel/oclcpuexp/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd
150+
```
151+
3) Configure library paths
152+
```bash
153+
echo /opt/intel/oclcpuexp/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf
154+
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf
155+
```
156+
**Windows**
157+
1) If you need `GPU` as well, then update/install it first. Do it **before**
158+
installing `CPU` runtime as `GPU` runtime installer may re-write some important
159+
files or settings and make existing `CPU` runtime not working properly.
160+
161+
2) Extract the archive to some folder. For example, to `c:\oclcpu_rt_<new_version>`.
162+
163+
3) Run `Command Prompt` as `Administrator`. To do that click `Start` button,
164+
type `Command Prompt`, click the Right mouse button on it, then click
165+
`Run As Administrator`, then click `Yes` to confirm.
166+
167+
4) In the opened windows run `install.bat` provided with the extracted files
168+
to install runtime to the system and setup environment variables. So, if the
169+
extracted files are in `c:\oclcpu_rt_<new_version>\` folder, then type the
170+
command: `c:\oclcpu_rt_<new_version>\install.bat`
139171

140172
## Test SYCL toolchain
141173

@@ -166,8 +198,8 @@ Follow Khronos SYCL-CTS instructions from
166198
file to obtain test sources and instructions how build and execute the tests.
167199

168200
To configure testing of "Intel SYCL" toochain set
169-
`SYCL_IMPLEMENTATION=Intel_SYCL` and `Intel_SYCL_ROOT=<path to the SYCL installation>`
170-
CMake variables.
201+
`SYCL_IMPLEMENTATION=Intel_SYCL` and
202+
`Intel_SYCL_ROOT=<path to the SYCL installation>` CMake variables.
171203

172204
**Linux**
173205
```bash
@@ -261,9 +293,9 @@ and run following command:
261293
clang++ -fsycl simple-sycl-app.cpp -o simple-sycl-app.exe
262294
```
263295

264-
This `simple-sycl-app.exe` application doesn't specify SYCL device for execution,
265-
so SYCL runtime will use `default_selector` logic to select one of accelerators
266-
available in the system or SYCL host device.
296+
This `simple-sycl-app.exe` application doesn't specify SYCL device for
297+
execution, so SYCL runtime will use `default_selector` logic to select one
298+
of accelerators available in the system or SYCL host device.
267299

268300
**Linux & Windows**
269301
```bash

0 commit comments

Comments
 (0)