Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 8ee3d96

Browse files
author
Jules Pondard
committed
Add a file to quickly compare different set of options
These options must be given in their vector format. See my_utils for more info
1 parent 8c5629b commit 8ee3d96

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import numpy as np
2+
import time
3+
import my_utils
4+
import torch
5+
import torch.optim as optim
6+
import torch.nn as nn
7+
import torch.utils.data
8+
import torch.nn.functional as F
9+
import tensor_comprehensions as tc
10+
11+
set_options = [
12+
[1, 1, 0, 1, 2, 1, 3, 6, 8, 0, 3, 0, 2, 11, 9, 8, 2, 0, 0, 3, 0, 0, 1, 0, 1, 2]
13+
]
14+
15+
16+
(tc_code, tc_name, inp, init_input_sz) = my_utils.get_convolution_example()
17+
18+
my_utils.computeCat(inp)
19+
my_utils.set_tc(tc_code, tc_name)
20+
21+
NB_HYPERPARAMS, INIT_INPUT_SZ = my_utils.NB_HYPERPARAMS, my_utils.INIT_INPUT_SZ
22+
23+
for i in range(len(set_options)):
24+
opts = np.array(set_options[i])
25+
time = my_utils.evalTime(opts)
26+
print(time)

0 commit comments

Comments
 (0)