Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
6743459
add vanilia cpp binds
danlkv Aug 29, 2020
124822f
add numpy vanilia integration
danlkv Aug 31, 2020
c4c9208
add print_4
danlkv Aug 31, 2020
c306812
add profiling for transposition of tensors
danlkv Aug 31, 2020
635502b
print numel in transposition bench
danlkv Aug 31, 2020
23f06ba
add cli for easy profiling
danlkv Aug 31, 2020
b2bbe6e
Update README.md
danlkv Sep 2, 2020
4a8b048
add contraction subroutine with cpp
danlkv Sep 3, 2020
fadf984
minor usage improvements for cpp contract
danlkv Sep 3, 2020
e8e0a03
better usage of scripts
danlkv Sep 3, 2020
330dff2
Merge branch 'dev' into cpp_binds
danlkv Sep 3, 2020
fc2f78e
opt_einsum for comparison
danlkv Sep 7, 2020
f24f5ee
Added corrected tcontract file
Sep 9, 2020
7790360
Added edits to bench.cpp
Sep 9, 2020
987454d
Messing around with another tensornetwork benchmark
Sep 9, 2020
a72d1fc
Merge branch 'cpp_binds' of github.com:DaniloZZZ/Qensor into cpp_binds
Sep 9, 2020
74e1a17
rename mkl contracting method to mkl_contract, add compiler options t…
danlkv Sep 10, 2020
4097913
Merge branch 'master' into cpp_binds
danlkv Sep 10, 2020
66c7099
add more flexibiliy to feynman simulator, add profiling to cli
danlkv Sep 10, 2020
1ee12bc
update qtree
danlkv Sep 10, 2020
374ad9a
add minor explanation on performance benchmarks to readme
danlkv Sep 10, 2020
6ad7095
add C++ and MKL backend
danlkv Sep 10, 2020
dc34388
fix in cpp contract
danlkv Sep 10, 2020
bd9fe2a
correct slices back to non-int
danlkv Sep 10, 2020
db0d519
minor readme updates
danlkv Sep 10, 2020
331caef
Added script for jlse setup
Sep 10, 2020
464216a
Merge branch 'cpp_binds' of github.com:DaniloZZZ/Qensor into cpp_binds
Sep 10, 2020
f49ce24
Added exatn backend
Sep 14, 2020
8379177
Merge branch 'cpp_binds' into exatn
Sep 14, 2020
1af6fda
Added code for exatn framework
Sep 16, 2020
dbc6019
Merge branch 'master' into exatn
Sep 16, 2020
7758661
Work on bugs in exatn backend/correcting set indices
Sep 16, 2020
fdfd8a4
Merge branch 'cpp_binds' of github.com:DaniloZZZ/Qensor into cpp_binds
danlkv Sep 16, 2020
8702aa7
Merge branch 'cpp_binds' into exatn
danlkv Sep 16, 2020
4eb8171
fix exatn api, add dynamic import of exatn
danlkv Sep 16, 2020
d85bca1
Simplified process tensor, changed sliced buckets function to use exa…
Sep 21, 2020
3c6c45e
Fixed errors in exatn backend
Sep 21, 2020
b597b4b
Merge branch 'master' into exatn
danlkv Sep 23, 2020
4b0fef6
Merge branch 'dev' into exatn
danlkv Sep 23, 2020
ecad213
satityfy test size
danlkv Sep 23, 2020
7f4a9be
intermediate changes, need to fix naming still
Sep 26, 2020
00e8991
Merge branch 'exatn' of github.com:DaniloZZZ/Qensor into exatn
Sep 26, 2020
c523911
Updated README file
Sep 26, 2020
aba9065
Merge branch 'dev' into exatn
Sep 26, 2020
a2e76ef
Debugging exatn backend
Sep 26, 2020
8bb571e
Merge branch 'dev' into exatn
danlkv Sep 26, 2020
2d5eee2
update cpp extension with contraction combined with summ
danlkv Oct 2, 2020
9bdf2c1
add cops to contract.py
Oct 2, 2020
b6cabcd
try to install tcontract from source
danlkv Oct 9, 2020
5d58532
lazy import exatn and tcontract
danlkv Oct 9, 2020
09bfc40
fix transposition bug in mkl backend; add test for it
danlkv Oct 9, 2020
7463dd5
try to fix build of tcontract
danlkv Oct 9, 2020
2745f97
run on ubuntu with mkl installed
danlkv Oct 9, 2020
898adb2
fix tag of mkl container
danlkv Oct 9, 2020
a0f7bfd
setup git 2.23
danlkv Oct 9, 2020
597495f
Merge branch 'dev' into exatn
danlkv Oct 9, 2020
972b1f8
still trying to get to work github test
danlkv Oct 9, 2020
7102d63
[jlse-run] Add backend option to time-vs-flops plot
danlkv Oct 9, 2020
3b451af
yet another try to get git working on ubuntu
danlkv Oct 9, 2020
488c690
[jlse-run] configure jlse runner to update qtensor
danlkv Oct 9, 2020
e82268c
[jlse-run] fixes to actions setup
danlkv Oct 9, 2020
37a4804
[jlse-run] another try to fix autotest
danlkv Oct 9, 2020
478a5b4
[jlse-results] for `[jlse-run] another try to fix autotest`
Oct 9, 2020
1abc963
[jlse-run] larger sim and another try to fix ubuntu setup
danlkv Oct 9, 2020
c2975d1
[jlse-results] for `[jlse-run] larger sim and another try to fix ubun…
Oct 9, 2020
409687a
[jlse-run] larger runs, another try on ubuntu setup
danlkv Oct 9, 2020
6a5e676
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 9, 2020
f9cec4c
[jlse-results] for `[jlse-run] Merge remote-tracking branch 'origin/e…
Oct 9, 2020
540e754
[jlse-run] try to use /usr/bin/env to resolve pip
danlkv Oct 9, 2020
b23df20
[jlse-results] for `[jlse-run] try to use /usr/bin/env to resolve pip`
Oct 9, 2020
8b22d95
[jlse-run] debug
danlkv Oct 9, 2020
a2cb18f
[jlse-results] for `[jlse-run] debug`
Oct 9, 2020
d799c5c
[jlse-run] add seed parameter and lower low boundary for mem
danlkv Oct 9, 2020
0ffa53d
Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 9, 2020
6173b32
[jlse-run] re-run
danlkv Oct 9, 2020
12a8b55
[jlse-results] for `[jlse-run] re-run`
Oct 9, 2020
5bbec72
[jlse-run] another seed
danlkv Oct 9, 2020
4d98296
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 9, 2020
b0aba54
[jlse-run] another seed
danlkv Oct 9, 2020
a0bd533
try to fix tests
danlkv Oct 9, 2020
3f1c101
try to fix lc-stuff
danlkv Oct 9, 2020
2574623
fixes with setuptools
danlkv Oct 9, 2020
4ff0b43
verbose pytest
danlkv Oct 9, 2020
347c2dd
[jlse-run] ld_preload for mkl, fix usage of seed
danlkv Oct 9, 2020
9e80240
[jlse-results] for `[jlse-run] ld_preload for mkl, fix usage of seed`
Oct 9, 2020
b631def
another ld_preload
danlkv Oct 9, 2020
54546f7
fix locales in test
danlkv Oct 9, 2020
2afd200
[jlse-run] just want another figure
danlkv Oct 9, 2020
89b6c73
[jlse-results] for `[jlse-run] just want another figure`
Oct 9, 2020
ebf842a
[jlse-run] add summation through mkl to mkl backend
danlkv Oct 10, 2020
6ddea30
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 10, 2020
717a186
[jlse-run] remove debugging prints
danlkv Oct 10, 2020
edfac70
[jlse-results] for `[jlse-run] remove debugging prints`
Oct 10, 2020
9cfaddb
[jlse-run] correct name of backend and make simulation bigger
danlkv Oct 10, 2020
7637b44
[jlse-run] make memory threshold back smaller, change seed
danlkv Oct 10, 2020
c69d63a
[jlse-run] make memory threshold back smaller, change seed
danlkv Oct 10, 2020
dfec092
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 10, 2020
ba2e8c7
[jlse-results] for `[jlse-run] make memory threshold back smaller, ch…
Oct 10, 2020
e13ab00
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 10, 2020
cda29fc
[jlse-results] for `[jlse-run] Merge remote-tracking branch 'origin/e…
Oct 10, 2020
ee7974d
[jlse-run] remove debugging duplicate einsum
danlkv Oct 10, 2020
013f19c
[jlse-results] for `[jlse-run] remove debugging duplicate einsum`
Oct 10, 2020
2657bdf
[jlse-run] use different method of timing
danlkv Oct 10, 2020
e166758
[jlse-results] for `[jlse-run] use different method of timing`
Oct 10, 2020
4a15f19
add debug_mkl framework
danlkv Oct 10, 2020
43bd889
some detailed logs for contractions
Oct 11, 2020
1a47e7a
fix import and compile of mkl backend
Oct 11, 2020
7acfe23
add tamaki-time cli arg to qaoa_energy_tw
danlkv Oct 11, 2020
6f52383
fix data type in tamaki time arg
danlkv Oct 11, 2020
d0d5ad9
[jlse-run] add tamaki to time-vs-flops, use a different fitting method
danlkv Oct 11, 2020
0fddef5
[jlse-results] for `[jlse-run] add tamaki to time-vs-flops, use a dif…
Oct 11, 2020
2763f87
[jlse-run] fix typo, revert tee, since it does not fail on failure
danlkv Oct 11, 2020
69b09bd
[jlse-run] Merge remote-tracking branch 'origin/exatn' into exatn
danlkv Oct 11, 2020
e299a3f
[jlse-run] add missing lib folder
danlkv Oct 11, 2020
c155d73
add sim qaoa to cli
danlkv Oct 11, 2020
df55d97
proper usage of seed in cli.py
Oct 11, 2020
8295d15
add n_processes to tw estimation
danlkv Oct 11, 2020
4faf854
fix bug with Pool usage
danlkv Oct 11, 2020
2489f90
fix small api bug
danlkv Oct 11, 2020
dc42b2a
bugfix
danlkv Oct 11, 2020
b5caeee
bugfix
danlkv Oct 11, 2020
35adebb
bugfix
danlkv Oct 11, 2020
77e7341
bugfix
danlkv Oct 11, 2020
0419e2c
enabled hypercontractions and added as an option in time vs FLOP
cameton Oct 14, 2020
0ed72df
setup.py for mkl backend uses MKLROOT
Oct 15, 2020
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 .github/workflows/jlse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
run:
working-directory: run/automake
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: recursive


- name: Update subpackages
- name: Update packages
run: |
(cd ../../analysis/spec/ && python setup.py develop --user --no-deps)
(cd ../../qtree/ && python setup.py develop --user --no-deps)
(cd ../../ && python setup.py develop --user)
(cd ../../analysis/spec/ && python setup.py develop --user)
(cd ../../qtree/ && python setup.py develop --user)

- name: Remove previous result.md
run: |
Expand Down
39 changes: 30 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,46 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: robbyjo/ubuntu-mkl:18.04-2019.1

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Setup git
run: |
yes | apt-get update
yes | apt-get install software-properties-common python3 python3-pip
yes | add-apt-repository ppa:git-core/ppa
yes | apt-get update
yes | apt-get install git

- uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
submodules: recursive

- name: Link to proper python
run: |
ln -srf $(which python3) /usr/bin/python
ln -srf $(which pip3) /usr/bin/pip
which pip3
echo $PATH


- name: Setup dependencies
env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
LC_ALL: C.UTF-8
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip --version
pip install .
pip install pytest mock
cd qtree && pip install .
(cd qtree && pip install .)
(cd scratchpad/cpp_connections/vanilia/nparray/ && pip install .)

- name: Test
run: cd qtensor && pytest
env:
LD_PRELOAD: "/opt/intel/mkl/lib/intel64/libmkl_def.so:/opt/intel/mkl/lib/intel64/libmkl_avx2.so:/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/lib/intel64_lin/libiomp5.so"
LC_ALL: C.UTF-8
run: cd qtensor && pytest -s
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,9 @@ treewidth = opt.treewidth
mems, flops = tn.simulation_cost(peo)
print('Max memory=', max(mems), 'Total flops=', sum(flops))
```

