Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
04a2387c
Commit
04a2387c
authored
Feb 20, 2019
by
Juha Reunanen
Committed by
Davis E. King
Feb 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure CUDA_VERSION is defined (#1663)
parent
23f874d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
gpu_data.cpp
dlib/cuda/gpu_data.cpp
+4
-2
No files found.
dlib/cuda/gpu_data.cpp
View file @
04a2387c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include <iostream>
#include <iostream>
#include "cuda_utils.h"
#include "cuda_utils.h"
#include <cstring>
#include <cstring>
#include <cuda.h>
namespace
dlib
namespace
dlib
{
{
...
@@ -81,7 +81,9 @@ namespace dlib
...
@@ -81,7 +81,9 @@ namespace dlib
void
synchronize_stream
(
cudaStream_t
stream
)
void
synchronize_stream
(
cudaStream_t
stream
)
{
{
#if CUDA_VERSION >= 9020 && CUDA_VERSION <= 10000
#if !defined CUDA_VERSION
#error CUDA_VERSION not defined
#elif CUDA_VERSION >= 9020 && CUDA_VERSION <= 10000
// This should be pretty much the same as cudaStreamSynchronize, which for some
// This should be pretty much the same as cudaStreamSynchronize, which for some
// reason makes training freeze in some cases.
// reason makes training freeze in some cases.
// (see https://github.com/davisking/dlib/issues/1513)
// (see https://github.com/davisking/dlib/issues/1513)
...
...
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