Skip to content

Commit 429da8d

Browse files
author
Artem Gindinson
committed
Minimize the implementation details and correct errors for Q2
Signed-off-by: Artem Gindinson <[email protected]>
1 parent 9d89e69 commit 429da8d

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

sycl/doc/FAQ.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,19 @@ provide path to SYCL headers directory. Please, refer to you compiler manual
2424
to learn about specific build options.
2525

2626
### Q: How are SYCL compilation phases different from those of a usual C++ compiler? Can I customize this flow for my applications?
27-
**A:** Due to the fact that both host and device code need to be compiled and linked into the final binary, the following steps are
28-
added to the usual C++ compiler flow:
29-
1. Device code needs to be compiled separately to produce a separate device image. The toolchains invoked may slightly differ depending on whether
30-
you wish to compile the device kernels "ahead-of-time", or let the device code be JIT-compiled in runtime. Here, the greatest difference
31-
would be a device-specific BE compiler getting invoked in ahead-of-time compilation mode.
32-
2. To link host/device objects successfully, a so-called integration header needs to be generated. In nature, it is a usual C++ header file
33-
that makes use of OpenCL API. It is automatically produced by SYCL compiler after device code analysis. SYCL compiler mixes the integration
34-
header into the preprocessed host code, and only then compiles all relevant files into a host object (.o) file.
27+
**A:** Due to the fact that both host and device code need to be compiled and linked into the final binary, the compilation steps sequence
28+
is more complicated compared to the usual C++ flow.
3529

3630
In general, we encourage our users to rely on SYCL Compiler for handling all of the compilation phases "under the hood". However, thorough
3731
understanding of the above-described steps may allow you to customize your compilation by invoking different phases manually.
3832
As an example, you could:
3933
1. preprocess your host code with another C++-capable compiler;
4034
2. turn to SYCL compiler for generating the integration header and compiling the device code for the needed target(s);
4135
3. use your preferred host compiler from 1) to compile your preprocessed host code and the integration header into a host object;
42-
4. use your preferred linker to link the host object and the device image(s) into the final executable.
36+
4. link the host object and the device image(s) into the final executable.
4337

44-
To learn more about the concepts mentioned, and the internals of SYCL compiler as such, we welcome you to study our
45-
[SYCL Compiler and Runtime architecture design](SYCLCompilerAndRuntimeDesign.md)
38+
To learn more about the concepts behind this flow, and the internals of SYCL compiler as such,
39+
we welcome you to study our [SYCL Compiler and Runtime architecture design](SYCLCompilerAndRuntimeDesign.md)
4640
document.
4741

4842

0 commit comments

Comments
 (0)