### Use cli to run benchmarks

```bash
» python -m qtensor.cli generate-qaoa-ansatz-circuit -p 3 -n 24 | python -m qtensor.cli sim-file --profile --max-tw 27
```
979 changes: 783 additions & 196 deletions analysis/spec/notebooks/Time_vs_FLOP.ipynb

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions analysis/spec/qtensor_specs/_nbdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"step_flops": "Time_vs_FLOP.ipynb",
"max_mem": "Time_vs_FLOP.ipynb",
"SEED": "Time_vs_FLOP.ipynb",
"EDGE_IDX_FOR_SEED": "Time_vs_FLOP.ipynb",
"EDGE_IDX_FOR_SEED_JLSE": "Time_vs_FLOP.ipynb",
"sim_profile": "Time_vs_FLOP.ipynb",
"step_sim_time": "Time_vs_FLOP.ipynb",
"plot_with_filter": "Time_vs_FLOP.ipynb",
Expand Down
110 changes: 73 additions & 37 deletions analysis/spec/qtensor_specs/time_vs_flop.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/Time_vs_FLOP.ipynb (unless otherwise specified).

__all__ = ['ex', 'graph', 'circuit', 'tn', 'peo', 'sim_costs', 'sum_flops', 'step_flops', 'max_mem', 'SEED',
'EDGE_IDX_FOR_SEED', 'EDGE_IDX_FOR_SEED_JLSE', 'sim_profile', 'step_sim_time', 'plot_with_filter',
'get_log_flops_vs_matmul', 'cli', 'time_vs_flops_plot']
'sim_profile', 'step_sim_time', 'plot_with_filter', 'get_log_flops_vs_matmul', 'cli', 'time_vs_flops_plot']

