mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-26 08:09:16 -04:00
feat(default): use number of physical cores as default (#2483)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
1ffee9989f
commit
bdd6769b2d
3 files changed
+12
-2
No files matched your search
@@ -36,3 +36,10 @@ func CPUCapabilities() ([]string, error) {
|
||||
func HasCPUCaps(ids ...cpuid.FeatureID) bool {
|
||||
return cpuid.CPU.Supports(ids...)
|
||||
}
|
||||
|
||||
func CPUPhysicalCores() int {
|
||||
if cpuid.CPU.PhysicalCores == 0 {
|
||||
return 1
|
||||
}
|
||||
return cpuid.CPU.PhysicalCores
|
||||
}
|
||||
Reference in new issue
Block a user