Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph embedding #14

Open
wants to merge 181 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
1081c0d
add few shot learning
ruochen99 Mar 27, 2021
5390b06
embedding
ruochen99 Mar 28, 2021
eca030e
embedding
ruochen99 Mar 28, 2021
3bb5ca0
embedding
ruochen99 Mar 28, 2021
29f9abb
embedding
ruochen99 Mar 28, 2021
3b3d647
excluded certain networks
ruochen99 Mar 29, 2021
c3ea2db
excluded certain networks
ruochen99 Mar 29, 2021
8865a76
mlp
ruochen99 Mar 30, 2021
03778ad
mlp
ruochen99 Mar 30, 2021
fc7915b
mlp
ruochen99 Mar 30, 2021
58ffdb8
Update dataset.py
ruochen99 Mar 30, 2021
6c18052
Merge branch 'main' of https://github.com/merrymercy/tvm-cost-model i…
ruochen99 Apr 3, 2021
3bf1d91
split dataset
ruochen99 Apr 3, 2021
6a55fc1
split dataset
ruochen99 Apr 3, 2021
79611c0
exclude dataset
ruochen99 Apr 4, 2021
9fdfd48
exclude dataset
ruochen99 Apr 4, 2021
4bff310
dataset
ruochen99 Apr 4, 2021
ed9e73b
add vgg
Apr 5, 2021
5f46103
a
Apr 6, 2021
6b42735
mlp
Apr 6, 2021
a6700d1
mlp models
Apr 11, 2021
1407f0d
mlp models
ruochen99 Apr 11, 2021
1bda2d2
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
Apr 11, 2021
546197f
a
ruochen99 Apr 11, 2021
25c320f
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
Apr 11, 2021
261510f
mlp model in eval
ruochen99 Apr 11, 2021
45069c7
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Apr 11, 2021
88a3fc4
plot
ruochen99 Apr 12, 2021
c9fb1ce
eval model
ruochen99 Apr 12, 2021
c6a4aff
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
Apr 12, 2021
ec9c061
plot mlp
Apr 12, 2021
f0a3b20
mlp
ruochen99 Apr 12, 2021
1f36a81
mlp load + vgg
ruochen99 Apr 13, 2021
afb3582
merge
ruochen99 Apr 13, 2021
e14c851
two mlp models
ruochen99 Apr 13, 2021
88fef56
merge
ruochen99 Apr 13, 2021
cef7dec
mlp loss func by group
ruochen99 Apr 19, 2021
454582b
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Apr 19, 2021
7dbda41
remove vgg add eval gpu
ruochen99 Apr 19, 2021
ce4a8b0
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Apr 19, 2021
4b357f4
mlp loss by group
ruochen99 Apr 19, 2021
5e13eb5
mlp loss by group
ruochen99 Apr 19, 2021
884725e
mlp loss by group multiple loaders
ruochen99 Apr 19, 2021
4e1d7c9
plot
ruochen99 Apr 20, 2021
82cda9e
mlp lambda rank remove device
ruochen99 Apr 20, 2021
7db8d7f
dispatcher debug
ruochen99 Apr 20, 2021
498d81a
plot
ruochen99 Apr 20, 2021
9ce87e2
mlp
ruochen99 Apr 20, 2021
6076aa9
plot
ruochen99 Apr 20, 2021
df5a79e
weight by flop cnt
ruochen99 Apr 20, 2021
cc03b6b
delete plots
ruochen99 Apr 20, 2021
69af2da
plot
ruochen99 Apr 20, 2021
0f09369
plot
ruochen99 Apr 20, 2021
b306176
plot
ruochen99 Apr 20, 2021
c6b5c81
weight by ctn
Apr 20, 2021
1eb7e25
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
Apr 20, 2021
2ec3112
mlp shuffle tasks
ruochen99 Apr 26, 2021
1f96bf4
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Apr 26, 2021
3d4d690
renext
ruochen99 Apr 26, 2021
fd37d7f
mlp debug
ruochen99 Apr 26, 2021
82bc682
plots
ruochen99 Apr 26, 2021
4ca8f5e
plots
ruochen99 Apr 26, 2021
e59821e
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Apr 26, 2021
5c77940
random from top two
ruochen99 Apr 27, 2021
18b5a67
random from top two
ruochen99 Apr 27, 2021
70fba39
plots
ruochen99 Apr 27, 2021
9bffb02
plot
ruochen99 Apr 27, 2021
a8ae5a0
plot
ruochen99 Apr 27, 2021
1b226f7
beam search
ruochen99 Apr 30, 2021
b350ffc
random wearch debug
ruochen99 Apr 30, 2021
7d9c607
plots
ruochen99 Apr 30, 2021
25546ca
plot debugger
ruochen99 May 2, 2021
fcea194
make plot
ruochen99 May 3, 2021
8a21648
plots
ruochen99 May 4, 2021
62f8bee
eval model
ruochen99 May 18, 2021
4f95b97
a
ruochen99 May 18, 2021
404e081
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 18, 2021
880a7d4
eval model
ruochen99 May 18, 2021
68014bc
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 18, 2021
ae03509
eval model
ruochen99 May 18, 2021
a766a59
eval model
ruochen99 May 18, 2021
8e215a8
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 18, 2021
01d25e7
eval model
ruochen99 May 18, 2021
a9601a6
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 18, 2021
cc7cc47
eval
ruochen99 May 18, 2021
2de1c5b
comment out stuff
ruochen99 May 19, 2021
dee9079
get backstuff
ruochen99 May 19, 2021
cb412ea
remove meta
ruochen99 May 19, 2021
f82f130
revert
ruochen99 May 19, 2021
7338538
revert
ruochen99 May 19, 2021
0f49293
merge
ruochen99 May 19, 2021
754e992
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 19, 2021
e4e056e
a model
ruochen99 May 20, 2021
d9a2b88
clean up mlp
ruochen99 May 20, 2021
32aee06
embedding
ruochen99 May 20, 2021
e0fa9db
embedding
ruochen99 May 20, 2021
c21b17d
a model
ruochen99 May 20, 2021
89a693e
clean up mlp
May 20, 2021
bea8297
clean up mlp
May 20, 2021
6f92d34
hold out
ruochen99 May 21, 2021
e62b915
model
ruochen99 May 23, 2021
4f3a12f
a
ruochen99 May 25, 2021
2d08359
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 25, 2021
efa6d1d
metrics
ruochen99 May 25, 2021
414e4b7
models
ruochen99 May 25, 2021
12c3e0f
a
ruochen99 May 28, 2021
ffa0f1b
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 28, 2021
3e980b0
eval model
ruochen99 May 28, 2021
2a46e2d
a
ruochen99 May 28, 2021
7118bf3
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 28, 2021
342c2ff
dataset
ruochen99 May 28, 2021
da707c1
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 May 28, 2021
81fe6d8
mlp debug
ruochen99 Jun 1, 2021
66f68da
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 1, 2021
374836a
lstm
ruochen99 Jun 2, 2021
5a0dc8c
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 2, 2021
323f38c
lstm
ruochen99 Jun 2, 2021
24abfce
lstm
ruochen99 Jun 3, 2021
d1280d3
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 3, 2021
12335c1
lstm
ruochen99 Jun 3, 2021
90c6953
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 3, 2021
cfe827b
lstm
ruochen99 Jun 3, 2021
00076bb
average top score
ruochen99 Jun 4, 2021
cff0b49
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 4, 2021
a2965b5
lstm
ruochen99 Jun 5, 2021
eeccb6f
hold out all resnet50
ruochen99 Jun 5, 2021
14732df
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 5, 2021
feca917
model
ruochen99 Jun 5, 2021
93e84b6
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 5, 2021
a3ab447
target embedding
ruochen99 Jun 5, 2021
b796486
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 5, 2021
d618b0a
multiple target
ruochen99 Jun 5, 2021
96c8be9
a
ruochen99 Jun 5, 2021
356b2ad
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 5, 2021
1e33c3b
timestamp
ruochen99 Jun 6, 2021
f077d8e
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
981ec6d
timestamp
ruochen99 Jun 6, 2021
27cbfe2
timestamp
ruochen99 Jun 6, 2021
97dd91d
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
307580b
timestamp
ruochen99 Jun 6, 2021
c248e8e
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
6f79673
timestamp
ruochen99 Jun 6, 2021
d51c1cd
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
5b0185d
timestamp
ruochen99 Jun 6, 2021
4a8d390
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
ecfefa0
timestamp
ruochen99 Jun 6, 2021
883957f
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
29162be
timestamp
ruochen99 Jun 6, 2021
67b8f12
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
104eb7b
mlp
ruochen99 Jun 6, 2021
011c0ce
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 6, 2021
617074c
cross platform
ruochen99 Jun 7, 2021
ff127ed
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jun 7, 2021
fc8fd19
minor bugs fixed
ruochen99 Jun 7, 2021
7f051e2
minor bugs fixed
ruochen99 Jun 7, 2021
10fa565
local
ruochen99 Jun 7, 2021
308b790
local
ruochen99 Jun 7, 2021
aa9e85a
wrap up
ruochen99 Jul 1, 2021
bbec3df
wrap up
ruochen99 Jul 1, 2021
693ccc0
wrap up
ruochen99 Jul 1, 2021
3f51c8d
wrap up
ruochen99 Jul 1, 2021
46902d8
wrap up
ruochen99 Jul 1, 2021
f37a64a
wrap up
ruochen99 Jul 1, 2021
0e78eb6
merge
ruochen99 Jul 1, 2021
41c1d93
wrap up
ruochen99 Jul 2, 2021
5d27820
delete binary
ruochen99 Jul 2, 2021
a85fbfe
merge
ruochen99 Jul 2, 2021
f8c3e9b
merge
ruochen99 Jul 2, 2021
daac6e4
Update xgb_model.py
ruochen99 Jul 2, 2021
efcc261
Update dataset.py
ruochen99 Jul 2, 2021
1d1301a
Update dataset.py
ruochen99 Jul 2, 2021
4e5be18
Update dataset.py
ruochen99 Jul 2, 2021
2015337
Update dispatcher.py
ruochen99 Jul 2, 2021
0db1a93
Update task_scheduler.py
ruochen99 Jul 2, 2021
042090c
remove binary
ruochen99 Jul 2, 2021
106ce18
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jul 2, 2021
371ff61
Update workload_registry.py
ruochen99 Jul 2, 2021
3262507
doc
ruochen99 Jul 2, 2021
46effe8
Merge branch 'few-shot' of https://github.com/merrymercy/tvm-cost-mod…
ruochen99 Jul 2, 2021
d1f55df
Delete graph_embedding.py
ruochen99 Jul 5, 2021
0ace662
graph embedding
ruochen99 Jul 10, 2021
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
31 changes: 30 additions & 1 deletion docs/get_started_with_cost_model_experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,34 @@ Use the CPU part of the dataset and go to `tenset/scripts`.
```

### More experiments
More experiments will be added later.
1. Dataset
- Make a dataset with a certain number of tasks and a certain number of measurements per task. E.g.
```
python3 make_dataset.py --logs dataset/measure_records/e5-2673/*.json --n-task 200 --n-measurement 200
```
- Make a hold-out dataset. E.g. hold out all tasks appeared in resnet-50
```
python3 make_dataset.py --logs dataset/measure_records/e5-2673/*.json --hold-out resnet-50
```
2. Model training
- Specify the type of model. E.g.
```
python3 train_model.py --models mlp
```
3. Search
*Note that we might need to specify the target argument depending on the machine type.
- No pre-trained model, and train a model online. E.g.
```
python3 tune_network.py --network resnet_50 --n-trials 100 --cost-model xgb --target "llvm -mcpu=skylake-avx512"
```
- Use a pre-trained model. E.g.
```
python3 tune_network.py --network resnet_50 --n-trials 100 --cost-model mlp-no-update --load-model mlp.pkl
```
- Use transfer-learning. E.g.
```
python3 tune_network.py --network resnet_50 --n-trials 100 --cost-model mlp-no-update --load-model mlp.pkl --transfer-tune
```



1 change: 1 addition & 0 deletions python/tvm/auto_scheduler/cost_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@

from .cost_model import RandomModel, RandomModelInternal
from .xgb_model import XGBModel
from .mlp_model import MLPModel
3 changes: 3 additions & 0 deletions python/tvm/auto_scheduler/cost_model/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def metric_peak_score(preds, labels, top_k):
curve = max_curve(trial_scores) / np.max(labels)
return np.mean(curve)

def metric_mape(preds, labels):
return np.mean(np.abs((labels-preds)/labels))


def random_mix(values, randomness):
random_values = np.random.uniform(np.min(values), np.max(values), len(values))
Expand Down
Loading