teflon: Add support for Subtract

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34629>
This commit is contained in:
Tomeu Vizoso
2025-04-11 07:58:10 +02:00
committed by Marge Bot
parent a8a2ce1d74
commit 005ab1f0fe
2 changed files with 7 additions and 0 deletions
@@ -234,6 +234,9 @@ fill_operation(struct teflon_delegate *delegate, TfLiteContext *tf_context, TfLi
case kTfLiteBuiltinLogistic:
operation->type = PIPE_ML_OPERATION_TYPE_LOGISTIC;
break;
case kTfLiteBuiltinSub:
operation->type = PIPE_ML_OPERATION_TYPE_SUBTRACT;
break;
default:
return false;
}
@@ -376,6 +379,9 @@ dump_graph(struct pipe_tensor *tensors, unsigned tensor_count, struct pipe_ml_op
case PIPE_ML_OPERATION_TYPE_LOGISTIC:
teflon_debug("%-6s ", "LOG");
break;
case PIPE_ML_OPERATION_TYPE_SUBTRACT:
teflon_debug("%-6s ", "SUB");
break;
}
for (unsigned j = 0; j < operations[i].input_count; j++) {
+1
View File
@@ -1052,6 +1052,7 @@ enum pipe_ml_operation_type {
PIPE_ML_OPERATION_TYPE_RELU,
PIPE_ML_OPERATION_TYPE_ABSOLUTE,
PIPE_ML_OPERATION_TYPE_LOGISTIC,
PIPE_ML_OPERATION_TYPE_SUBTRACT,
};
/**