Greetings!
I have an app that builds ad runs just fine in XCode 11 on Catalina on an old Intel MBP. I've recently purchased an M3 Max machine and want to bring this app forward.
Just going from XCode 11 to XCode 12 on the old machine, not even trying yet to up to XCode 14 or 15 on the new machine, I get two build errors that I have no idea how to resolve, both in bnns.h. I have not deliberately included this framework, and text search in my project and dependencies finds no incidence of "bnns" at all.
These occur in the function prototypes for BNNSApplyMultiheadAttention and BNNSApplyMultiheadAttentionBackward. These prototypes look okay to me, and again I didn't deliberately invoke them in the first place.
Does anybody have any idea how I can get past this roadblock?
p.s. this is what the first prototype looks like; no unbalanced parens here (spacing edited for readability):
int BNNSApplyMultiheadAttention(BNNSFilter F, size_t batch_size,
void const* query, size_t query_stride,
void const* key, size_t key_stride,
BNNSNDArrayDescriptor const* _Nullable key_mask, size_t key_mask_stride,
void const* value, size_t value_stride,
void *output, size_t output_stride,
BNNSNDArrayDescriptor const* _Nullable add_to_attention,
size_t * _Nullable backprop_cache_size, void * _Nullable backprop_cache,
size_t * _Nullable workspace_size, void * _Nullable workspace)
Yet again I find myself agreeing with Etresoft (-:
For context, I tried this here in my office and I didn’t have a problem. Specifically:
-
Using Xcode 16.4 on macOS 15.4, I created a new project from the macOS > Command Line Tool template, choosing C as the language.
-
I replaced
main.c
with the code shown below. -
The project built just fine.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
#include <stdio.h>
#include <Accelerate/Accelerate.h>
int BNNSApplyMultiheadAttention(BNNSFilter F, size_t batch_size,
void const* query, size_t query_stride,
void const* key, size_t key_stride,
BNNSNDArrayDescriptor const* _Nullable key_mask, size_t key_mask_stride,
void const* value, size_t value_stride,
void *output, size_t output_stride,
BNNSNDArrayDescriptor const* _Nullable add_to_attention,
size_t * _Nullable backprop_cache_size, void * _Nullable backprop_cache,
size_t * _Nullable workspace_size, void * _Nullable workspace)
{
abort();
}
int main(int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
return 0;
}