Improve the structure of NNAPI AIDL Memory
Prior to this change, the NN AIDL HAL created a Memory struct analogous to hidl_memory, consisting of a name, size, and native handle. However, this Memory struct is not very structured, and requires both the client and server to agree on how the data should be interpreted. This CL tightens the structure of the Memory representation by introducing Ashmem and MappableFile structs to android.hardware.common in order to hold specific file descriptors representing memory regions. Further, this CL redefines android.hardwre.neuralnetworks's Memory object as a union of the Ashmem, MappableFile, and (existing) HardwareBuffer memory types. This change also adds "com.android.neuralnetworks" to the graphics AIDL HAL's apex_available build rule. Bug: 183118727 Test: mma Change-Id: I32322df676b83597c9e95f13662c322a6a80accc Merged-In: I32322df676b83597c9e95f13662c322a6a80accc (cherry picked from commit 1158c80f)
Loading
Please register or sign in to comment