Skip to content

Commit 5c1472c

Browse files
author
Dirk Seynhaeve
authored
[DOC] Clean up Markdown and fix broken links (#8919)
There are two initial commits in this PR: 1. Make the document more consistent and readable by fixing MarkdownLint violations. 2. Fix broken links (didn't work in the [HTML page](https://intel.github.io/llvm-docs/GetStartedGuide.html#getting-started-with-oneapi-dpc) derived from this). ⚠️ I am assuming that the problematic published HTML page is indeed derived from this Markdown document.
1 parent 6a8e354 commit 5c1472c

File tree

1 file changed

+58
-53
lines changed

1 file changed

+58
-53
lines changed

sycl/doc/GetStartedGuide.md

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,37 @@ The DPC++ Compiler compiles C++ and SYCL\* source files with code for both CPU
44
and a wide range of compute accelerators such as GPU and FPGA.
55

66
## Table of contents
7-
- [Prerequisites](#prerequisites)
8-
- [Create DPC++ workspace](#create-dpc-workspace)
9-
- [Build DPC++ toolchain](#build-dpc-toolchain)
10-
- [Build DPC++ toolchain with libc++ library](#build-dpc-toolchain-with-libc-library)
11-
- [Build DPC++ toolchain with support for NVIDIA CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda)
12-
- [Build DPC++ toolchain with support for HIP AMD](#build-dpc-toolchain-with-support-for-hip-amd)
13-
- [Build DPC++ toolchain with support for HIP NVIDIA](#build-dpc-toolchain-with-support-for-hip-nvidia)
14-
- [Build DPC++ toolchain with support for ESIMD CPU Emulation](#build-dpc-toolchain-with-support-for-esimd-cpu-emulation)
15-
- [Build DPC++ toolchain with support for runtime kernel fusion](#build-dpc-toolchain-with-support-for-runtime-kernel-fusion)
16-
- [Build Doxygen documentation](#build-doxygen-documentation)
17-
- [Deployment](#deployment)
18-
- [Use DPC++ toolchain](#use-dpc-toolchain)
19-
- [Install low level runtime](#install-low-level-runtime)
20-
- [Obtain prerequisites for ahead of time (AOT) compilation](#obtain-prerequisites-for-ahead-of-time-aot-compilation)
21-
- [GPU](#gpu)
22-
- [CPU](#cpu)
23-
- [Accelerator](#accelerator)
24-
- [Test DPC++ toolchain](#test-dpc-toolchain)
25-
- [Run in-tree LIT tests](#run-in-tree-lit-tests)
26-
- [Run DPC++ E2E test suite](#run-dpc-e2e-test-suite)
27-
- [Run Khronos\* SYCL\* conformance test suite (optional)](#run-khronos-sycl-conformance-test-suite-optional)
28-
- [Run simple DPC++ application](#run-simple-dpc-application)
29-
- [Build DPC++ application with CMake](#build-dpc-application-with-cmake)
30-
- [Code the program for a specific GPU](#code-the-program-for-a-specific-gpu)
31-
- [Using the DPC++ toolchain on CUDA platforms](#using-the-dpc-toolchain-on-cuda-platforms)
32-
- [C++ standard](#c-standard)
33-
- [Known Issues and Limitations](#known-issues-and-limitations)
34-
- [CUDA back-end limitations](#cuda-back-end-limitations)
35-
- [HIP back-end limitations](#hip-back-end-limitations)
36-
- [Find More](#find-more)
7+
8+
* [Prerequisites](#prerequisites)
9+
* [Create DPC++ workspace](#create-dpc-workspace)
10+
* [Build DPC++ toolchain](#build-dpc-toolchain)
11+
* [Build DPC++ toolchain with libc++ library](#build-dpc-toolchain-with-libc-library)
12+
* [Build DPC++ toolchain with support for NVIDIA CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda)
13+
* [Build DPC++ toolchain with support for HIP AMD](#build-dpc-toolchain-with-support-for-hip-amd)
14+
* [Build DPC++ toolchain with support for HIP NVIDIA](#build-dpc-toolchain-with-support-for-hip-nvidia)
15+
* [Build DPC++ toolchain with support for ESIMD CPU Emulation](#build-dpc-toolchain-with-support-for-esimd-cpu-emulation)
16+
* [Build DPC++ toolchain with support for runtime kernel fusion](#build-dpc-toolchain-with-support-for-runtime-kernel-fusion)
17+
* [Build Doxygen documentation](#build-doxygen-documentation)
18+
* [Deployment](#deployment)
19+
* [Use DPC++ toolchain](#use-dpc-toolchain)
20+
* [Install low level runtime](#install-low-level-runtime)
21+
* [Obtain prerequisites for ahead of time (AOT) compilation](#obtain-prerequisites-for-ahead-of-time-aot-compilation)
22+
* [GPU](#gpu)
23+
* [CPU](#cpu)
24+
* [Accelerator](#accelerator)
25+
* [Test DPC++ toolchain](#test-dpc-toolchain)
26+
* [Run in-tree LIT tests](#run-in-tree-lit-tests)
27+
* [Run DPC++ E2E test suite](#run-dpc-e2e-test-suite)
28+
* [Run Khronos\* SYCL\* conformance test suite (optional)](#run-khronos-sycl-conformance-test-suite-optional)
29+
* [Run simple DPC++ application](#run-simple-dpc-application)
30+
* [Build DPC++ application with CMake](#build-dpc-application-with-cmake)
31+
* [Code the program for a specific GPU](#code-the-program-for-a-specific-gpu)
32+
* [Using the DPC++ toolchain on CUDA platforms](#using-the-dpc-toolchain-on-cuda-platforms)
33+
* [C++ standard](#c-standard)
34+
* [Known Issues and Limitations](#known-issues-and-limitations)
35+
* [CUDA back-end limitations](#cuda-back-end-limitations)
36+
* [HIP back-end limitations](#hip-back-end-limitations)
37+
* [Find More](#find-more)
3738

3839
## Prerequisites
3940

@@ -51,7 +52,7 @@ and a wide range of compute accelerators such as GPU and FPGA.
5152
Alternatively, you can use a Docker image that has everything you need for building
5253
pre-installed:
5354

54-
```
55+
```sh
5556
docker run --name sycl_build -it -v /local/workspace/dir/:/src ghcr.io/intel/llvm/ubuntu2004_base /bin/bash
5657
```
5758

@@ -122,7 +123,7 @@ flags can be found by launching the script with `--help`):
122123
* `--cuda` -> use the cuda backend (see [Nvidia CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda))
123124
* `--hip` -> use the HIP backend (see [HIP](#build-dpc-toolchain-with-support-for-hip-amd))
124125
* `--hip-platform` -> select the platform used by the hip backend, `AMD` or `NVIDIA` (see [HIP AMD](#build-dpc-toolchain-with-support-for-hip-amd) or see [HIP NVIDIA](#build-dpc-toolchain-with-support-for-hip-nvidia))
125-
* `--enable-esimd-emulator` -> enable ESIMD CPU emulation (see [ESIMD CPU emulation](#build-dpc-toolchain-with-support-for-esimd-cpu))
126+
* `--enable-esimd-emulator` -> enable ESIMD CPU emulation (see [ESIMD CPU emulation](#build-dpc-toolchain-with-support-for-esimd-cpu-emulation))
126127
* `--enable-all-llvm-targets` -> build compiler (but not a runtime) with all
127128
supported targets
128129
* `--shared-libs` -> Build shared libraries
@@ -152,23 +153,25 @@ should be used.
152153

153154
**Linux**:
154155

155-
```
156+
```sh
156157
-DSYCL_USE_LIBCXX=ON \
157158
-DSYCL_LIBCXX_INCLUDE_PATH=<path to libc++ headers> \
158159
-DSYCL_LIBCXX_LIBRARY_PATH=<path to libc++ and libc++abi libraries>
159160
```
161+
160162
You can also use configure script to enable:
161163

162-
```
164+
```sh
163165
python %DPCPP_HOME%\llvm\buildbot\configure.py --use-libcxx \
164166
--libcxx-include <path to libc++ headers> \
165167
--libcxx-library <path to libc++ and libc++ abi libraries>
166168
python %DPCPP_HOME%\llvm\buildbot\compile.py
167169
```
170+
168171
### Build DPC++ toolchain with support for NVIDIA CUDA
169172

170173
To enable support for CUDA devices, follow the instructions for the Linux or
171-
Windows DPC++ toolchain, but add the `--cuda` flag to `configure.py`. Note,
174+
Windows DPC++ toolchain, but add the `--cuda` flag to `configure.py`. Note,
172175
the CUDA backend has Windows support; windows subsystem for
173176
linux (WSL) is not needed to build and run the CUDA backend.
174177

@@ -181,7 +184,7 @@ or
181184

182185
Errors may occur if DPC++ is built with a toolkit version which is higher than
183186
the CUDA driver version. In order to check that the CUDA driver and toolkits
184-
match, use the CUDA executable `deviceQuery` which is usually found in
187+
match, use the CUDA executable `deviceQuery` which is usually found in
185188
`$CUDA_INSTALL_DIR/cuda/extras/demo_suite/deviceQuery`.
186189

187190
**_NOTE:_** An installation of at least
@@ -200,15 +203,15 @@ The CUDA backend should work on Windows or Linux operating systems with any
200203
GPU compatible with SM 50 or above. The default SM for the NVIDIA CUDA backend
201204
is 5.0. Users can specify lower values, but some features may not be supported.
202205

203-
**Non-standard CUDA location**
206+
**Non-standard CUDA location**:
204207

205208
If the CUDA toolkit is installed in a non-default location on your system, two considerations must be made.
206209

207210
Firstly, **do not** add the toolkit to your standard environment variables (`PATH`, `LD_LIBRARY_PATH`), as to do so will create conflicts with OpenCL headers.
208211

209212
Secondly, set the `CUDA_LIB_PATH` environment variable and pass the CMake variable `CUDA_TOOLKIT_ROOT_DIR` as follows:
210213

211-
```
214+
```sh
212215
CUDA_LIB_PATH=/path/to/cuda/toolkit/lib64/stubs CC=gcc CXX=g++ python $DPCPP_HOME/llvm/buildbot/configure.py --cuda --cmake-opt="-DCUDA_TOOLKIT_ROOT_DIR=/path/to/cuda/toolkit"
213216

214217
CUDA_LIB_PATH=/path/to/cuda/toolkit/lib64/stubs CC=gcc CXX=g++ python $DPCPP_HOME/llvm/buildbot/compile.py
@@ -236,7 +239,7 @@ is installed somewhere else, the directory must be provided through
236239
the CMake variable `SYCL_BUILD_PI_HIP_ROCM_DIR` which can be passed
237240
using the `--cmake-opt` option of `configure.py` as follows:
238241

239-
```
242+
```sh
240243
python $DPCPP_HOME/llvm/buildbot/configure.py --hip \
241244
--cmake-opt=-DSYCL_BUILD_PI_HIP_ROCM_DIR=/usr/local/rocm
242245
```
@@ -287,24 +290,24 @@ the Linux DPC++ toolchain, but add the `--enable-esimd-emulator'.
287290
Enabling this flag requires following packages installed.
288291

289292
* Ubuntu 20.04
290-
* libva-dev / 2.7.0-2
291-
* libffi-dev / 3.3-4
292-
* libtool
293+
* libva-dev / 2.7.0-2
294+
* libffi-dev / 3.3-4
295+
* libtool
293296
* RHEL 8.*
294-
* libffi
295-
* libffi-devel
296-
* libva
297-
* libva-devel
297+
* libffi
298+
* libffi-devel
299+
* libva
300+
* libva-devel
298301

299302
Currently, this feature was tested and verified on Ubuntu 20.04
300303
environment.
301304

302305
### Build DPC++ toolchain with support for runtime kernel fusion
303306

304-
Support for the experimental SYCL extension for user-driven kernel fusion
305-
at runtime is enabled by default.
307+
Support for the experimental SYCL extension for user-driven kernel fusion
308+
at runtime is enabled by default.
306309

307-
To disable support for this feature, follow the instructions for the
310+
To disable support for this feature, follow the instructions for the
308311
Linux DPC++ toolchain, but add the `--disable-fusion` flag.
309312

310313
Kernel fusion is currently not yet supported on the Windows platform.
@@ -321,7 +324,7 @@ the following tools need to be installed:
321324
Then you'll need to add the following options to your CMake configuration
322325
command:
323326

324-
```
327+
```sh
325328
-DLLVM_ENABLE_DOXYGEN=ON
326329
```
327330

@@ -506,6 +509,7 @@ Make sure that these binaries are available in `PATH` environment variable:
506509
* `aocl-ioc64` from `<oneAPI installation location>/compiler/<version>/<OS>/bin`
507510
508511
### Test DPC++ toolchain
512+
509513
#### Run in-tree LIT tests
510514
511515
To verify that built DPC++ toolchain is working correctly, run:
@@ -521,6 +525,7 @@ python $DPCPP_HOME/llvm/buildbot/check.py
521525
```bat
522526
python %DPCPP_HOME%\llvm\buildbot\check.py
523527
```
528+
524529
Make sure that psutil package is installed.
525530
If no OpenCL GPU/CPU runtimes are available, the corresponding tests are
526531
skipped.
@@ -650,8 +655,8 @@ clang++ -fsycl -fsycl-targets=amdgcn-amd-amdhsa \
650655
simple-sycl-app.cpp -o simple-sycl-app-amd.exe
651656
```
652657
653-
The target architecture may also be specified for the CUDA backend, with
654-
`-Xsycl-target-backend --cuda-gpu-arch=<arch>`. Specifying the architecture is
658+
The target architecture may also be specified for the CUDA backend, with
659+
`-Xsycl-target-backend --cuda-gpu-arch=<arch>`. Specifying the architecture is
655660
necessary if an application aims to use newer hardware features, such as
656661
native atomic operations or tensor core operations.
657662
Moreover, it is possible to pass specific options to CUDA `ptxas` (such as
@@ -893,7 +898,7 @@ which contains all the symbols required.
893898
894899
## Find More
895900
896-
* [DPC++ specification](https://spec.oneapi.io/versions/latest/elements/dpcpp/source/index.html)
901+
* [DPC++ specification](https://spec.oneapi.io/versions/latest/)
897902
* [SYCL\* specification](https://www.khronos.org/registry/SYCL)
898903
* [Level Zero specification](https://spec.oneapi.io/level-zero/latest/index.html)
899904

0 commit comments

Comments
 (0)