thermal: add support of LSTM model sensors

- add tflite model files
- add lstm model sensors to thermal config
- add lstm model sensor to virtual skin prediction

Bug: 308179047
Test: build and validate thermal service

Change-Id: Iaff613d75b3766bfbdf40b391e453a94172872a3
Signed-off-by: Jikai Ma <jikai@google.com>
This commit is contained in:
Jikai Ma 2024-03-13 21:25:17 -07:00
parent 7b34b39057
commit 7a7ba4ae75
7 changed files with 57 additions and 8 deletions

View file

@ -188,6 +188,19 @@
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-LSTM-MODEL",
"Type": "UNKNOWN",
"VirtualSensor": true,
"ModelPath": "vt_prediction_lstm_model.tflite",
"Formula": "USE_ML_MODEL",
"Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"PreviousSampleCount": 11,
"OutputLabelCount": 6,
"Multiplier": 0.001,
"SupportUnderStampling": true,
"ValidateInput": true
},
{
"Name": "STATS-UPDATOR",
"Type": "UNKNOWN",
@ -195,8 +208,8 @@
"Hidden": true,
"TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"],
"Coefficient": [0.0, 0.0, 0.0],
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"],
"Coefficient": [0.0, 0.0, 0.0, 0.0],
"Multiplier": 1,
"SendPowerHint": true,
"PollingDelay": 300000,
@ -218,6 +231,9 @@
"SendCallback": true,
"PollingDelay": 300000,
"PassiveDelay": 7000,
"PredictorInfo": {
"Sensor": "VIRTUAL-SKIN-LSTM-MODEL"
},
"BindedCdevInfo": [
{
"CdevRequest": "tpu_cooling",

View file

@ -211,6 +211,19 @@
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-LSTM-MODEL",
"Type": "UNKNOWN",
"VirtualSensor": true,
"ModelPath": "vt_prediction_lstm_model.tflite",
"Formula": "USE_ML_MODEL",
"Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"PreviousSampleCount": 11,
"OutputLabelCount": 6,
"Multiplier": 0.001,
"SupportUnderSampling": true,
"ValidateInput": true
},
{
"Name": "STATS-UPDATOR",
"Type": "UNKNOWN",
@ -218,14 +231,14 @@
"Hidden": true,
"TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"],
"Coefficient": [0.0, 0.0, 0.0],
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"],
"Coefficient": [0.0, 0.0, 0.0, 0.0],
"Multiplier": 1,
"SendPowerHint": true,
"PollingDelay": 300000,
"PassiveDelay": 7000
},
{
{
"Name": "VIRTUAL-SKIN",
"Type": "SKIN",
"Version": "6.1",
@ -241,6 +254,9 @@
"SendCallback": true,
"PollingDelay": 300000,
"PassiveDelay": 7000,
"PredictorInfo": {
"Sensor": "VIRTUAL-SKIN-LSTM-MODEL"
},
"BindedCdevInfo": [
{
"CdevRequest": "tpu_cooling",

View file

@ -178,6 +178,19 @@
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "VIRTUAL-SKIN-LSTM-MODEL",
"Type": "UNKNOWN",
"VirtualSensor": true,
"ModelPath": "vt_prediction_lstm_model.tflite",
"Formula": "USE_ML_MODEL",
"Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"PreviousSampleCount": 11,
"OutputLabelCount": 6,
"Multiplier": 0.001,
"SupportUnderSampling": true,
"ValidateInput": true
},
{
"Name": "STATS-UPDATOR",
"Type": "UNKNOWN",
@ -185,8 +198,8 @@
"Hidden": true,
"TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"],
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"],
"Coefficient": [0.0, 0.0, 0.0],
"Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"],
"Coefficient": [0.0, 0.0, 0.0, 0.0],
"Multiplier": 1,
"SendPowerHint": true,
"PollingDelay": 300000,
@ -208,6 +221,9 @@
"SendCallback": true,
"PollingDelay": 300000,
"PassiveDelay": 7000,
"PredictorInfo": {
"Sensor": "VIRTUAL-SKIN-LSTM-MODEL"
},
"BindedCdevInfo": [
{
"CdevRequest": "tpu_cooling",

Binary file not shown.

Binary file not shown.

Binary file not shown.