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

The "Old CPU" version doesn't support really old CPUs #1277

Open
yurivict opened this issue Dec 22, 2024 · 4 comments
Open

The "Old CPU" version doesn't support really old CPUs #1277

yurivict opened this issue Dec 22, 2024 · 4 comments

Comments

@yurivict
Copy link

Describe the Issue
On an older CPU I am getting "Illegal Instruction" crashes because AVX instructions are enabled.
Specifically, the "vxorps" causes the crash.

Please either adjust the "Old CPU" option to be limited only to SSE2, or create another option that would build with only SSE2 enabled.

Additional Information:
On FreeBSD (my OS) all ports are expected to be built by default for a machine that only supports SSE2.
This is used as a pseudo-definition of "Old CPU".
It would be good if koboldcpp would have an option that is compatible with this.

Additionally, I would suggest to add the "Native" option (not ON by default) that would build for the current CPU where the build occurs.

@LostRuins
Copy link
Owner

Use the "Failsafe" option to support even older CPUs. You can trigger it by selecting "Failsafe" or --failsafe from the command line. That option should work for you.

@yurivict
Copy link
Author

"Failsafe" works on my old CPU, thanks.

Two considerations:

  1. The "Failsafe" mode also says "Old CPU" like other options. Maybe you can rename it into "Really Old CPU" ?
  2. The "Failsafe" option isn't available with Vulkan. Old CPU can have a GPU coupled with it.

Perhaps the options should be:
"Use CPU (Really Old CPU)"
"Use Vulkan (Really Old CPU)"
?

Also please consider adding an optional choice "Native".
The user should be able to build for his CPU without thinking which option to choose otherwise.
All target-specific flags should be replaced with -march=native in such case.

@LostRuins
Copy link
Owner

I suppose I could consider building native for windows if the portable flag is unset, though the current setup does already cover most use cases since the number of intrinsics on x86 is limited.

If building on linux, native is already used by default. I am slightly concerned that it might disrupt existing workflows if i do this on windows too.

Native will require you to build the project from source code and the binary will be non-portable, since I cannot predict what hardware is available during compile time, which is when the flags are set. I.e. what is "native" to my pc is NOT the same as yours!

@LostRuins
Copy link
Owner

In the latest release v1.82, CLblast now does not require AVX in the Older CPU option. So that's a good alternative for "Really old cpu"

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

No branches or pull requests

2 participants