Skip to content
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

Link with OpenCL by default and expose GNU extensions. #80

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

Nihlus
Copy link
Contributor

@Nihlus Nihlus commented Aug 14, 2024

This PR adds _GNU_SOURCE to the defines, matching what ggml has in its build system. Not having this defined results in a number of macros being taken up as implicitly-defined functions, which are then not found at runtime.

Additionally, OpenCL is added to the linked libraries unless overridden with OpenCL_LIBRARY in the environment variables. This fixes clBuildProgram not being resolved at runtime.

Android and wasm are currently unhandled by this PR - if anyone from the dev team could take a look at that and give me some pointers, I'd very much appreciate it.

Fixes #73.

@fire
Copy link
Member

fire commented Aug 14, 2024

There seems to be some build failures. Need some help looking into it.

@Nihlus
Copy link
Contributor Author

Nihlus commented Aug 14, 2024

There's going to be some fiddling here on my part as I get all the platforms in line with each other.

@Ughuuu
Copy link
Collaborator

Ughuuu commented Aug 14, 2024

Got no clue on this, fire I think did the build system for linux. But mostly I would say it's looking at the CMake from whisper and try to replicate in SConstruct.

Would be really cool tho if we could get all platforms(web included) work and build.

However not in this PR, if build passes thats great already and probl can be merged.

@Nihlus
Copy link
Contributor Author

Nihlus commented Aug 14, 2024

The remaining build errors appear to be either transient problems (x86_64 on Android) or permisson-related things (Mac build succeeds but can't be signed), so I think we're good to go.

However, I'm only getting nonsense back when I try any input on my device, so it's probably prudent to test on someone else's machine with the built binaries to see if it's a local issue.

@Ughuuu
Copy link
Collaborator

Ughuuu commented Aug 14, 2024

Mac signing will pass on main branch. Will make a pr to disable it on non main.

@Ughuuu
Copy link
Collaborator

Ughuuu commented Aug 14, 2024

I guess we can disable android x86 if it's not that used

@Nihlus
Copy link
Contributor Author

Nihlus commented Aug 15, 2024

Android x86_64 passed in a previous commit, so it's probably a temporary issue that'd go away with a re-run. Try restarting the workflow :)

@Ughuuu Ughuuu merged commit c7f42e6 into V-Sekai:main Aug 15, 2024
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors on Godot 4.2
3 participants