Skip to content

Commit

Permalink
Fix KaHyPar tests with EinExprs
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Feb 13, 2024
1 parent bd132eb commit d965b14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_contraction_sequence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ ITensors.disable_warn_order()
res_einexprs_exhaustive = contract(tn; sequence=seq_einexprs_exhaustive)[]
seq_einexprs_greedy = contraction_sequence(tn; alg="einexpr", optimizer=Greedy())
res_einexprs_greedy = contract(tn; sequence=seq_einexprs_exhaustive)[]
seq_einexprs_kahypar = contraction_sequence(tn; alg="einexpr", optimizer=HyPar())
res_einexprs_kahypar = contract(tn; sequence=seq_einexprs_kahypar)[]
@test res_greedy res_optimal
@test res_tree_sa res_optimal
@test res_sa_bipartite res_optimal
@test res_einexprs_exhaustive res_optimal
@test res_einexprs_greedy res_optimal
@test res_einexprs_kahypar res_optimal

if !Sys.iswindows()
# KaHyPar doesn't work on Windows
Expand All @@ -46,5 +43,8 @@ ITensors.disable_warn_order()
seq_kahypar_bipartite = contraction_sequence(tn; alg="kahypar_bipartite", sc_target=200)
res_kahypar_bipartite = contract(tn; sequence=seq_kahypar_bipartite)[]
@test res_optimal res_kahypar_bipartite
seq_einexprs_kahypar = contraction_sequence(tn; alg="einexpr", optimizer=HyPar())
res_einexprs_kahypar = contract(tn; sequence=seq_einexprs_kahypar)[]
@test res_einexprs_kahypar res_optimal
end
end

0 comments on commit d965b14

Please sign in to comment.