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
499f383a
Commit
499f383a
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Work note for recon'ed predtuner
parent
eaa5f9a9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
notes.md
+56
-0
56 additions, 0 deletions
notes.md
with
56 additions
and
0 deletions
notes.md
0 → 100644
+
56
−
0
View file @
499f383a
## General API (Level 1)
-
Knob:
-
A name -- constant
-
kwargs (for knob parameter, for example: 25% in 25% perforation) -- constant
-
Whether coexist with another knob or not -- method
-
Useful when we want to support multiple knobs in an op
-
Application:
-
List of operators (just a name) -- constant
-
List of knobs (each with a name) -- constant
-
List of knobs (by knob name) for each layer -- constant
-
(We provide a knob value for "baseline" and sneak that in each layer)
-
Argparser extra arguments -- static method
-
How to measure QoS & performance given a configuration -- method
-
Input? Don't care
-
Empirical or modeled? Don't care
-
This is a minimal interface to interact with
`opentuner`
, nothing ApproxTuner yet.
## Predictive Tuning (Level 2)
Performance model + QoS model (P1, P2)
-
Performance model (linear combination of operator cost
*
speedup of knob)
-
Requires list of operator cost
-
Requires table of knob speedup on layer
-
QoS P1 (linear in tensor output)
-
Requires tensor output of each single knob
-
QoS P2 (linear in QoS)
-
Requires QoS of each single knob
-
Predict-tunable application
-
User should inherit from a number of interfaces. Inherit P1Interface -> can use P1, etc.
-
Detect self capability using
`isinstance(self, ...)`
and offers argparser extra arguments
(or config file entries).
## Predictive Tuning for PyTorch Modules (Level 3)
Automate some definitions using inspection on module
-
PyTorch application
-
*
Provides list of operators and cost in FLOPs
-
*
Provides function for running inference on module and combining output
-
*
Implements P2
-
*
Implements P1 if output is tensor
-
Require a PyTorch module
-
Require an input dataset
## API usage
-
User defines classes for knobs
-
Perforation, sampling...
-
User defines application
-
Most general: just
`Application`
. Useful for tuning a binary, for example.
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