Open
Description
🚀 The feature, motivation and pitch
Right now we have two places loading library https://github.com/search?q=repo%3Apytorch%2Fexecutorch%20loadlib&type=code
Instead, can we just have one place, in a new file say Runtime.java?
class Runtime {
static {
// Loads libexecutorch.so from jniLibs
NativeLoader.loadLibrary("executorch");
}
static boolean isInitialized() {
// maybe check something else?
}
}
Then in NativePeer.java and LlmModule.java
static {
if (!Runtime.isInitialized()) {
throw ...
}
}
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @cbilgin
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status
Status
Todo