android litert -fregister-allocation=64 bug #528
Labels
status:awaiting user response
awaiting user response
status:need more data
need more data
type:gpu delegate
Issue with GPU delegation
Process: com.geenk.zto.sys, PID: 13270
java.lang.RuntimeException: java.lang.IllegalArgumentException: Internal error: Failed to apply delegate: Failed to build program executable - Invalid build optionserror: unknown build option '-fregister-allocation=64'
mobile phone :PBBM00 Android 9
this is my code
`
public void init(Context context, String modelPath) {
CompatibilityList compatList = new CompatibilityList();
Interpreter.Options options = new Interpreter.Options();
if (compatList.isDelegateSupportedOnThisDevice()) {
options.setUseNNAPI(true);
GpuDelegate delegate = new GpuDelegate(compatList.getBestOptionsForThisDevice());
options.addDelegate(delegate);
} else {
options.setUseXNNPACK(true);
options.setNumThreads(4);
}
try {
MappedByteBuffer mappedByteBuffer = FileUtil.loadMappedFile(context, modelPath);
this.interpreter = new Interpreter(mappedByteBuffer, options);
initializeTensorShapes();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
The text was updated successfully, but these errors were encountered: