ARM-software / android-nn-driver

MIT License
151 stars 60 forks source link

getType always returns CPU #16

Closed MatthewARM closed 10 months ago

MatthewARM commented 3 years ago

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 commented 3 years ago

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."

Deweyave commented 1 year ago

@jameo

Deweyave commented 1 year ago

@Jameo

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

Deweyave commented 1 year ago

@Jameo

MatthewARM commented 10 months ago

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