@@ -61,22 +61,11 @@ to a device global variable declaration. The intent of this property is to
61
61
allow a device global variable to be implemented directly on top of a SPIR-V
62
62
module scope global variable. When this property is ** not** present, an
63
63
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.
80
69
81
70
The important impact on the design, though, is that device global variables
82
71
declared with the ` device_image_scope ` property have an implementation that is
0 commit comments