Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions KLR/Trace/ISA.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def dimsFromPythonDefs (dims : Int) (d : Sum Int (List Int)) : Trace TensorSubDi
| .inl 1 => return .X
| .inl _ => throw "not a valid dim"
| .inr r => do
if r == [dims] then return .X
if r == [dims-1, dims] then return .XY
if r == [dims-2, dims-1, dims] then return .XYZ
if r == [dims-3, dims-2, dims-1, dims] then return .XYZW
if r == [dims-1] then return .X -- last dim, 2d+ case
if r == [dims-2, dims-1] then return .XY -- last 2 dims, 3d+ case
if r == [dims-3, dims-2, dims-1] then return .XYZ -- last 3 dims, 4d+ case
if r == [dims-4, dims-3, dims-2, dims-1] then return .XYZW -- last 4 dims, 5d case
throw "not a valid dim"

def getTransposeOps(op: Option (List Int)) : Trace TransposeOps :=
Expand Down
Loading