From 75364d5585d3a4b7a5c55e8af889dcf3eb198e80 Mon Sep 17 00:00:00 2001 From: Sanggyu Lee Date: Thu, 11 Sep 2025 11:54:25 +0900 Subject: [PATCH] [onert] Add Attention operator in circle_schema.fbs It introduces Attention operator in circle_schema. ONE-DCO-1.0-Signed-off-by: Sanggyu Lee --- nnpackage/schema/circle_schema.fbs | 6 ++++++ runtime/libs/circle-schema/circle_schema.fbs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/nnpackage/schema/circle_schema.fbs b/nnpackage/schema/circle_schema.fbs index 27be5c76c82..5584de0afa3 100644 --- a/nnpackage/schema/circle_schema.fbs +++ b/nnpackage/schema/circle_schema.fbs @@ -37,6 +37,7 @@ // ROPE op is added. MXFP4, MXINT8 types are added. // MXQuantization is added. // Version 0.10: Base up to TensorFlow Lite v2.20.0 schema. RUN_MODEL op is added. +// ATTENTION op is added. namespace circle; @@ -317,6 +318,7 @@ table Tensor { // set of acceptable options. // LINT.IfChange enum BuiltinOperator : int32 { + ATTENTION = -9, RUN_MODEL = -8, ROPE = -7, RMS_NORM = -6, @@ -673,6 +675,7 @@ union BuiltinOptions { BitcastOptions, BitwiseXorOptions, RightShiftOptions, + AttentionOptions = 247, RunModelOptions = 248, RoPEOptions = 249, RmsNormOptions = 250, @@ -1588,6 +1591,9 @@ table RunModelOptions { signature:string; } +table AttentionOptions { +} + // An OperatorCode can be an enum value (BuiltinOperator) if the operator is a // builtin, or a string if the operator is custom. table OperatorCode { diff --git a/runtime/libs/circle-schema/circle_schema.fbs b/runtime/libs/circle-schema/circle_schema.fbs index 27be5c76c82..5584de0afa3 100644 --- a/runtime/libs/circle-schema/circle_schema.fbs +++ b/runtime/libs/circle-schema/circle_schema.fbs @@ -37,6 +37,7 @@ // ROPE op is added. MXFP4, MXINT8 types are added. // MXQuantization is added. // Version 0.10: Base up to TensorFlow Lite v2.20.0 schema. RUN_MODEL op is added. +// ATTENTION op is added. namespace circle; @@ -317,6 +318,7 @@ table Tensor { // set of acceptable options. // LINT.IfChange enum BuiltinOperator : int32 { + ATTENTION = -9, RUN_MODEL = -8, ROPE = -7, RMS_NORM = -6, @@ -673,6 +675,7 @@ union BuiltinOptions { BitcastOptions, BitwiseXorOptions, RightShiftOptions, + AttentionOptions = 247, RunModelOptions = 248, RoPEOptions = 249, RmsNormOptions = 250, @@ -1588,6 +1591,9 @@ table RunModelOptions { signature:string; } +table AttentionOptions { +} + // An OperatorCode can be an enum value (BuiltinOperator) if the operator is a // builtin, or a string if the operator is custom. table OperatorCode {