Skip to content

Commit

Permalink
Add 'dot' opcode (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcl authored Oct 9, 2024
1 parent c7a3706 commit 038c38c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.lake/
1 change: 1 addition & 0 deletions SHerLOC/AST1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ inductive OpCode where
| countLeadingZeros
| customCall
| divide
| dot
| dotGeneral
| dynamicBroadcastInDim
| dynamicConv
Expand Down
2 changes: 2 additions & 0 deletions SHerLOC/Parsing/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def parseOpCode : PState OpCode := do
| "count_leading_zeros" => opCode := some OpCode.countLeadingZeros
| "custom_call" => opCode := some OpCode.customCall
| "divide" => opCode := some OpCode.divide
| "dot" => opCode := some OpCode.dot
| "dot_general" => opCode := some OpCode.dotGeneral
| "dynamic_broadcast_in_dim" => opCode := some OpCode.dynamicBroadcastInDim
| "dynamic_conv" => opCode := some OpCode.dynamicConv
Expand Down Expand Up @@ -244,6 +245,7 @@ partial def parseStableHLO (opOutputs : List ValueId) : PState Operation := do
| OpCode.countLeadingZeros => parseOperationBasic OpCode.countLeadingZeros opOutputs
| OpCode.customCall => parseOperationBasic OpCode.customCall opOutputs
| OpCode.divide => parseOperationBasic OpCode.divide opOutputs
| OpCode.dot => parseOperationBasic OpCode.dot opOutputs
| OpCode.dotGeneral => parseOperationBasic OpCode.dotGeneral opOutputs
| OpCode.dynamicBroadcastInDim => parseOperationBasic OpCode.dynamicBroadcastInDim opOutputs
| OpCode.dynamicConv => parseOperationBasic OpCode.dynamicConv opOutputs
Expand Down

0 comments on commit 038c38c

Please sign in to comment.