diff --git a/device-caimito-common.mk b/device-caimito-common.mk index 18b82721..3bbc4c73 100644 --- a/device-caimito-common.mk +++ b/device-caimito-common.mk @@ -27,7 +27,8 @@ PRODUCT_COPY_FILES += \ ifneq (,$(filter $(TARGET_DEVICE),komodo caiman tokay)) PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_$(TARGET_DEVICE)_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json \ - $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_prediction_lstm_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_prediction_lstm_model.tflite ifneq (,$(filter $(TARGET_BUILD_VARIANT), userdebug eng)) PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_$(TARGET_DEVICE)_wingboard.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_wingboard.json diff --git a/thermal/thermal_info_config_caiman.json b/thermal/thermal_info_config_caiman.json index f9a4cd05..b862b4d6 100644 --- a/thermal/thermal_info_config_caiman.json +++ b/thermal/thermal_info_config_caiman.json @@ -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", diff --git a/thermal/thermal_info_config_komodo.json b/thermal/thermal_info_config_komodo.json index fd190489..ded4f543 100644 --- a/thermal/thermal_info_config_komodo.json +++ b/thermal/thermal_info_config_komodo.json @@ -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", diff --git a/thermal/thermal_info_config_tokay.json b/thermal/thermal_info_config_tokay.json index 9f954766..0eb6ce8d 100644 --- a/thermal/thermal_info_config_tokay.json +++ b/thermal/thermal_info_config_tokay.json @@ -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", diff --git a/thermal/vt_prediction_lstm_model_caiman.tflite b/thermal/vt_prediction_lstm_model_caiman.tflite new file mode 100644 index 00000000..14f07b5a Binary files /dev/null and b/thermal/vt_prediction_lstm_model_caiman.tflite differ diff --git a/thermal/vt_prediction_lstm_model_komodo.tflite b/thermal/vt_prediction_lstm_model_komodo.tflite new file mode 100644 index 00000000..8a8e2611 Binary files /dev/null and b/thermal/vt_prediction_lstm_model_komodo.tflite differ diff --git a/thermal/vt_prediction_lstm_model_tokay.tflite b/thermal/vt_prediction_lstm_model_tokay.tflite new file mode 100644 index 00000000..100d94e5 Binary files /dev/null and b/thermal/vt_prediction_lstm_model_tokay.tflite differ