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
77de7e21
Commit
77de7e21
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Changed add_baseline_to_knobs to add knobs in order
parent
6ea1a632
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
predtuner/approxapp.py
+5
-6
5 additions, 6 deletions
predtuner/approxapp.py
with
5 additions
and
6 deletions
predtuner/approxapp.py
+
5
−
6
View file @
77de7e21
...
...
@@ -93,11 +93,10 @@ class ApproxApp(abc.ABC):
return
baseline_knob
def
add_baseline_to_knobs
(
self
,
approxes
:
KnobsT
):
approxes
=
approxes
.
copy
()
for
op_name
in
self
.
ops
:
if
op_name
not
in
approxes
:
approxes
[
op_name
]
=
self
.
baseline_knob
.
name
return
approxes
return
{
op_name
:
approxes
.
get
(
op_name
,
self
.
baseline_knob
.
name
)
for
op_name
in
self
.
ops
}
class
BaselineKnob
(
ApproxKnob
):
...
...
@@ -230,7 +229,7 @@ class ApproxTuner(Generic[T]):
filepath
=
Path
(
filepath
)
os
.
makedirs
(
filepath
.
parent
,
exist_ok
=
True
)
with
filepath
.
open
(
"
w
"
)
as
f
:
f
.
write
(
encode
(
self
.
kep
t_configs
,
indent
=
2
))
f
.
write
(
encode
(
self
.
bes
t_configs
,
indent
=
2
))
def
plot_configs
(
self
)
->
plt
.
Figure
:
if
not
self
.
tuned
:
...
...
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