Skip to content

Commit

Permalink
Fix KaHyPar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Dec 28, 2023
1 parent 383088b commit f1e7d31
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/KaHyPar_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
EinExpr([:i, :h, :d], Dict(i => 2 for i in [:i, :h, :d])),
EinExpr([:d, :g, :c], Dict(i => 2 for i in [:d, :g, :c])),
]
sexpr = sum(tensors)

path = einexpr(HyPar(imbalance=0.42), EinExpr(Symbol[], tensors))
path = einexpr(HyPar(imbalance = 0.42), sexpr)

@test path isa EinExpr
@test path isa SizedEinExpr

@test mapreduce(flops, +, Branches(path)) == 108
end
Expand Down Expand Up @@ -40,10 +41,11 @@
EinExpr([:A, :W], Dict(:A => 6, :W => 6)),
EinExpr([:a, :C, :d], Dict(:a => 3, :d => 6, :C => 4)),
]
sexpr = sum(tensors)

path = einexpr(HyPar(imbalance=0.45), EinExpr(Symbol[], tensors))
path = einexpr(HyPar(imbalance = 0.45), sexpr)

@test path isa EinExpr
@test path isa SizedEinExpr

@test mapreduce(flops, +, Branches(path)) == 19099592
end
Expand Down

0 comments on commit f1e7d31

Please sign in to comment.