Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
caa7ec72
Commit
caa7ec72
authored
Nov 09, 2017
by
Tristan Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for cuDNN version using cmake identifier and cudnn shared lib
parent
62ca7797
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
CMakeLists.txt
test/CMakeLists.txt
+11
-0
cudnn.cpp
test/cudnn.cpp
+10
-0
No files found.
test/CMakeLists.txt
View file @
caa7ec72
...
...
@@ -64,6 +64,13 @@ if(NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR)
set
(
BACKEND_NAMES
${
BACKEND_NAMES
}
"CPU"
)
endif
()
if
(
USE_CUDA
)
find_package
(
CUDA QUIET
)
include_directories
(
SYSTEM
${
CUDA_INCLUDE_DIRS
}
${
CUDNN_INCLUDE_DIR
}
)
set
(
SRC main.cpp cudnn.cpp
)
# set(BACKEND_NAMES ${BACKEND_NAMES} "GPU")
endif
()
foreach
(
BACKEND_NAME
${
BACKEND_NAMES
}
)
configure_file
(
backend_test.in.cpp backend_test_
${
BACKEND_NAME
}
.cpp
)
set
(
SRC
${
SRC
}
${
CMAKE_CURRENT_BINARY_DIR
}
/backend_test_
${
BACKEND_NAME
}
.cpp
)
...
...
@@ -85,6 +92,10 @@ if(LLVM_INCLUDE_DIR)
add_dependencies
(
unit-test ext_llvm
)
endif
()
if
(
CUDNN_INCLUDE_DIR
)
target_link_libraries
(
unit-test cudnn
)
endif
()
target_link_libraries
(
unit-test ngraph libgtest pthread
)
target_link_libraries
(
unit-test
${
CMAKE_DL_LIBS
}
)
...
...
test/cudnn.cpp
0 → 100644
View file @
caa7ec72
#include <gtest/gtest.h>
#include <cuda.h>
#include <cudnn.h>
TEST
(
cudnn
,
simple
)
{
auto
cudnn_version
=
cudnnGetVersion
();
EXPECT_FLOAT_EQ
(
cudnn_version
,
CUDNN_VERSION
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment