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
5e671e05
Commit
5e671e05
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Grab data from Illinois data bank instead of git lfs
parent
bb03b4d8
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
.gitattributes
+0
-1
0 additions, 1 deletion
.gitattributes
hpvm/scripts/hpvm_installer.py
+38
-5
38 additions, 5 deletions
hpvm/scripts/hpvm_installer.py
hpvm/test/dnn_benchmarks/.gitignore
+1
-0
1 addition, 0 deletions
hpvm/test/dnn_benchmarks/.gitignore
with
39 additions
and
6 deletions
.gitattributes
deleted
100644 → 0
+
0
−
1
View file @
bb03b4d8
hpvm/test/dnn_benchmarks/model_params/**/*.bin filter=lfs diff=lfs merge=lfs -text
This diff is collapsed.
Click to expand it.
hpvm/scripts/hpvm_installer.py
+
38
−
5
View file @
5e671e05
#!/usr/bin/env python3
from
pathlib
import
Path
from
argparse
import
ArgumentParser
,
Namespace
from
subprocess
import
check_call
from
subprocess
import
CalledProcessError
,
check_call
from
os
import
makedirs
,
chdir
,
environ
VERSION
=
"
9.0.0
"
...
...
@@ -12,11 +12,15 @@ CLANG_TARBALL = f"{CLANG_DIR}.tar.xz"
LLVM_DIR
=
f
"
llvm-
{
VERSION
}
.src
"
LLVM_TARBALL
=
f
"
{
LLVM_DIR
}
.tar.xz
"
ROOT_DIR
=
Path
.
cwd
()
ROOT_DIR
=
(
Path
(
__file__
).
parent
/
"
..
"
).
absolute
()
BUILD_DIR
=
ROOT_DIR
/
"
build
"
TEST_DIR
=
ROOT_DIR
/
"
test
"
LLVM_LIT
=
BUILD_DIR
/
"
bin/llvm-lit
"
MODEL_PARAMS_DIR
=
TEST_DIR
/
"
dnn_benchmarks/model_params
"
MODEL_PARAMS_TAR
=
ROOT_DIR
/
"
model_params.tar.gz
"
MODEL_PARAMS_LINK
=
"
https://databank.illinois.edu/datafiles/o3izd/download
"
LINKS
=
[
"
CMakeLists.txt
"
,
"
cmake
"
,
...
...
@@ -63,6 +67,9 @@ def parse_args():
parser
.
add_argument
(
"
-r
"
,
"
--run-tests
"
,
action
=
"
store_true
"
,
help
=
"
Build and run test cases
"
)
parser
.
add_argument
(
"
--no-params
"
,
action
=
"
store_true
"
,
help
=
"
Don
'
t download DNN model parameters
"
)
return
parser
.
parse_args
()
...
...
@@ -74,11 +81,11 @@ def prompt_args():
def
parse_int
(
s
:
str
):
try
:
v
=
int
(
s
)
return
v
except
ValueError
:
return
None
if
v
<=
0
:
return
None
return
v
def
parse_targets
(
s
:
str
):
if
"
"
in
s
:
...
...
@@ -124,7 +131,7 @@ def print_args(args):
def
check_download_llvm_clang
():
if
Path
(
"
llvm/
"
).
is_dir
():
print
(
"
Found LLVM, not extracting it again.
"
)
print
(
"
Found LLVM
directory
, not extracting it again.
"
)
else
:
if
Path
(
LLVM_TARBALL
).
is_file
():
print
(
f
"
Found
{
LLVM_TARBALL
}
, not downloading it again.
"
)
...
...
@@ -141,7 +148,7 @@ def check_download_llvm_clang():
environ
[
"
LLVM_SRC_ROOT
"
]
=
str
(
ROOT_DIR
/
"
llvm
"
)
if
(
tools
/
"
clang/
"
).
is_dir
():
print
(
"
Found clang
, not download
ing it again.
"
)
print
(
"
Found clang
directory, not extract
ing it again.
"
)
return
chdir
(
tools
)
print
(
f
"
Downloading
{
CLANG_TARBALL
}
...
"
)
...
...
@@ -155,6 +162,30 @@ def check_download_llvm_clang():
chdir
(
ROOT_DIR
)
def
check_download_model_params
():
if
MODEL_PARAMS_DIR
.
is_dir
():
print
(
"
Found model parameters, not extracting it again.
"
)
return
if
MODEL_PARAMS_TAR
.
is_file
():
print
(
f
"
Found
{
MODEL_PARAMS_TAR
}
, not downloading it again.
"
)
else
:
print
(
f
"
Downloading DNN model parameters:
{
MODEL_PARAMS_TAR
}
...
"
)
print
(
f
"
=============================
"
)
check_call
([
WGET
,
MODEL_PARAMS_LINK
,
"
-O
"
,
MODEL_PARAMS_TAR
])
print
(
f
"
Extracting DNN model parameters
{
MODEL_PARAMS_TAR
}
=>
{
MODEL_PARAMS_DIR
}
...
"
)
# Decompression is pretty time-consuming so we try to show a progress bar:
try
:
check_call
(
f
"
pv
{
MODEL_PARAMS_TAR
}
| tar xz
"
,
shell
=
True
)
except
CalledProcessError
:
# Maybe `pv` is not installed. Fine, we'll run without progress bar.
print
(
"
>>
'
pv
'
is not installed, no progress bar will be shown during decompression.
"
)
print
(
"
>> Decompression ongoing...
"
)
check_call
([
"
tar
"
,
"
xzf
"
,
MODEL_PARAMS_TAR
])
check_call
([
"
mv
"
,
"
model_params
"
,
MODEL_PARAMS_DIR
])
if
MODEL_PARAMS_TAR
.
is_file
():
MODEL_PARAMS_TAR
.
unlink
()
def
link_and_patch
():
from
os
import
symlink
...
...
@@ -236,6 +267,8 @@ def main():
print_args
(
args
)
check_download_llvm_clang
()
link_and_patch
()
if
not
args
.
no_params
:
check_download_model_params
()
maybe_build
(
not
args
.
no_build
,
args
.
parallel
,
args
.
targets
,
args
.
run_tests
)
if
args
.
run_tests
:
run_tests
()
...
...
This diff is collapsed.
Click to expand it.
hpvm/test/dnn_benchmarks/.gitignore
0 → 100644
+
1
−
0
View file @
5e671e05
model_params/
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