win: symbol exports and minor fixes (#3024)
Co-authored-by: Cheng <[email protected]>
This commit is contained in:
+3
-1
@@ -15,7 +15,9 @@ int main(int argc, char** argv) {
|
||||
const char* device = std::getenv("DEVICE");
|
||||
if (device != nullptr && std::string(device) == "cpu") {
|
||||
set_default_device(Device::cpu);
|
||||
} else if (metal::is_available()) {
|
||||
} else if (is_available(Device::gpu)) {
|
||||
// Use generic GPU availability check (works for Metal on macOS, or CUDA on
|
||||
// Linux/Windows)
|
||||
set_default_device(Device::gpu);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user