Skip to content

[SYCL][Doc] Update table of contexts for Get Started Guide #3177

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 2 commits into from
Feb 8, 2021
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
77 changes: 40 additions & 37 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ and a wide range of compute accelerators such as GPU and FPGA.
* [Build DPC++ toolchain](#build-dpc-toolchain)
* [Build DPC++ toolchain with libc++ library](#build-dpc-toolchain-with-libc-library)
* [Build DPC++ toolchain with support for NVIDIA CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda)
* [Build Doxygen documentation](#build-doxygen-documentation)
* [Use DPC++ toolchain](#use-dpc-toolchain)
* [Install low level runtime](#install-low-level-runtime)
* [Obtain prerequisites for ahead of time (AOT) compilation](#obtain-prerequisites-for-ahead-of-time-aot-compilation)
* [Test DPC++ toolchain](#test-dpc-toolchain)
* [Run simple DPC++ application](#run-simple-dpc-application)
* [Code the program for a specific GPU](#code-the-program-for-a-specific-gpu)
* [Using the DPC++ toolchain on CUDA platforms](#using-the-dpc-toolchain-on-cuda-platforms)
* [C++ standard](#c-standard)
* [Known Issues and Limitations](#known-issues-and-limitations)
* [CUDA backend limitations](#cuda-backend-limitations)
* [CUDA back-end limitations](#cuda-back-end-limitations)
* [Find More](#find-more)

## Prerequisites
Expand Down Expand Up @@ -145,30 +148,30 @@ a Titan RTX GPU (SM 71), but it should work on any GPU compatible with SM 50 or
above. The default SM for the NVIDIA CUDA backend is 5.0. Users can specify
lower values, but some features may not be supported.

### Deployment
### Build Doxygen documentation

TODO: add instructions how to deploy built DPC++ toolchain.
Building Doxygen documentation is similar to building the product itself. First,
the following tools need to be installed:

## Use DPC++ toolchain
* doxygen
* graphviz

### Using the DPC++ toolchain on CUDA platforms
Then you'll need to add the following options to your CMake configuration
command:

The DPC++ toolchain support on CUDA platforms is still in an experimental phase.
Currently, the DPC++ toolchain relies on having a recent OpenCL implementation
on the system in order to link applications to the DPC++ runtime.
The OpenCL implementation is not used at runtime if only the CUDA backend is
used in the application, but must be installed.
```
-DLLVM_ENABLE_DOXYGEN=ON
```

The OpenCL implementation provided by the CUDA SDK is OpenCL 1.2, which is
too old to link with the DPC++ runtime and lacks some symbols.
After CMake cache is generated, build the documentation with `doxygen-sycl`
target. It will be put to `$DPCPP_HOME/llvm/build/tools/sycl/doc/html`
directory.

We recommend installing the low level CPU runtime, following the instructions
in the next section.
### Deployment

Instead of installing the low level CPU runtime, it is possible to build and
install the
[Khronos ICD loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader),
which contains all the symbols required.
TODO: add instructions how to deploy built DPC++ toolchain.

## Use DPC++ toolchain

### Install low level runtime

Expand Down Expand Up @@ -394,25 +397,6 @@ cmake -DIntel_SYCL_ROOT=$DPCPP_HOME/deploy -DSYCL_IMPLEMENTATION=Intel_SYCL ...
cmake -DIntel_SYCL_ROOT=%DPCPP_HOME%\deploy -DSYCL_IMPLEMENTATION=Intel_SYCL ...
```

### Build Doxygen documentation

Building Doxygen documentation is similar to building the product itself. First,
the following tools need to be installed:

* doxygen
* graphviz

Then you'll need to add the following options to your CMake configuration
command:

```
-DLLVM_ENABLE_DOXYGEN=ON
```

After CMake cache is generated, build the documentation with `doxygen-sycl`
target. It will be put to `$DPCPP_HOME/llvm/build/tools/sycl/doc/html`
directory.

### Run simple DPC++ application

A simple DPC++ or SYCL\* program consists of following parts:
Expand Down Expand Up @@ -634,6 +618,25 @@ class CUDASelector : public cl::sycl::device_selector {
};
```

### Using the DPC++ toolchain on CUDA platforms

The DPC++ toolchain support on CUDA platforms is still in an experimental phase.
Currently, the DPC++ toolchain relies on having a recent OpenCL implementation
on the system in order to link applications to the DPC++ runtime.
The OpenCL implementation is not used at runtime if only the CUDA backend is
used in the application, but must be installed.

The OpenCL implementation provided by the CUDA SDK is OpenCL 1.2, which is
too old to link with the DPC++ runtime and lacks some symbols.

We recommend installing the low level CPU runtime, following the instructions
in the next section.

Instead of installing the low level CPU runtime, it is possible to build and
install the
[Khronos ICD loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader),
which contains all the symbols required.

## C++ standard

* DPC++ runtime and headers require C++14 at least.
Expand Down