diff --git a/ml-algorithms/build.gradle b/ml-algorithms/build.gradle index 7f004adb07..b81ac5929d 100644 --- a/ml-algorithms/build.gradle +++ b/ml-algorithms/build.gradle @@ -51,9 +51,8 @@ dependencies { implementation("ai.djl.onnxruntime:onnxruntime-engine:0.21.0") { exclude group: "com.microsoft.onnxruntime", module: "onnxruntime" } - def os = DefaultNativePlatform.currentOperatingSystem - //mac doesn't support GPU - if (os.macOsX) { + //arm doesn't support GPU + if (System.getProperty("os.arch") == "aarch64") { dependencies { implementation "com.microsoft.onnxruntime:onnxruntime:1.14.0" } @@ -122,4 +121,4 @@ spotless { eclipse().configFile rootProject.file('.eclipseformat.xml') } -} \ No newline at end of file +}