summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/utils/src/Service.cpp
AgeCommit message (Collapse)Author
2022-02-14Clamp NNAPI HAL Version to runtime version -- halMichael Butler
The NNAPI is a Mainline Module, and its runtime version is determined by an Android Feature Flag to remotely rollout and rollback Feature Levels as needed. This change propagates the maximum feature level version allowed by the runtime to the HAL utility code, and clamps the utility code's version to the version allowed by the runtime. Bug: N/A Test: mma Test: CtsNNAPITestCases Test: NeuralNetworksTest_static Test: logged driver version, set current_feature_level, and verified the driver version was clamped by current_feature_level Change-Id: Ibaa895f8e35d36b2ddf9432b3ef9468e5886075f
2021-11-15Configure Version value for each version of NN AIDL utilsMichael Butler
Currently, there are two different versions of the NN AIDL utils: * neuralnetworks_utils_hal_aidl_v1 (v1) * neuralnetowrks_utils_hal_aidl (v2) This change configures utils::kVersion to match the version of the utility library that builds it. Bug: N/A Test: mma Change-Id: I7d08bf50f76664702ec0828cc35a363eb29bdde3
2021-10-29Revert^2 "Provide explicitly versioned NNAPI AIDL utils libs -- HAL."Michael Butler
Reason for revert: rollforward fix of this topic This change is a revert of I3d3ac4745, which itself is a revert of I74f1798e8. This CL modifies the AIDL utils libraries to be explicitly versioned. Currently, we only have two versions: v1 and "current". Specifically, the following changes are made: - Remove AIDL dependencies from neuralnetworks_utils_hal_common - Create explicitly versioned libs of neuralnetworks_utils_hal_aidl* This is needed because it is not allowed for a build target to link against multiple versions of the same AIDL lirary. The canonical driver will report ANDROID_S for AIDL v1, and FL6 for v2. Reverted Changes: I2aefa0023:Revert "Use explicitly versioned NNAPI HAL util li... Ia7df07ab9:Revert "Add neuralnetworks_utils_hal_aidl_v2 to al... Iadd823460:Revert "Provide explicitly version NNAPI AIDL util... I3d3ac4745:Revert "Provide explicitly versioned NNAPI AIDL ut... Bug: 202405342 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: Ib3b732aa406f6d37e8f941082807c9232720c909 Merged-In: Ib3b732aa406f6d37e8f941082807c9232720c909 (cherry picked from commit 478a78ea77fccf332b04d5ad25309428d0f96eaf)
2021-10-25Revert "Provide explicitly versioned NNAPI AIDL utils libs -- HAL."Michael Butler
Revert "Use explicitly versioned NNAPI HAL util libs in darwinn2." Revert "Add neuralnetworks_utils_hal_aidl_v2 to allowed_deps.txt" Revert "Provide explicitly version NNAPI AIDL utils lib -- runtime." Revert submission 16007539-nnapi-experimental-aidl-feature Reason for revert: The cherry-pick of this CL breaks the build Reverted Changes: Ieb2da3461:Add neuralnetworks_utils_hal_aidl_v2 to allowed_de... I8ae01e3c6:Provide explicitly version NNAPI AIDL utils lib --... I74f1798e8:Provide explicitly versioned NNAPI AIDL utils libs... I2362464e8:Use explicitly versioned NNAPI HAL util libs in da... Test: mma Change-Id: I3d3ac4745fb707cbdceb2019f3c2fc7807183b71 Merged-In: I3d3ac4745fb707cbdceb2019f3c2fc7807183b71 (cherry picked from commit 932e82b0c30fa2078bd421053506ec4e9191f66c)
2021-10-25Provide explicitly versioned NNAPI AIDL utils libs -- HAL.Xusong Wang
This CL modifies the AIDL utils libraries to be explicitly versioned. Currently, we only have two versions: v1 and "current". Specifically, the following changes are made: - Remove AIDL dependencies from neuralnetworks_utils_hal_common - Create explicitly versioned libs of neuralnetworks_utils_hal_aidl_* This is needed because it is not allowed for a build target to link against multiple versions of the same AIDL lirary. The canonical driver will report ANDROID_S for AIDL v1, and FL6 for v2. Bug: 202405342 Test: NNT_static Test: CtsNNAPITestCases Test: VtsHalNeuralnetworksTargetTest Change-Id: I74f1798e80a059949e43e0567d23e884a7f7c92d Merged-In: I74f1798e80a059949e43e0567d23e884a7f7c92d (cherry picked from commit 9763a9537df323c5d4446483d1375057582c6228)
2021-04-13Enable NN VTS and utility code to use lazy servicesMichael Butler
This CL enables VtsHalNeuralnetworksTargetTest to use lazy services by changing from AServiceManager_getService (which will return nullptr for the service if the service is not able to be loaded within a short amount of time) to AServiceManager_waitForService (which will wait for a longer time, allowing lazy services to start up). Similarly, the utility code is changed from using AServiceManager_getService to AServiceManager_waitForService where possible. This CL also introduces an "InvalidDevice" utility class to the nnapi/hal/aidl utility code. InvalidDevices are minimal devices that support no functionality but are still able to pass VTS tests. Bug: 170696939 Test: mma Test: VtsHalNeuralnetworksTargetTest Change-Id: I4f806b104ef6af863ec55c2c3f2a2dd1f72b9633
2021-03-17NNAPI: Add AIDL drivers registrationLev Proleev
Bug: 179015258 Test: adb shell setprop debug.nn.partition 2 && \ Test: NeuralNetworksTest_static Change-Id: I2c8c9a49ff917b243348043df1158a8d98f131ce Merged-In: I2c8c9a49ff917b243348043df1158a8d98f131ce (cherry picked from commit 5f732ff683211e14bcb489839e46b99ee4c39106)
2021-03-16Add canonical types adapters for NNAPI AIDL interfaceLev Proleev
Also: * Add missing AIDL<->CT conversions * Add AIDL-specific info to neuralnetworks/utils/README.md * Add mock classes and tests AIDL adapters Bug: 179015258 Test: neuralnetworks_utils_hal_test Change-Id: Ifa98fadd46dca5dbf9b3ceb4da811aa8da45b6e4 Merged-In: Ifa98fadd46dca5dbf9b3ceb4da811aa8da45b6e4 (cherry picked from commit 3b93b0b56a4f5128eaa942d804dd490317c0abcb)