# Cell
import sys
import numpy as np
import matplotlib.pyplot as plt
import scipy

import qtensor as qt
from cartesian_explorer import Explorer
Expand Down Expand Up @@ -37,15 +37,19 @@ def tn(circuit):
return qt.optimisation.TensorNet.QtreeTensorNet.from_qtree_gates(circuit)

@ex.provider
def peo(tn):
opt = qt.optimisation.Optimizer.DefaultOptimizer()
def peo(tn, ordering_algo='greedy', tamaki_wait_time=15):
if ordering_algo=='greedy':
opt = qt.optimisation.Optimizer.DefaultOptimizer()
elif 'tamaki' in ordering_algo:
if '_' in ordering_algo:
_, time_str = ordering_algo.split('_')
tamaki_wait_time=int(time_str)
opt = qt.optimisation.Optimizer.TamakiOptimizer(wait_time=tamaki_wait_time)
peo, _ = opt.optimize(tn)
return tuple(peo)

@ex.provider
def sim_costs(tn, peo):
opt = qt.optimisation.Optimizer.DefaultOptimizer()
peo, _ = opt.optimize(tn)
costs, mems = tn.simulation_cost(peo)
return costs, mems

Expand All @@ -68,19 +72,16 @@ def max_mem(sim_costs):
# Cell
SEED=107

