From 4655660da90683703151c070e75c34a3ad1a9a4c Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Fri, 28 Jan 2022 11:26:06 -0800 Subject: [PATCH] [pytorch] Fix load native library failure on Android (#1485) Change-Id: Ic255c90bcba5a99aa467a104305f5fe4d7af5620 --- .../src/main/java/ai/djl/pytorch/jni/LibUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/pytorch/pytorch-engine/src/main/java/ai/djl/pytorch/jni/LibUtils.java b/engines/pytorch/pytorch-engine/src/main/java/ai/djl/pytorch/jni/LibUtils.java index 3395cbb7140..1a7c5d4aca8 100644 --- a/engines/pytorch/pytorch-engine/src/main/java/ai/djl/pytorch/jni/LibUtils.java +++ b/engines/pytorch/pytorch-engine/src/main/java/ai/djl/pytorch/jni/LibUtils.java @@ -65,7 +65,7 @@ public static synchronized void loadLibrary() { // TODO workaround to make it work on Android Studio // It should search for several places to find the native library if ("http://www.android.com/".equals(System.getProperty("java.vendor.url"))) { - System.loadLibrary(JNI_LIB_NAME); // NOPMD + System.loadLibrary("djl_torch"); // NOPMD return; } libTorch = getLibTorch();