9 Commits

Author SHA1 Message Date
feiyuchen
0f1433b2c8 Allow EdgeTPU DBA service to access the edgetpu_app_service
EdgeTpu DBA service calls edgetpu_app_service's UserIsAuthorized API in order to know whether its clients are authorized to use priviledge features, see code: https://source.corp.google.com/android-internal/vendor/google/darwinn2/dba/service/edgetpu_device.cpp;l=73;rcl=1c57b54efe12cdb408cb21a992155a04d151e3ce

It looks like the SELinux rule is missing today. Though I'm not sure why DBA service doesn't crash today.


Bug: 237103652
Change-Id: I8c5da7413eb6f9efc527c9f9f1d1242f0cb4dea8
2023-03-24 18:31:33 +00:00
Yu-Chi Cheng
8e965d36a2 Added the hetero runtime system property SELinux rules.
Currently, there is a hetero runtime property that darwinn
and other hetero runtime project will use: the trace level
(vendor.google.silicon.max_trace_level).

This change allows edgetpu services and clients to be able to see
that property in order to change the trace level.

Bug: 272292650
Test: verified it to build but not tested on device yet since selinux
has not been enforced yet.

Change-Id: Id6d345b92d2e710b41ca58907ad443fc2667054a
2023-03-16 14:10:10 -07:00
Richard Hsu
0b006f7129 Merge "[Flag] Update default TPU cache coherency to be enabled" into udc-dev 2023-03-13 06:27:09 +00:00
Richard Hsu
513af61761 [Flag] Update default TPU cache coherency to be enabled
The TPU cache coherency was set to false by default for testing/migration purposes. Now that the applications have been verified to work with TPU cache coherency, this CL changes the default behavior of TPU cache coherency to be enabled.

Bug: 255828212

Test:
All child bugs in b/255828212. Speech, Camera, TPU internal tests.

Change-Id: I276bb227fad352ad0a71ab2f9b771720b90bb729
2023-03-12 21:53:17 -07:00
feiyuchen
bd8d9ca737 Allow NNAPI HAL to read tflite_delegate.force_disable_io_coherency flag
The flag was added in ag/21062178.
After this CL, the flag is readable by all apps and all DarwiNN HALs.

Bug: 268548819
Change-Id: I28a185d66002f1656aeb10723c34d5eb517742c4
2023-03-07 20:53:10 +00:00
feiyuchen
a59d019822 Allow EdgeTpu service to read persist.device_config.edgetpu_native properties
Background:
Darwinn Runtime team wants to use a cloud-based infra (Android Core Experiments) to push flags from server to device. The flags will be stored into android properties under the namespace: `persist.device_config.edgetpu_native`, which has a property context called `device_config_edgetpu_native_prop` as added by the other CL: https://android-review.git.corp.google.com/c/platform/system/sepolicy/+/2434232

Change:
Allow EdgeTpu service to read device_config_edgetpu_native_prop

Test: Verified EdgeTpu has access to read the property
Bug: 243553703
Bug: 246401730
Change-Id: I19dca0e2d3008e36bdbca50f610810148a7e11dd
2023-02-15 07:19:07 +00:00
feiyuchen
1fa64096e9 Add android property vendor.edgetpu.tflite_delegate.force_disable_io_coherency
because we need it for DarwinnDelegate to forcelly disable the cache coherency feature for debugging purpose. This sys prop should be readable by all Darwinn Delegate clients, but only modifiable by `adb root`.

Test: Verified that both camera app and camera HAL can read the flag. See pending CL cl/507001854 and android_flag_permission_test.md

Bug: 262420821
Change-Id: I0ae7e02f1d4805956a05afeb92f892cbac6d5213
2023-02-03 23:44:52 +00:00
Victor Barr
810349517a Add support for dba hal in common edgetpu packages
Previously supported in some cases. Now extend it to all common cases

Bug: 263394888
Test: Built and ran DBA Hal on Android Device
Change-Id: I9a5c6a6c8d8b6c23a7d86678ecae57a9f0bcdf7a
2023-01-17 18:04:45 +00:00
Adam Shih
af0e90ecb1 centralize common settings for edgeTPU
Bug: 258114806
Test: build pass with all the things still in the ROM
Change-Id: Iafa355c047d39cfb21ef043ed0e7b4108630b781
2022-11-08 13:34:35 +08:00