# Cell
EDGE_IDX_FOR_SEED = {
107: [2, 3, 10, 15]
}

EDGE_IDX_FOR_SEED_JLSE = {
107: [2, 4, 8, 14, 15, 21]
}

# Cell
@ex.provider
def sim_profile(circuit, tn):
backend = qt.PerfNumpyBackend(print=False)
def sim_profile(circuit, tn, backend='numpy'):
if backend == 'numpy':
backend = qt.PerfNumpyBackend(print=False)
elif backend == 'mkl':
backend = qt.ProcessingFrameworks.PerfBackend.from_backend(
qt.ProcessingFrameworks.CMKLExtendedBackend, print=False)
elif backend == 'debug_mkl':
backend = qt.DebugFrameworks.DebugMKLBackend()
sim = qt.QtreeSimulator(bucket_backend=backend)

sim.simulate(circuit)
Expand All @@ -95,32 +96,41 @@ def step_sim_time(sim_profile, tn):

# Cell
def plot_with_filter(est_flat, times_flat):
filt = (est_flat>1e4) #& (times_flat>1e-4)
filt = (est_flat>5e4) #& (times_flat>1e-4)
est_flat_filtered = est_flat[filt]
times_flat_filtered = times_flat[filt]

# Fit times
log_fit_coef = np.polyfit(np.log(est_flat_filtered), np.log(times_flat_filtered), 1)
fit_coef = np.polyfit(est_flat_filtered, times_flat_filtered, 1)
def fixed_slope(x, shift):
slope = 1.0
return x*slope + shift
popt, pcov = scipy.optimize.curve_fit(fixed_slope, np.log(est_flat_filtered), np.log(times_flat_filtered))
print('Lin fit:', fit_coef)
print('Log fit:', log_fit_coef)
print('Slope-1 log fit:', popt)
fit_fn = np.poly1d(log_fit_coef)
fit_fn = fixed_slope

