Skip to content

Commit 23f37ea

Browse files
committed
Rewrite documentation using asciidoc template
Rewrite as requested. Document current restrictions with the simulator selector affecting hardware.
1 parent 1be2e53 commit 23f37ea

File tree

2 files changed

+126
-51
lines changed

2 files changed

+126
-51
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
= sycl_ext_fpga_selector
2+
3+
:source-highlighter: coderay
4+
:coderay-linenums-mode: table
5+
6+
// This section needs to be after the document title.
7+
:doctype: book
8+
:toc2:
9+
:toc: left
10+
:encoding: utf-8
11+
:lang: en
12+
:dpcpp: pass:[DPC++]
13+
14+
// Set the default source code type in this document to C++,
15+
// for syntax highlighting purposes. This is needed because
16+
// docbook uses c++ and html5 uses cpp.
17+
:language: {basebackend@docbook:c++:cpp}
18+
19+
20+
== Notice
21+
22+
[%hardbreaks]
23+
Copyright (C) 2022-2022 Intel Corporation. All rights reserved.
24+
25+
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
26+
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
27+
permission by Khronos.
28+
29+
30+
== Contact
31+
32+
To report problems with this extension, please open a new issue at:
33+
34+
https://github.com/intel/llvm/issues
35+
36+
37+
== Dependencies
38+
39+
This extension is written against the SYCL 2020 revision 5 specification. All
40+
references below to the "core SYCL specification" or to section numbers in the
41+
SYCL specification refer to that revision.
42+
43+
== Status
44+
45+
_Use this if the extension becomes "supported":_
46+
47+
This extension is implemented and fully supported by {dpcpp}.
48+
49+
[NOTE]
50+
====
51+
This extension is currently implemented in {dpcpp} only for FPGA devices.
52+
In the {dpcpp} implementation, the application must be built with
53+
"-Xshardware" in order to use an FPGA hardware device.
54+
In the {dpcpp} implementation, the application must be built with
55+
"-Xssimulation" in order to use an FPGA simulator device.
56+
====
57+
58+
59+
== Overview
60+
61+
This extension provides selectors to choose between FPGA hardware devices, FPGA
62+
simulator devices, and FPGA emulator devices. The current implementation is
63+
based on the platform name. This is useful in the most common case when the
64+
user has one FPGA board installed in their system (one device per platform).
65+
66+
To use these selectors, add
67+
....
68+
#include <sycl/ext/intel/fpga_device_selector.hpp>
69+
....
70+
to your source code.
71+
72+
73+
== Specification
74+
75+
=== Select FPGA hardware device
76+
....
77+
// force FPGA hardware device
78+
sycl::queue deviceQueue{sycl::ext::intel::fpga_selector{}};
79+
....
80+
81+
=== Select FPGA simulator device
82+
....
83+
// force FPGA simulator device
84+
sycl::queue deviceQueue{sycl::ext::intel::fpga_simulator_selector{}};
85+
....
86+
87+
=== Select FPGA emulator device
88+
....
89+
// force FPGA emulator device
90+
sycl::queue deviceQueue{sycl::ext::intel::fpga_emulator_selector{}};
91+
....
92+
93+
=== Feature test macro
94+
95+
This extension provides a feature-test macro as described in the core SYCL
96+
specification. An implementation supporting this extension must predefine the
97+
macro `SYCL_EXT_INTEL_FPGA_DEVICE_SELECTOR` to one of the values defined in the table
98+
below. Applications can test for the existence of this macro to determine if
99+
the implementation supports this feature, or applications can test the macro's
100+
value to determine which of the extension's features the implementation
101+
supports.
102+
103+
_And follow the text with a table like this *unless the extension is
104+
"experimental"*. Note that your table may have more than one row if it
105+
has multiple versions._
106+
107+
[%header,cols="1,5"]
108+
|===
109+
|Value
110+
|Description
111+
112+
|1
113+
|Initial version of this extension. Base features are supported.
114+
115+
|2
116+
|fpga_simulator_selector added.
117+
|===
118+
119+
== Implementation notes
120+
121+
The current implementation has a restriction on the use of
122+
+{fpga_simulator_selector}+. If an object of +{fpga_simulator_selector}+ is
123+
defined in the application, FPGA hardware devices selected using
124+
+{fpga_selector}+ will select a simulator device. This behaviour is expected to
125+
be eliminated in the future.
126+

sycl/doc/extensions/supported/sycl_ext_intel_fpga_device_selector.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)