Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Using float16 and bfloat16

ddavobsc
Beginner
356 Views

Is it possible to use the float16 or bfloat16 data types with icx compiler?

I am getting the error:

<source>:7:6: error: no type named 'float16_t' in namespace 'std'
    7 | std::float16_t check_float16_conversion(std::float16_t a, std::float16_t b) {
      | ~~~~~^
<source>:7:46: error: no type named 'float16_t' in namespace 'std'
    7 | std::float16_t check_float16_conversion(std::float16_t a, std::float16_t b) {
      |                                         ~~~~~^
<source>:7:64: error: no type named 'float16_t' in namespace 'std'
    7 | std::float16_t check_float16_conversion(std::float16_t a, std::float16_t b) {
      |                                                           ~~~~~^
3 errors generated.

While trying to compile with icx 2025.2.1 -std=c++23

 

I guess it is not supported yet, but then, how can I use float16 or bfloat16?

0 Kudos
0 Replies
Reply