Skip to content

[SYCL][Doc] Fix TBB installation instructions #951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions sycl/doc/GetStartedWithSYCLCompiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,55 +156,62 @@ CL_CONFIG_DEVICES = fpga-emu
**Linux**

1) Extract the archive. For example, for the archive
`oclcpu_rt_<new_version>.tar.gz` you would run the following commands
`oclcpu_rt_<cpu_version>.tar.gz` you would run the following commands
```bash
mkdir -p /opt/intel/oclcpuexp
cd /opt/intel/oclcpuexp
tar -zxvf oclcpu_rt_<new_version>.tar.gz
mkdir -p /opt/intel/oclcpuexp_<cpu_version>
cd /opt/intel/oclcpuexp_<cpu_version>
tar -zxvf oclcpu_rt_<cpu_version>.tar.gz
```
2) Create ICD file pointing to the new runtime
```bash
echo /opt/intel/oclcpuexp/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd
echo /opt/intel/oclcpuexp_<cpu_version>/x64/libintelocl.so >
/etc/OpenCL/vendors/intel_expcpu.icd
```

3) Extract TBB libraries. For example, for the archive tbb2019_<version>oss_lin.tgz
3) Extract TBB libraries. For example, for the archive tbb-<tbb_version>-lin.tgz

```bash
mkdir -p /opt/intel/tbb
cd /opt/intel/tbb
tar -zxvf tbb2019_<version>oss_lin.tgz
mkdir -p /opt/intel/tbb_<tbb_version>
cd /opt/intel/tbb_<tbb_version>
tar -zxvf tbb*lin.tgz
```

4) Copy files from or create symbolic links to TBB libraries in OpenCL RT folder:
```bash
ln -s /opt/intel/tbb/lib/intel64/gcc4.8/libtbb.so /opt/intel/oclcpuexp/x64/libtbb.so
ln -s /opt/intel/tbb/lib/intel64/gcc4.8/libtbbmalloc.so
ln -s /opt/intel/tbb_<tbb_version>/tbb/lib/intel64/gcc4.8/libtbb.so
/opt/intel/oclcpuexp/x64/libtbb.so
ln -s /opt/intel/tbb_<tbb_version>/tbb/lib/intel64/gcc4.8/libtbbmalloc.so
/opt/intel/oclcpuexp/x64/libtbbmalloc.so
ln -s /opt/intel/tbb_<tbb_version>/tbb/lib/intel64/gcc4.8/libtbb.so.2
/opt/intel/oclcpuexp/x64/libtbb.so.2
ln -s /opt/intel/tbb_<tbb_version>/tbb/lib/intel64/gcc4.8/libtbbmalloc.so.2
/opt/intel/oclcpuexp/x64/libtbbmalloc.so.2
```

5) Configure library paths
```bash
echo /opt/intel/oclcpuexp/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf
echo /opt/intel/oclcpuexp_<cpu_version>/x64 >
/etc/ld.so.conf.d/libintelopenclexp.conf
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf
```
**Windows (64-bit)**
1) If you need `GPU` as well, then update/install it first. Do it **before**
installing `CPU` runtime as `GPU` runtime installer may re-write some important
files or settings and make existing `CPU` runtime not working properly.

2) Extract the archive to some folder. For example, to `c:\oclcpu_rt_<new_version>`
and `c:\tbb2019_<version>oss`.
2) Extract the archive to some folder. For example, to `c:\oclcpu_rt_<cpu_version>`
and `c:\tbb_<tbb_version>`.

3) Run `Command Prompt` as `Administrator`. To do that click `Start` button,
type `Command Prompt`, click the Right mouse button on it, then click
`Run As Administrator`, then click `Yes` to confirm.

4) In the opened windows run `install.bat` provided with the extracted files
to install runtime to the system and setup environment variables. So, if the
extracted files are in `c:\oclcpu_rt_<new_version>\` folder, then type the
extracted files are in `c:\oclcpu_rt_<cpu_version>\` folder, then type the
command:
```bash
c:\oclcpu_rt_<new_version>\install.bat c:\tbb2019_<version>oss\bin\intel64\vc14
c:\oclcpu_rt_<cpu_version>\install.bat c:\tbb_<tbb_version>\tbb\bin\intel64\vc14
```

## Test SYCL toolchain
Expand Down