# Plot scatter with filtered data
plt.scatter(est_flat_filtered, times_flat_filtered)
xfit = 10**np.linspace(4, 7, 100)
plt.plot(xfit, np.exp(fit_fn(np.log(xfit))), color='blue')
plt.scatter(est_flat_filtered, times_flat_filtered, marker='x')
min_x = np.log10(est_flat_filtered.min())
max_x = np.log10(est_flat_filtered.max()) + .5
xfit = 10**np.linspace(min_x, max_x, 100)
plt.plot(xfit, np.exp(fit_fn(np.log(xfit), popt[0])), color='blue')
plt.loglog()
plt.xlabel('estimated FLOP')
plt.ylabel('Runtime')
plt.grid()
return log_fit_coef, fit_coef

# Cell
import timeit
def get_log_flops_vs_matmul(log_fit_coef):
FLOPS_logfit = np.exp(-log_fit_coef[1])

N = 300
N = 500
matmul_flop = N**2*(N-1)
x, y = np.random.randn(2, N, N)
number = 100
Expand All @@ -138,9 +148,20 @@ def get_log_flops_vs_matmul(log_fit_coef):
def cli():
pass

@cli.command()
@click.argument('filename')
def time_vs_flops_plot(filename):
@click.argument('filename', nargs=-1)
@click.option('-B', '--backend', default='numpy')
@click.option('-M', '--max-memory', default=3e8)
@click.option('-s', '--seed', default=SEED)
@click.option('-O', '--ordering_algo', default='greedy'
,help=("One of (greedy, tamaki, tamaki_{wait_time})"
"'tamki_15' means heuristic solver running for 15 seconds per graph"
)
)
@click.option('--min-memory', default=3e6)
def time_vs_flops_plot(filename=None, backend='numpy', seed=SEED,
max_memory=2e8, min_memory=1e6,
ordering_algo='greedy', tamaki_time=10
):
"""
Plots times and estimated FLOP for each step of several QAOA energy computation contractions.

Expand All @@ -150,31 +171,46 @@ def time_vs_flops_plot(filename):
- N = 1000

"""
edge_indices = EDGE_IDX_FOR_SEED[SEED]
ds = [3, 4]
p = 3
N = 1000

