metal-flash-attention
metal-flash-attention copied to clipboard
Undefined symbols error
Hi, when I try to compile the GEMM kernel, I get an error: Undefined symbol(s) for architecture 'air64':\n '@air.simdgroup_async_copy_2d.p1i8.p3i8', referenced from:\n _Z10_gemm_implIfEvPU9MTLdeviceT_S2_S2_PU14MTLthreadgroupS0_Dv3_jtt in program_sourc
I've made sure to install Xcode 14.2 and follow your instructions, but it doesn't seem to know what that asm instruction is. I'm currently on an M1 Pro Macbook pro.
Some first attempts to remedy:
- What OS version are you on? I compiled this successfully on later macOS 13 minor versions and macOS 14 Beta. Are you directing the script to compile for macOS or for iOS?
- Can you narrow exactly where in the build process, the failure occurs? When converting
.metal
->.air
, or.air
->.metallib
? You can try inserting someprint("DEBUG MARKER \(any integer)")
statements into the build script at different places, then examining where they appear in the output. - Have you tried entering the directly of the
metal
command from Xcode 14.2, and tested whether that binary will acceptmetal_simdgroup_event
without errors? Next, test whether it will convertGEMM.metal
to AIR. Finally, repeat this procedure with the Xcode 15 binary and confirm the results are not the same.