Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
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
Model registry
Operate
Environments
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
hpvm-release
Commits
647667d7
Commit
647667d7
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Fixed docstring and autotyping
parent
ecfb4a93
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hpvm/docs/conf.py
+4
-6
4 additions, 6 deletions
hpvm/docs/conf.py
hpvm/docs/requirements.txt
+0
-1
0 additions, 1 deletion
hpvm/docs/requirements.txt
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
+12
-11
12 additions, 11 deletions
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
with
16 additions
and
18 deletions
hpvm/docs/conf.py
+
4
−
6
View file @
647667d7
...
...
@@ -4,10 +4,9 @@ from datetime import date
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import
os
import
sys
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
"
..
"
))
from
pathlib
import
Path
sys
.
path
.
insert
(
0
,
Path
(
"
../projects/hpvm-profiler
"
).
absolute
().
as_posix
(
))
# General configuration
# ---------------------
...
...
@@ -17,16 +16,15 @@ sys.path.insert(0, os.path.abspath(".."))
extensions
=
[
"
sphinx.ext.autosummary
"
,
"
sphinx.ext.autodoc
"
,
"
sphinx_autodoc_typehints
"
,
"
sphinx.ext.coverage
"
,
"
sphinx.ext.doctest
"
,
"
sphinx.ext.intersphinx
"
,
"
sphinx.ext.mathjax
"
,
"
sphinx.ext.todo
"
,
"
sphinx.ext.viewcode
"
,
"
numpydoc
"
,
]
always_document_param_types
=
True
autodoc_typehints
=
"
description
"
# generate autosummary pages
autosummary_generate
=
True
...
...
This diff is collapsed.
Click to expand it.
hpvm/docs/requirements.txt
+
0
−
1
View file @
647667d7
sphinx>=3.5
sphinx-autodoc-typehints>=1.11
pydata-sphinx-theme==0.5.2
numpydoc>=1.1
\ No newline at end of file
This diff is collapsed.
Click to expand it.
hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
+
12
−
11
View file @
647667d7
...
...
@@ -16,19 +16,20 @@ def profile_config_file(
profile_filename
:
str
=
"
profile_info.txt
"
,
qos_filename
:
str
=
"
final_accuracy
"
,
)
->
None
:
"""
Profile an HPVM
configuration file
with an HPVM binary
.
r
"""
Profile an HPVM configuration file with an HPVM binary,
and write the updated
configuration file
to a given location
.
The configuration file must have the baseline as the first configuration.
binary_path: Path to binary to be executed in profiling.
config_path: Path to config file (HPVM configuration format)
:param
binary_path: Path to binary to be executed in profiling.
:param
config_path: Path to config file (HPVM configuration format)
with configs to enumerate for profiling.
output_config_path: Path where the output configs are written.
:param
output_config_path: Path where the output configs are written.
The output config file has the same configs as the input `config_path` file,
but the performance and energy readings are updated.
profile_filename: Name of profile file generated by the binary (in current directory).
:param progress_bar: If `True`, show a progress bar for number of configs already profiled.
:param profile_filename: Name of profile file generated by the binary (in current directory).
This defaults to
"
profile_info.txt
"
and should not be changed for HPVM binaries.
qos_filename: Name of QoS file generated by the binary (in current directory).
:param
qos_filename: Name of QoS file generated by the binary (in current directory).
It contains a single float number as the QoS of this run.
This defaults to
"
final_accuracy
"
and should not be changed for HPVM binaries.
"""
...
...
@@ -109,11 +110,11 @@ def plot_hpvm_configs(
to obtain real speedup numbers.
This function creates a `matplotlib.pyplot.Figure`, plots on it, and returns it.
config_path: Path to the config file (HPVM configuration format).
save_to: File to save figure into. Default is None: don
'
t save figure (just return it).
show_qos_loss: Show the loss of QoS on x axis of the figure. Defaults to True.
:param
config_path: Path to the config file (HPVM configuration format).
:param
save_to: File to save figure into. Default is None: don
'
t save figure (just return it).
:param
show_qos_loss: Show the loss of QoS on x axis of the figure. Defaults to True.
If False, will use (absolute) QoS instead of QoS loss.
fig_kwargs: Arguments to pass to `plt.subplots`.
:param
fig_kwargs: Arguments to pass to `plt.subplots`.
"""
import
numpy
as
np
...
...
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