Why do I encounter a compilation error about unidentified "__bf16" from arm_neon when using polyspace-configure in MATLAB R2025a?
8 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Sep 2025
Answered: MathWorks Support Team
on 24 Sep 2025 at 15:10
I am trying to complete a Polyspace Bug Finder analysis on my project using "polyspace-configure" at the command line. My project fails to compile due to many instances of the following error:
/usr/local/Polyspace/R2025a/polyspace/verifier/extensions/tmw_builtins/tmw_builtin_types_arm_neon32.h, line 13: error: identifier "__bf16" is undefined
| typedef __attribute__((neon_vector_type(8))) __bf16 __simd128_bfloat16_t;
Why does this error occur, and how can I work around it in MATLAB R2025a?
Accepted Answer
MathWorks Support Team
on 9 Sep 2025
This is a result of an unidentified __bf16 data type. To resolve this, the macro __bf16 must be defined as an unsigned short. This can be done by including the following option when you run the Polyspace analysis:
-D__bf16="unsigned short"
An alternative solution that would include all half float types would be to add these Polyspace options:
-cfe-extra-flags --half_float_types
In the case that other compilation errors are a consequence of this one, they may also be resolved with this workaround.
0 Comments
More Answers (0)
See Also
Categories
Find more on Run Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!