Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
darknet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
KWIVER
darknet
Commits
32c24fa8
Commit
32c24fa8
authored
7 years ago
by
Jacob Becker
Browse files
Options
Downloads
Patches
Plain Diff
fix cmake for cudnn support
parent
4f35852e
Branches
fix-cudnn
No related tags found
1 merge request
!3
fix cmake for cudnn support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CMakeLists.txt
+17
-13
17 additions, 13 deletions
src/CMakeLists.txt
with
17 additions
and
13 deletions
src/CMakeLists.txt
+
17
−
13
View file @
32c24fa8
...
...
@@ -130,12 +130,28 @@ set( headers
set
(
libs m
)
set
(
CUDNN_FLAGS
)
if
(
USE_CUDNN
)
find_library
(
CUDNN_LIBRARIES
NAMES cudnn libcudnn.so libcudnn.so.5
PATHS
${
CUDA_TOOLKIT_ROOT_DIR
}
/targets/aarch64-linux
${
CUDA_TOOLKIT_ROOT_DIR
}
PATH_SUFFIXES lib lib64
)
set
(
CUDNN_FLAGS -DCUDNN
)
list
(
APPEND libs
${
CUDNN_LIBRARIES
}
)
add_definitions
(
-DCUDNN
)
endif
()
if
(
USE_GPU
)
find_package
(
CUDA QUIET REQUIRED
)
include_directories
(
${
CUDA_TOOLKIT_ROOT_DIR
}
/include
)
add_definitions
(
-DGPU
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
${
CUDNN_FLAGS
}
-gencode arch=compute_20,code=[sm_20,sm_21]
-gencode arch=compute_30,code=sm_30
-gencode arch=compute_35,code=sm_35
...
...
@@ -151,18 +167,6 @@ if (USE_GPU)
)
endif
()
if
(
USE_CUDNN
)
find_library
(
CUDNN_LIBRARIES
NAMES cudnn libcudnn.so libcudnn.so.5
PATHS
${
CUDA_TOOLKIT_ROOT_DIR
}
/targets/aarch64-linux
${
CUDA_TOOLKIT_ROOT_DIR
}
PATH_SUFFIXES lib lib64
)
list
(
APPEND libs
${
CUDNN_LIBRARIES
}
)
add_definitions
(
-DCUDNN
)
endif
()
if
(
USE_OPENCV
)
find_package
(
OpenCV 2.4.6 REQUIRED
)
...
...
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