Skip to content

Commit e6938d8

Browse files
committed
Apply comments. Add a note about host compiler identification macro
1 parent b4a90d3 commit e6938d8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

sycl/doc/design/MappingHostAddressesToDeviceEntities.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ the first one with integration footer and another one with modification of the
3838
host compiler.
3939

4040
Both approaches have their pros and cons and they are expected to be implemented
41-
and exists in the implementation at the same time, but only one of them will be
41+
and exist in the implementation at the same time, but only one of them will be
4242
used at a time depending on whether 3rd-party host compiler is used or not.
4343

4444
Integration footer can be used with 3rd-party host compilers, but it requires
@@ -77,7 +77,7 @@ things:
7777
unique string identifier of a variable it is attached to. The rules for
7878
creating this string are the same as for `__builtin_sycl_unique_stable_id` and
7979
the same algorithm can be used when generating the string for the attribute
80-
- emit `sycl-uid-type` LLVM IR attribute alongside `sycl-unique-id`, which
80+
- emit `sycl-uid-kind` LLVM IR attribute alongside `sycl-unique-id`, which
8181
contains the `kind` string passed to
8282
`[[__sycl_detail__::uniquely_identifiable_object(kind)]]` attribute
8383

@@ -99,10 +99,14 @@ attributes should appear in LLVM IR for both host and device code. When DPC++
9999
compiler is only used as a device compiler, then we don't expect the attribute
100100
to be handled on host, apparently.
101101

102-
Another thing we need from DPC++ FE compiler is to define a special macro, which
103-
will allow to distinguish it from other compilers. That is needed to apply the
104-
aforementioned attribute conditionally to avoid spamming users with warnings
105-
about unknown attributes.
102+
Another thing we need from DPC++ FE host compiler is to define a special macro,
103+
which will allow to distinguish it from other host compilers. That is needed to
104+
apply the aforementioned attribute conditionally to avoid spamming users with
105+
warnings about unknown attributes.
106+
107+
**NOTE:** Alternatively we could simply set a macro which tells us whether or
108+
not integration footer is enabled in the compiler driver instead of creating
109+
a special macro for differentiating our own host compiler.
106110

107111
The suggested macro name is `__INTEL_SYCL_HOST_COMPILER__`. It should be defined
108112
when the compiler is invoked in SYCL host mode (`-fsycl-is-host` `-cc1` flag).

0 commit comments

Comments
 (0)