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
59c6c3f2
Commit
59c6c3f2
authored
4 years ago
by
Yifan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
Compile soc_simulator and gpu_profiler automatically
parent
9b7795f9
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
hpvm/projects/hpvm-tensor-rt/CMakeLists.txt
+13
-11
13 additions, 11 deletions
hpvm/projects/hpvm-tensor-rt/CMakeLists.txt
with
13 additions
and
11 deletions
hpvm/projects/hpvm-tensor-rt/CMakeLists.txt
+
13
−
11
View file @
59c6c3f2
cmake_minimum_required
(
VERSION 3.17
)
cmake_minimum_required
(
VERSION 3.17
)
project
(
hpvm-tensor-rt
)
project
(
hpvm-tensor-rt
)
find_package
(
CUDA 6.5 REQUIRED
)
find_package
(
CUDA 6.5 REQUIRED
)
set
(
CUDA_SEPARABLE_COMPILATION ON CACHE BOOL
""
)
set
(
CUDA_SEPARABLE_COMPILATION ON CACHE BOOL
""
)
set
(
CUDA_PROPAGATE_HOST_FLAGS OFF
)
set
(
CUDA_PROPAGATE_HOST_FLAGS OFF
)
...
@@ -71,16 +71,18 @@ foreach(FILE ${RUNTIME_SRCS_FILENAME})
...
@@ -71,16 +71,18 @@ foreach(FILE ${RUNTIME_SRCS_FILENAME})
list
(
APPEND RUNTIME_SRCS
"tensor_runtime/src/
${
FILE
}
"
)
list
(
APPEND RUNTIME_SRCS
"tensor_runtime/src/
${
FILE
}
"
)
endforeach
()
endforeach
()
# Default link libraries
# Compile gpu_profiler and soc_simulator
find_library
(
GPU_PROFILER_LIB
# Conditionally add gpu_profiler project if we're building independently
NAMES libgpu_profiler.a
# (not building the whole hpvm)
HINTS ../gpu_profiler/lib
get_filename_component
(
root_dir
${
CMAKE_SOURCE_DIR
}
REALPATH
)
)
get_filename_component
(
our_dir
${
CMAKE_CURRENT_SOURCE_DIR
}
REALPATH
)
find_library
(
SOC_SIMULATOR_LIB
if
(
${
root_dir
}
STREQUAL
${
our_dir
}
)
NAMES libpromise_profiler.a
message
(
"Compiling hpvm-tensor-rt independently"
)
HINTS ../soc_simulator/lib
message
(
"Also compiling gpu_profiler and soc_simulator"
)
)
add_subdirectory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../gpu_profiler
${
CMAKE_CURRENT_BINARY_DIR
}
/gpu_profiler
)
set
(
LINK_LIBS cudnn cufft stdc++fs curand
)
add_subdirectory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../soc_simulator
${
CMAKE_CURRENT_BINARY_DIR
}
/soc_simulator
)
endif
()
set
(
LINK_LIBS gpu_profiler promise_profiler cudnn cufft stdc++fs curand
)
if
(
USE_GFLAGS
)
if
(
USE_GFLAGS
)
list
(
APPEND LINK_LIBS gflags
)
list
(
APPEND LINK_LIBS gflags
)
endif
()
endif
()
...
...
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