File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
extension/android/executorch_android/src/main/java/org/pytorch/executorch Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11
11
import android .util .Log ;
12
12
import com .facebook .jni .HybridData ;
13
13
import com .facebook .jni .annotations .DoNotStrip ;
14
+ import com .facebook .soloader .nativeloader .NativeLoader ;
15
+ import com .facebook .soloader .nativeloader .SystemDelegate ;
14
16
import java .io .File ;
15
17
import java .util .HashMap ;
16
18
import java .util .Map ;
26
28
@ Experimental
27
29
public class Module {
28
30
31
+ static {
32
+ if (!NativeLoader .isInitialized ()) {
33
+ NativeLoader .init (new SystemDelegate ());
34
+ }
35
+ // Loads libexecutorch.so from jniLibs
36
+ NativeLoader .loadLibrary ("executorch" );
37
+ }
38
+
29
39
/** Load mode for the module. Load the whole file as a buffer. */
30
40
public static final int LOAD_MODE_FILE = 0 ;
31
41
You can’t perform that action at this time.
0 commit comments