-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Add VisionOS compatibility by adding missing type definitions #11019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…common and ggml source files. This update includes conditional type definitions for `u_int`, `u_char`, `u_short`, and `uint` to address legacy type issues on VisionOS across multiple files: common.cpp, ggml-backend.cpp, ggml-cpu.c, ggml-cpu.cpp, and ggml-metal.m.
In e7da954 I removed the |
Forgive my PR title btw.. generated.. or edited.. no idea what happened there hah! What do you mean invalid? sure the code does not use it.. but apple code does. This does not fix anything in this codebase, it fixes issues within Apple codebase sadly. As I explained here |
The alternative is waiting apple to fix their own issues, which might take undefined amount of time vs few lines here. |
The fix is quite ugly, so I am looking for ways to avoid this. Could you first demonstrate the issue by adding a CI workflow for visionOS that fails? We already have one for tvOS, so I suppose it would not be too difficult to add one for visionOS. After we reproduce the errors, we can reconsider how to fix those. |
Done: #11065 PS: Consider github CI has an ancient version of Vision SDK, but I think the errors will come up nevertheless |
Fix visionOS compilation errors with legacy type definitions
The visionOS SDK doesn't include several legacy Unix type definitions that are present in other Apple platforms. Fixed compilation errors by:
u_int
withunsigned int
uint
withunsigned int
This allows the code to compile cleanly on visionOS while maintaining compatibility with other platforms. The changes are minimal and don't affect functionality, just addressing type definitions that aren't available in the modernized visionOS SDK.
Fixes compilation errors such as: