In ARM's docs, 'BF16 is optionally supported from Armv8.2-A, but becomes mandatory in Arm8.6-A and Armv9.1-A'. I cannot find any materials mention what ISA version that Apple Silicon applied.
However, Apple's ABI (https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms) doesn't include bf16 type.
I write a assembly file contains bf16 instruction.
fmov s0, #0.5
bfcvt h1, s0
And compile the assembly file. It reports error: 'instruction requires: bf16'. It obviously the complier recognized bfcvt instruction, but current platform not support it.
Post
Replies
Boosts
Views
Activity
As I know, there are two options.
One, Aarch64 assembly. You can write inline assembly or call assembly function in C project.
Two, NEON intrinsics. Include <arm_neon.h> to use NEON. Clang will transfer the intrinsics to low level instructions.