Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix cpu performance debug builds #651

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

vlovich
Copy link
Contributor

@vlovich vlovich commented Feb 13, 2025

Fixes #649 but does not fix the 30% perf reduction from stock CPU llama.cpp cli as I haven't tracked that down.

I first did a cleanup commit that should be identical behavior as before but made the OS target detection logic a lot more robust in cross-compilation environments through the use of an enum instead of ad-hoc places that accidentally used cfg!(windows) / cfg!(target_os =) which pick up the host not the target. Hopefully that's OK. Couldn't find a crate that did this out of the box unfortunately but I didn't look that hard. The second commit that has the fix is a lot smaller.

The OS detection code was bothering me as it wasn't properly doing cross
compilation (some places were and some weren't). Additionally, the OS
detection was a bit haphazard. This is a pure cleanup that parses the
information in TARGET up-front into an enum that is then checked instead
of working with strings.
@MarcusDunn MarcusDunn merged commit 5c8e81b into utilityai:main Feb 14, 2025
2 of 5 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants