mirror of https://github.com/davisking/dlib.git
Make sure CUDA_VERSION is defined (#1663)
This commit is contained in:
parent
23f874d6e3
commit
04a2387cfc
|
@ -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
|
||||||
|
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue