mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
teflon: Add TANH operation support
Add the plumbing for TANH operations. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39975>
This commit is contained in:
parent
df051917a5
commit
6933207435
2 changed files with 9 additions and 0 deletions
|
|
@ -255,6 +255,9 @@ fill_operation(struct teflon_delegate *delegate, TfLiteContext *tf_context, TfLi
|
|||
case kTfLiteBuiltinLogistic:
|
||||
operation->type = PIPE_ML_OPERATION_TYPE_LOGISTIC;
|
||||
break;
|
||||
case kTfLiteBuiltinTanh:
|
||||
operation->type = PIPE_ML_OPERATION_TYPE_TANH;
|
||||
break;
|
||||
case kTfLiteBuiltinSub:
|
||||
operation->type = PIPE_ML_OPERATION_TYPE_SUBTRACT;
|
||||
break;
|
||||
|
|
@ -480,6 +483,9 @@ dump_graph(struct pipe_tensor *tensors, unsigned tensor_count, struct pipe_ml_op
|
|||
case PIPE_ML_OPERATION_TYPE_LOGISTIC:
|
||||
teflon_debug("%-15s ", "LOG");
|
||||
break;
|
||||
case PIPE_ML_OPERATION_TYPE_TANH:
|
||||
teflon_debug("%-15s ", "TANH");
|
||||
break;
|
||||
case PIPE_ML_OPERATION_TYPE_SUBTRACT:
|
||||
teflon_debug("%-15s ", "SUB");
|
||||
break;
|
||||
|
|
@ -722,6 +728,8 @@ tflite_builtin_op_name(TfLiteBuiltinOperator op)
|
|||
return "ABS";
|
||||
case kTfLiteBuiltinLogistic:
|
||||
return "LOG";
|
||||
case kTfLiteBuiltinTanh:
|
||||
return "TANH";
|
||||
case kTfLiteBuiltinSub:
|
||||
return "SUB";
|
||||
case kTfLiteBuiltinTranspose:
|
||||
|
|
|
|||
|
|
@ -1061,6 +1061,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_TANH,
|
||||
PIPE_ML_OPERATION_TYPE_SUBTRACT,
|
||||
PIPE_ML_OPERATION_TYPE_TRANSPOSE,
|
||||
PIPE_ML_OPERATION_TYPE_STRIDED_SLICE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue