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
6933a73c
Commit
6933a73c
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a dependency order issue between CMake targets
parent
bd1a3361
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
+26
-24
26 additions, 24 deletions
hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
with
26 additions
and
24 deletions
hpvm/test/dnn_benchmarks/hpvm-c/CMakeLists.txt
+
26
−
24
View file @
6933a73c
# First get approxhpvm.py which we then use to compile benchmarks.
# First get approxhpvm.py which we then use to compile benchmarks.
get_filename_component
(
APPROXHPVM_PY
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/approxhpvm.py REALPATH
)
get_filename_component
(
APPROXHPVM_PY
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/approxhpvm.py REALPATH
)
# --[ llvm-lit test setup
# lit.cfg.py looks for tests in CMAKE_CURRENT_BINARY_DIR (see lit.cfg.py)
# as most of the tests require some kind of compilation / generation
# which is best done over there.
configure_lit_site_cfg
(
../../lit.site.cfg.py.in
${
CMAKE_CURRENT_BINARY_DIR
}
/lit.site.cfg.py
MAIN_CONFIG
${
CMAKE_CURRENT_SOURCE_DIR
}
/lit.cfg.py
)
add_lit_testsuite
(
check-hpvm-dnn
"Running HPVM DNNs"
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS dnn_benchmarks
# Compile all dnn benchmarks to run them
ARGS
"-j1"
# Run DNN benchmarks sequentially
)
# Install an accuracy comparator under build/bin
set
(
BIN_DIR
${
LLVM_BINARY_DIR
}
/
${
LLVM_TOOLS_INSTALL_DIR
}
)
add_custom_command
(
OUTPUT
${
BIN_DIR
}
/check_dnn_acc.py
COMMAND cp
${
CMAKE_CURRENT_SOURCE_DIR
}
/check_dnn_acc.py
${
BIN_DIR
}
COMMAND chmod +x
${
BIN_DIR
}
/check_dnn_acc.py
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/check_dnn_acc.py
)
# Each source file contains a @MODEL_PARAMS_DIR@ waiting to be filled in.
# Each source file contains a @MODEL_PARAMS_DIR@ waiting to be filled in.
set
(
MODEL_PARAMS_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../model_params/"
)
set
(
MODEL_PARAMS_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../model_params/"
)
set
(
test_compile_targets
""
)
set
(
test_compile_targets
""
)
...
@@ -71,6 +47,32 @@ foreach(dir ${entries})
...
@@ -71,6 +47,32 @@ foreach(dir ${entries})
hpvm_add_dnn_test
(
${
dirname
}
_cudnn
)
hpvm_add_dnn_test
(
${
dirname
}
_cudnn
)
endforeach
(
dir
)
endforeach
(
dir
)
# Install an accuracy comparator under build/bin for test suite.
set
(
BIN_DIR
${
LLVM_BINARY_DIR
}
/
${
LLVM_TOOLS_INSTALL_DIR
}
)
message
(
"BIN_DIR =
${
BIN_DIR
}
"
)
add_custom_command
(
OUTPUT
${
BIN_DIR
}
/check_dnn_acc.py
COMMAND cp
${
CMAKE_CURRENT_SOURCE_DIR
}
/check_dnn_acc.py
${
BIN_DIR
}
COMMAND chmod +x
${
BIN_DIR
}
/check_dnn_acc.py
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/check_dnn_acc.py
)
message
(
STATUS
"List of HPVM-C DNN benchmarks:
${
test_compile_targets
}
"
)
message
(
STATUS
"List of HPVM-C DNN benchmarks:
${
test_compile_targets
}
"
)
add_custom_target
(
dnn_benchmarks DEPENDS
${
test_compile_targets
}
${
BIN_DIR
}
/check_dnn_acc.py
)
add_custom_target
(
dnn_benchmarks DEPENDS
${
test_compile_targets
}
${
BIN_DIR
}
/check_dnn_acc.py
)
message
(
STATUS
"Target name for compiling all DNN benchmarks: dnn_benchmarks"
)
message
(
STATUS
"Target name for compiling all DNN benchmarks: dnn_benchmarks"
)
# --[ llvm-lit test setup
# lit.cfg.py looks for tests in CMAKE_CURRENT_BINARY_DIR (see lit.cfg.py)
# as most of the tests require some kind of compilation / generation
# which is best done over there.
configure_lit_site_cfg
(
../../lit.site.cfg.py.in
${
CMAKE_CURRENT_BINARY_DIR
}
/lit.site.cfg.py
MAIN_CONFIG
${
CMAKE_CURRENT_SOURCE_DIR
}
/lit.cfg.py
)
add_lit_testsuite
(
check-hpvm-dnn
"Running HPVM DNNs"
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS dnn_benchmarks
# Compile all dnn benchmarks to run them
ARGS
"-j1"
# Run DNN benchmarks sequentially
)
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