Skip to content

Commit e52c691

Browse files
committed
Add wall clock time
1 parent d6a6909 commit e52c691

File tree

2 files changed

+301
-298
lines changed

2 files changed

+301
-298
lines changed

examples/omeinsum_julia/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ This example introduces how to use OMEinsum, a julia-based einsum package, to co
44

55
We provide two solutions:
66

7-
* use subprocess to call a stand-alone julia script (recommended)
7+
* use subprocess to call a stand-alone julia script (**recommended**)
88
* use juliacall to integrate julia script into python (seems to be more elegant, but not recommended)
99

1010
We highly recommend to use the first solution based on subprocess, not only due to its compatibility to julia multi-threading, but also because the experimental KaHyPar-based initialization is developed based on it.
1111

1212
## Experiments
1313

1414
We test contractors from OMEinsum on Google random circuits ([available online](https://datadryad.org/stash/dataset/doi:10.5061/dryad.k6t1rj8)) and compare with the cotengra contractor.
15-
For circuits only differ in PRNG seed number (which means with the same tensor network structure, but different tenser entries), we choose the one with the largest seed. For example, we benchmark `circuit_n12_m14_s9_e6_pEFGH.qsim`, but skip
15+
For circuits only differ in PRNG seed number (which means with the same tensor network structure, but different tensor entries), we choose the one with the largest seed. For example, we benchmark `circuit_n12_m14_s9_e6_pEFGH.qsim`, but skip
1616
circuits like `circuit_n12_m14_s0_e6_pEFGH.qsim`.
1717
We list experimental results in [benchmark_results.csv](benchmark_results.csv).
18+
All experiments are done with a 32GB CPU machine with 16 cores.
1819

1920

2021
Specifically, we test the following three methods:
@@ -67,7 +68,9 @@ c.expectation_ps(z=[0], reuse=False)
6768
Both OMEimsum and cotengra are able to optimize a weighted average of `log10[FLOPs]`, `log2[SIZE]` and `log2[WRITE]`.
6869
However, OMEimsum and cotengra have different weight coefficient, which makes fair comparison difficult.
6970
Thus we force each method to purely optimized `FLOPs`, but we do collect all contraction information in the table, including
70-
`log10[FLOPs]`, `log2[SIZE]`, `log2[WRITE]`, `PathFindingTime`.
71+
`log10[FLOPs]`, `log2[SIZE]`, `log2[WRITE]`, `PathFindingTime`, `WallClockTime`.
72+
73+
For circuits with `PathFindingTime` but empty `WallClockTime`, it means we meet OOM when computing with a 32GB CPU machine.
7174

7275
For three circuits, namely `circuit_patch_n46_m14_s19_e21_pEFGH`, `circuit_patch_n44_m14_s19_e21_pEFGH` and `circuit_n42_m14_s9_e0_pEFGH`, we meet [errors in OMEinsum](https://github.com/TensorBFS/OMEinsumContractionOrders.jl/issues/35#issuecomment-1405236778), and there results are set to empty in [benchmark_results.csv](benchmark_results.csv).
7376

0 commit comments

Comments
 (0)