Why do I encounter a compilation error about unidentified "__bf16" from arm_neon when using polyspace-configure in MATLAB R2025a?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Sept. de 2025
Respondida: MathWorks Support Team
el 24 de Sept. de 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?
Respuesta aceptada
MathWorks Support Team
el 9 de Sept. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Run Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!