Why do I encounter a compilation error about unidentified "__bf16" from arm_neon when using polyspace-configure in MATLAB R2025a?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 9 Set 2025
Risposto: MathWorks Support Team
il 24 Set 2025
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?
Risposta accettata
MathWorks Support Team
il 9 Set 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Run Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!