From ad95caf5d57a6527f1ffaf6c48f7a3413ecbb004 Mon Sep 17 00:00:00 2001 From: petebankhead Date: Tue, 7 Jan 2025 11:17:54 +0000 Subject: [PATCH] Enable MPS on Mac always Seems it isn't limited to usefulness on Apple Silicon. See https://github.com/qupath/qupath-extension-instanseg/issues/118 We can't verify this, but it does improve things substantially when running the Intel build on Apple Silicon (still required for CZI files, for example) - so is beneficial anyway. --- src/main/java/qupath/ext/instanseg/core/PytorchManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/qupath/ext/instanseg/core/PytorchManager.java b/src/main/java/qupath/ext/instanseg/core/PytorchManager.java index f0ba496..53b5eb4 100644 --- a/src/main/java/qupath/ext/instanseg/core/PytorchManager.java +++ b/src/main/java/qupath/ext/instanseg/core/PytorchManager.java @@ -50,7 +50,7 @@ public static Collection getAvailableDevices() { availableDevices.add(name); } // If we could use MPS, but don't have it already, add it - if (GeneralTools.isMac() && "aarch64".equals(System.getProperty("os.arch"))) { + if (GeneralTools.isMac()) { availableDevices.add("mps"); } // CPU should always be available