estimators = ex.map_variable('step_flops', d=ds,
edge_idx=edge_indices, n=[N], p=[p], seed=[SEED])
maxmems = ex.map_variable('max_mem', d=ds,
edge_idx=edge_indices, n=[N], p=[p], seed=[SEED])
if np.max(maxmems)>1e10:
print('memory estimations:', maxmems)
raise Exception('Will get too large tetsors!!')
edges_to_try = 20
estimators, maxmems = ex.map_variables(
('step_flops', 'max_mem'),
d=ds,
edge_idx=range(edges_to_try), n=[N], p=[p],
seed=[seed],
ordering_algo=[ordering_algo],
)


selector = ((min_memory < maxmems) & (maxmems < max_memory)).all(axis=0)
edge_indices = np.arange(edges_to_try)[selector]
print('Selected edges', edge_indices)
print('Estimated memories', maxmems.T[selector].flatten())
estimators = estimators.T[selector]

times = ex.map_variable('step_sim_time', d=ds,
edge_idx=edge_indices, n=[N], p=[p], seed=[SEED])
edge_idx=edge_indices, n=[N], p=[p]
,seed=[seed]
,backend=[backend]
,ordering_algo=[ordering_algo]
)

est_flat = np.concatenate(estimators.flatten())
est_flat = np.concatenate(estimators.T.flatten())
times_flat = np.concatenate(times.flatten())

log_fit_coef, fit_coef = plot_with_filter(est_flat, times_flat)
plt.savefig(filename)
if filename:
plt.savefig(filename[0])

fit, matmul = get_log_flops_vs_matmul(log_fit_coef)

print('===Results===')
print(f'Total time: {times_flat.sum():.5}')
print(f'Simulator fitted flops: {fit/1e9:.5} G')
print(f'Matmul flops: {matmul/1e9:.5} G')
print(f'Simulator optimality: {fit/matmul}')
print(f'Simulator optimality: {fit/matmul}')

cli.command()(time_vs_flops_plot)
37 changes: 14 additions & 23 deletions bench/mklbench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,29 +157,20 @@ int main(void)
// transa transb M N K

int i;
run_size<double>(do_trans, no_trans, 4096);

// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 4096 + i);
// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 2048 + i);
// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 1024 + i);
// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 256 + i);
// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 128 + i);
// for (i = 10; i >= -10; i--)
// run_size<double>(do_trans, no_trans, 32 + i);
//
// for (i = 4096; i >= 512; i -= 256)
// run_size<double>(no_trans, no_trans, i, i, i);
//
// for (i = 512; i >= 64; i -= 32)
// run_size<double>(no_trans, no_trans, i, i, i);

// for (i = 64; i >= 16; i -= 1)
// run_size<double>(no_trans, no_trans, i, i, i);
//run_size<double>(no_trans, do_trans, 4096, 4096, 4096);
run_size<double>(no_trans, do_trans, 4096, 1, 4096);
//run_size<double>(no_trans, do_trans, 1000, 1000, 1000);
run_size<double>(no_trans, do_trans, 1000, 1, 1000);


// for (i = 4096; i >= 512; i -= 256)
// run_size<double>(no_trans, no_trans, i, i, i);

//for (i = 512; i >= 64; i -= 32)
// run_size<double>(no_trans, no_trans, i, i, i);

//for (i = 64; i >= 16; i -= 1)
// run_size<double>(no_trans, no_trans, i, i, i);

return EXIT_SUCCESS;
}
4 changes: 2 additions & 2 deletions bench/pybench/tn_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ def run(n, num_iter, num_batch):

if __name__ == "__main__":
tn.set_default_backend(sys.argv[1])
for i in range(4102, 4090 - 1, -1):
run(i, 20, 1)
for i in range(4120, 4082 - 2, -2):
run(i, 10, 1)

1 change: 1 addition & 0 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debugging backend and mkl_verbose add 3 seconds to a 18 senond task
Loading