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 1111import android .util .Log ;
1212import com .facebook .jni .HybridData ;
1313import com .facebook .jni .annotations .DoNotStrip ;
14+ import com .facebook .soloader .nativeloader .NativeLoader ;
15+ import com .facebook .soloader .nativeloader .SystemDelegate ;
1416import java .io .File ;
1517import java .util .HashMap ;
1618import java .util .Map ;
2628@ Experimental
2729public class Module {
2830
31+ static {
32+ if (!NativeLoader .isInitialized ()) {
33+ NativeLoader .init (new SystemDelegate ());
34+ }
35+ // Loads libexecutorch.so from jniLibs
36+ NativeLoader .loadLibrary ("executorch" );
37+ }
38+
2939 /** Load mode for the module. Load the whole file as a buffer. */
3040 public static final int LOAD_MODE_FILE = 0 ;
3141
You can’t perform that action at this time.
0 commit comments