Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
predtuner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
predtuner
Commits
2477abd6
Commit
2477abd6
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in qos computation with model p1
parent
8d344c4e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/tune_vgg16_cifar10.py
+1
-0
1 addition, 0 deletions
examples/tune_vgg16_cifar10.py
predtuner/torchapp.py
+1
-0
1 addition, 0 deletions
predtuner/torchapp.py
with
2 additions
and
0 deletions
examples/tune_vgg16_cifar10.py
+
1
−
0
View file @
2477abd6
...
@@ -47,6 +47,7 @@ tuner.tune(
...
@@ -47,6 +47,7 @@ tuner.tune(
qos_keep_threshold
=
3.0
,
# QoS threshold for which we actually keep the thresholds
qos_keep_threshold
=
3.0
,
# QoS threshold for which we actually keep the thresholds
is_threshold_relative
=
True
,
# Thresholds are relative to baseline -- baseline_acc - 2.1
is_threshold_relative
=
True
,
# Thresholds are relative to baseline -- baseline_acc - 2.1
cost_model
=
"
cost_linear
"
,
# Use linear performance predictor
cost_model
=
"
cost_linear
"
,
# Use linear performance predictor
qos_model
=
"
qos_p1
"
,
# Use P1 QoS predictor
)
)
# Save configs here when you're done
# Save configs here when you're done
tuner
.
dump_configs
(
"
tuner_results/vgg16_cifar10_configs.json
"
)
tuner
.
dump_configs
(
"
tuner_results/vgg16_cifar10_configs.json
"
)
...
...
This diff is collapsed.
Click to expand it.
predtuner/torchapp.py
+
1
−
0
View file @
2477abd6
...
@@ -153,6 +153,7 @@ class TorchApp(ModeledApp, abc.ABC):
...
@@ -153,6 +153,7 @@ class TorchApp(ModeledApp, abc.ABC):
target
=
move_to_device_recursively
(
target
,
self
.
device
)
target
=
move_to_device_recursively
(
target
,
self
.
device
)
qos
=
self
.
tensor_to_qos
(
tensor_output
[
begin
:
end
],
target
)
qos
=
self
.
tensor_to_qos
(
tensor_output
[
begin
:
end
],
target
)
qoses
.
append
(
qos
)
qoses
.
append
(
qos
)
begin
=
end
return
self
.
combine_qos
(
np
.
array
(
qoses
))
return
self
.
combine_qos
(
np
.
array
(
qoses
))
p1_storage
=
self
.
model_storage
/
"
p1.pkl
"
if
self
.
model_storage
else
None
p1_storage
=
self
.
model_storage
/
"
p1.pkl
"
if
self
.
model_storage
else
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment