Skip to content

Commit 5461cda

Browse files
committed
Remove unnecessary device_image_scope wording
Remove some extraneous commentary about the `device_image_scope` property. Details of that property are describe more thoroughly in the extension API specification.
1 parent da11248 commit 5461cda

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

sycl/doc/DeviceGlobal.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,11 @@ to a device global variable declaration. The intent of this property is to
6161
allow a device global variable to be implemented directly on top of a SPIR-V
6262
module scope global variable. When this property is **not** present, an
6363
instance of a device global variable is shared across all device images that
64-
are loaded onto a particular device. This makes it easy for the user to reason
65-
about the scope of a variable because the user need not understand which device
66-
image contains each kernel. However, this semantic makes the implementation
67-
less efficient, especially on FPGA targets.
68-
69-
By contrast, the `device_image_scope` property changes the semantic of a device
70-
global variable such that the user must understand which device image contains
71-
each kernel, which is difficult to reason about. For example, changing the
72-
value of a specialization constant may cause a kernel to be recompiled into a
73-
separate device image on some targets. As a result, a device global variable
74-
referenced in a kernel may actually have several disjoint instances if the
75-
kernel uses specialization constants. This problem is more tractable on FPGA
76-
targets because specialization constants are not implemented via separate
77-
device images on those targets, however, there are other factors that FPGA
78-
users need to be aware of when using the `device_image_scope` property. These
79-
are documented more throughly in the extension specification.
64+
are loaded onto a particular device. By contrast, when this property **is**
65+
present, each device image has its own instance of the device global variable.
66+
However, since multiple variable instances have confusing semantics, the API
67+
requires the user to ensure that each such variable exists in exactly one
68+
device image. The extension specification has more details on this property.
8069

8170
The important impact on the design, though, is that device global variables
8271
declared with the `device_image_scope` property have an implementation that is

0 commit comments

Comments
 (0)