@@ -344,21 +344,17 @@ To illustrate, the type `sycl::half` is an optional feature whose associated
344
344
aspect is ` aspect::fp16 ` . We therefore decorate the declaration like this:
345
345
346
346
```
347
- using half [[__sycl_detail__::__uses_aspects__(aspect::fp16)]] =
348
- cl::sycl::detail::half_impl::half;
349
- ```
350
-
351
- If an optional feature is expressed as a class type, it can be similarly
352
- decorated (here illustrating a hypothetical AMX type):
347
+ namespace sycl::detail::half_impl {
353
348
354
- ```
355
- class [[__sycl_detail__::__uses_aspects__(aspect::ext_intel_amx)]] amx_type {
356
- /* ... */
349
+ class [[__sycl_detail__::__uses_aspects__(aspect::fp16)]] half {
350
+ /* ... */
357
351
};
352
+
353
+ } // namespace sycl::detail::half_impl;
358
354
```
359
355
360
356
This attribute is also used to decorate function declarations that correspond
361
- to optional features. Again, illustrating a hypothetical AMX extension:
357
+ to optional features. Illustrating a hypothetical AMX extension:
362
358
363
359
```
364
360
[[__sycl_detail__::__uses_aspects__(aspect::ext_intel_amx)]]
@@ -382,10 +378,11 @@ might be decorated with
382
378
` [[sycl_detail::uses_aspects(aspect::fp64, aspect::atomic64)]] ` ).
383
379
384
380
Unfortunately, the fundamental type ` double ` is also an optional kernel
385
- feature. Since there is no type alias for ` double ` , there is no convenient
386
- place to add an attribute. Instead, the FE device compiler must behave as
387
- though there was an implicit ` [[sycl_detail::uses_aspects(aspect::fp64)]] `
388
- attribute for any device code that uses the ` double ` type.
381
+ feature. Since there is no type definition for ` double ` in the headers, there
382
+ is no convenient place to add an attribute. Instead, the FE device compiler
383
+ must behave as though there was an implicit
384
+ ` [[sycl_detail::uses_aspects(aspect::fp64)]] ` attribute for any device code
385
+ that uses the ` double ` type.
389
386
390
387
391
388
### New LLVM IR metadata
0 commit comments