darwin: no partial offloading if required memory greater than system

This commit is contained in:
Michael Yang 2024-04-16 11:22:38 -07:00
parent f335722275
commit 41a272de9f
4 changed files with 17 additions and 9 deletions

View file

@ -32,6 +32,7 @@ func CheckVRAM() (uint64, error) {
// gpu not supported, this may not be metal
return 0, nil
}
return uint64(C.getRecommendedMaxVRAM()), nil
}
@ -52,7 +53,7 @@ func GetGPUInfo() GpuInfo {
func getCPUMem() (memInfo, error) {
return memInfo{
TotalMemory: 0,
TotalMemory: uint64(C.getPhysicalMemory()),
FreeMemory: 0,
DeviceCount: 0,
}, nil