Skip to content

Commit

Permalink
Update circle-schema.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Sep 25, 2024
1 parent ef7cafe commit a5f8aa6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions source/circle-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ circle.Tensor = class Tensor {
};

circle.BuiltinOperator = {
ROPE: -7,
RMS_NORM: -6,
GRU: -5,
BCQ_GATHER: -4,
Expand Down Expand Up @@ -598,6 +599,7 @@ circle.BuiltinOptions = class {
case 124: return circle.BitcastOptions.decode(reader, position);
case 125: return circle.BitwiseXorOptions.decode(reader, position);
case 126: return circle.RightShiftOptions.decode(reader, position);
case 249: return circle.RoPEOptions.decode(reader, position);
case 250: return circle.RmsNormOptions.decode(reader, position);
case 251: return circle.GRUOptions.decode(reader, position);
case 252: return circle.BCQGatherOptions.decode(reader, position);
Expand Down Expand Up @@ -735,6 +737,7 @@ circle.BuiltinOptions = class {
case 'BitcastOptions': return circle.BitcastOptions.decodeText(reader, json);
case 'BitwiseXorOptions': return circle.BitwiseXorOptions.decodeText(reader, json);
case 'RightShiftOptions': return circle.RightShiftOptions.decodeText(reader, json);
case 'RoPEOptions': return circle.RoPEOptions.decodeText(reader, json);
case 'RmsNormOptions': return circle.RmsNormOptions.decodeText(reader, json);
case 'GRUOptions': return circle.GRUOptions.decodeText(reader, json);
case 'BCQGatherOptions': return circle.BCQGatherOptions.decodeText(reader, json);
Expand Down Expand Up @@ -3302,6 +3305,26 @@ circle.RmsNormOptions = class RmsNormOptions {
}
};

circle.RoPEMode = {
GPT_NEOX: 0,
GPT_J: 1
};

circle.RoPEOptions = class RoPEOptions {

static decode(reader, position) {
const $ = new circle.RoPEOptions();
$.mode = reader.int32_(position, 4, 0);
return $;
}

static decodeText(reader, json) {
const $ = new circle.RoPEOptions();
$.mode = circle.RoPEMode[json.mode];
return $;
}
};

circle.OperatorCode = class OperatorCode {

static decode(reader, position) {
Expand Down

0 comments on commit a5f8aa6

Please sign in to comment.