- ONNX Runtime version: 1.17.0
- Android version: 10
- Kotlin version: 1.9.22
- JAVA version: 2.1
- SDK Build-Tools: 33.0.1
- AGP: 8.1.3
- GPU: ARM Mali GPU | G310
- CPU: ARMv8 Processor rev 4 (v8l)
Steps to Reproduce:
I'm trying to configure the ONNX Runtime session within the DepthAnything Class to use NNAPI with specific flags (e.g. USE_FP16 and CPU_DISABLED). Here's the code snippet for setting up the session options:
private val ortEnvironment = OrtEnvironment.getEnvironment()
private val ortSession : OrtSession
private val inputName: String
init
{
// Create session options
val options = OrtSession.SessionOptions().apply
{
addNnapi(EnumSet.of(NNAPIFlags.USE_FP16, NNAPIFlags.CPU_DISABLED))
}
val modelByteArray = context.assets.open("depth_anything_small_fp16.onnx").readBytes()
ortSession = ortEnvironment.createSession(modelByteArray, options)
inputName = ortSession.inputNames.iterator().next()
}
Expected Behavior:
I expected the model inference to run using NNAPI with FP16 precision and without using the CPU.
Actual Behavior:
The inference seems to run as if these options were not applied at all. The performance and behavior do not change regardless of the flags set.
Steps to Reproduce:
I'm trying to configure the ONNX Runtime session within the DepthAnything Class to use NNAPI with specific flags (e.g. USE_FP16 and CPU_DISABLED). Here's the code snippet for setting up the session options:
Expected Behavior:
I expected the model inference to run using NNAPI with FP16 precision and without using the CPU.
Actual Behavior:
The inference seems to run as if these options were not applied at all. The performance and behavior do not change regardless of the flags set.