From 0e290d33e8db87de6e5bce674710315b45696d80 Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Thu, 27 Jan 2022 16:38:03 -0800 Subject: [PATCH] [pytorch] Fix load native library failure on Android 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();