teflon: Add support for Logistic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
This commit is contained in:
Tomeu Vizoso 2025-04-11 07:58:20 +02:00 committed by Marge Bot
parent 67faa1525b
commit 9c6cab0458
2 changed files with 7 additions and 0 deletions

View file

@ -231,6 +231,9 @@ fill_operation(struct teflon_delegate *delegate, TfLiteContext *tf_context, TfLi
case kTfLiteBuiltinAbs:
operation->type = PIPE_ML_OPERATION_TYPE_ABSOLUTE;
break;
case kTfLiteBuiltinLogistic:
operation->type = PIPE_ML_OPERATION_TYPE_LOGISTIC;
break;
default:
return false;
}
@ -370,6 +373,9 @@ dump_graph(struct pipe_tensor *tensors, unsigned tensor_count, struct pipe_ml_op
case PIPE_ML_OPERATION_TYPE_ABSOLUTE:
teflon_debug("%-6s ", "ABS");
break;
case PIPE_ML_OPERATION_TYPE_LOGISTIC:
teflon_debug("%-6s ", "LOG");
break;
}
for (unsigned j = 0; j < operations[i].input_count; j++) {

View file

@ -1051,6 +1051,7 @@ enum pipe_ml_operation_type {
PIPE_ML_OPERATION_TYPE_RESHAPE,
PIPE_ML_OPERATION_TYPE_RELU,
PIPE_ML_OPERATION_TYPE_ABSOLUTE,
PIPE_ML_OPERATION_TYPE_LOGISTIC,
};
/**