Skip to content

Commit b0d9167

Browse files
JackAKirkPennycook
andauthored
Update sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc
Reword spec note to generalize beyond dpc++ compiler Co-authored-by: John Pennycook <[email protected]>
1 parent 3f70ded commit b0d9167

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ _T_ is restricted to types that have a trivial destructor. _PropertyListT_ enabl
199199

200200
[NOTE]
201201
====
202-
If _T_ is prepended `const` then in the cuda and hip backends the compiler will use the constant address space for the `device_global` instead of the global address space. This allows for optimizations such as using the Nvidia constant cache, and is equivalent to usage of `$$__constant__$$` in the CUDA and HIP native programming languages.
202+
If _T_ is `const` then implementations may choose to allocate the `device_global` in a dedicated constant address space as an optimization. When using the {dpcpp} compiler with the CUDA or HIP backend, declaring a `device_global<const T>` is equivalent to declaring a `$$__constant__$$` variable.
203203
====
204204

205205
When compiling with {cpp} versions before {cpp}20, _T_ must also have a trivial default constructor. In this case, the allocation of type _T_ for a given `device_global` is zero-initialized on a given device prior to the first access to that `device_global` on that device. For the purposes of this definition an access can be a direct access of the `device_global` in kernel code or a copy to or from that `device_global` enqueued to the given device.

0 commit comments

Comments
 (0)