android-nn-driver icon indicating copy to clipboard operation
android-nn-driver copied to clipboard

getType always returns CPU

Open MatthewARM opened this issue 3 years ago • 1 comments

In getType() at:

https://github.com/ARM-software/android-nn-driver/blob/7e4f7b181908478b3f9c0a23dd4a26b476542e30/1.2/ArmnnDriver.hpp#L133 and https://github.com/ARM-software/android-nn-driver/blob/7e4f7b181908478b3f9c0a23dd4a26b476542e30/1.3/ArmnnDriver.hpp#L248

they always return DeviceType::CPU, whereas they should return 'Other' (for a heterogenous interface) or check the service startup flags to find out which backend is preferred (e.g. GPU).

MatthewARM avatar Mar 08 '21 09:03 MatthewARM

See: https://source.android.com/devices/neural-networks/device-discovery#implement

"Other" might be hard to implement - it says "A driver with a heterogeneous interface should also expose separate IDevice interfaces that correspond to individual devices to allow an application to choose from those devices."

MatthewARM avatar Mar 08 '21 10:03 MatthewARM

@jameo

Deweyave avatar Jan 04 '23 09:01 Deweyave

@Jameo

https://github.com/ARM-software/android-nn-driver/issues/16#issuecomment-1370644673

Deweyave avatar Jan 04 '23 09:01 Deweyave

@Jameo

Deweyave avatar Jan 04 '23 09:01 Deweyave

Fixed by https://github.com/ARM-software/android-nn-driver/commit/6bf3f43c6f1d88c676f277f4c3c766cb3ea37ed0

MatthewARM avatar Dec 01 '23 10:12 MatthewARM