Float8 and Float16 "Reserved_Name__Do_not_use"

I am developing a macOS terminal app, running on an M4 Pro, and using Metal.

I am not able use float8 or float16, both reporting Variable has incomplete type 'float16' (aka '__Reserved_Name__Do_not_use_float16').

Based on the system I should be able to use these. Either it is because it is also compiling to Intel, which they are not allowed, or something else. Either way I have not been able to figure out how to get past this.

IIs there a compiler setting I need to set to make this work? if so which one and what setting do I need? I only want to run this on M processes, on the latest version of OS so not interested in Intel version or backward compatibility.

If you are referring to shader code, the metal shading language does not use float8 and float16. Instead, you use half for float16.

There is no float8 equivalent. If you're writing to a texture, you can use a format like r8unorm or r8snorm, but those are normalized values; i.e. in [0, 1] or [-1, 1] respectively. And you would write a half or float to it where the gpu implicitly casts.

Hello,

What language are you writing the macOS terminal app with?

The core development is in Swift.

Just for clarification the float4 works fine. So the sims arrays on float4 work great, but the system should support float8 and float16. My understanding is this works fine in IOS development, but there is something specific about MacOS. I believe this is related to Intel not supporting them, but I believe I am compiling in amd64 so no intel setup, just curious why I cannot use float8 or float16, as it offers the potential for considerable more performance.

Float8 and Float16 "Reserved_Name__Do_not_use"
 
 
Q