1
- = SYCL_ONEAPI_bfloat16
1
+ = SYCL_INTEL_bf16_conversion
2
2
3
3
:source-highlighter: coderay
4
4
:coderay-linenums-mode: table
@@ -73,7 +73,7 @@ command (e.g. from `parallel_for`).
73
73
This extension provides a feature-test macro as described in the core SYCL
74
74
specification section 6.3.3 "Feature test macros". Therefore, an implementation
75
75
supporting this extension must predefine the macro
76
- `SYCL_EXT_ONEAPI_BFLOAT16_CONVERSION ` to one of the values defined in the table
76
+ `SYCL_EXT_INTEL_BF16_CONVERSION ` to one of the values defined in the table
77
77
below. Applications can test for the existence of this macro to determine if
78
78
the implementation supports this feature, or applications can test the macro’s
79
79
value to determine which of the extension’s APIs the implementation supports.
@@ -91,18 +91,18 @@ the implementation supports this feature, or applications can test the macro’s
91
91
namespace sycl {
92
92
enum class aspect {
93
93
...
94
- ext_oneapi_bfloat16
94
+ ext_intel_bf16_conversion
95
95
}
96
96
}
97
97
----
98
98
99
- If a SYCL device has the `ext_oneapi_bfloat16 ` aspect, then it natively
99
+ If a SYCL device has the `ext_intel_bf16_conversion ` aspect, then it natively
100
100
supports conversion of values of `float` type to `bfloat16` and back.
101
101
102
102
If the device doesn't have the aspect, objects of `bfloat16` class must not be
103
103
used in the device code.
104
104
105
- **NOTE**: The `ext_oneapi_bfloat16 ` aspect is not yet supported. The
105
+ **NOTE**: The `ext_intel_bf16_conversion ` aspect is not yet supported. The
106
106
`bfloat16` class is currently supported only on Xe HP GPU.
107
107
108
108
== New `bfloat16` class
@@ -115,7 +115,7 @@ mode.
115
115
----
116
116
namespace sycl {
117
117
namespace ext {
118
- namespace oneapi {
118
+ namespace intel {
119
119
namespace experimental {
120
120
121
121
class bfloat16 {
@@ -171,7 +171,7 @@ public:
171
171
};
172
172
173
173
} // namespace experimental
174
- } // namespace oneapi
174
+ } // namespace intel
175
175
} // namespace ext
176
176
} // namespace sycl
177
177
----
@@ -277,9 +277,9 @@ OP is `==, !=, <, >, <=, >=`
277
277
[source]
278
278
----
279
279
#include <sycl/sycl.hpp>
280
- #include <sycl/ext/oneapi /experimental/bfloat16.hpp>
280
+ #include <sycl/ext/intel /experimental/bfloat16.hpp>
281
281
282
- using sycl::ext::oneapi ::experimental::bfloat16;
282
+ using sycl::ext::intel ::experimental::bfloat16;
283
283
284
284
bfloat16 operator+(const bfloat16 &lhs, const bfloat16 &rhs) {
285
285
return static_cast<float>(lhs) + static_cast<float>(rhs);
@@ -304,7 +304,7 @@ int main (int argc, char *argv[]) {
304
304
sycl::queue deviceQueue{dev};
305
305
sycl::buffer<float, 1> buf {data, sycl::range<1> {3}};
306
306
307
- if (dev.has(sycl::aspect::ext_oneapi_bfloat16 )) {
307
+ if (dev.has(sycl::aspect::ext_intel_bf16_conversion )) {
308
308
deviceQueue.submit ([&] (sycl::handler& cgh) {
309
309
auto numbers = buf.get_access<sycl::access::mode::read_write> (cgh);
310
310
cgh.single_task<class simple_kernel> ([=] () {
0 commit comments