Why do I encounter a compilation error about unidentified "__bf16" from arm_neon when using polyspace-configure in MATLAB R2025a?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 9 Sep. 2025
Beantwortet: MathWorks Support Team
am 24 Sep. 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?
Akzeptierte Antwort
MathWorks Support Team
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Run Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!