Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jacob-becker/darknet
  • james.hoctor/darknet
  • kwiver/darknet
  • Cookt2/darknet
4 results
Show changes
Commits on Source (3)
......@@ -61,6 +61,8 @@ if( USE_GPU )
endif()
if( USE_CUDNN )
# Set this if cuda and cudnn are in seperate locations
set( CUDNN_ROOT_DIR "" CACHE PATH "CUDNN root folder" )
if(NOT USE_GPU)
message(FATAL_ERROR "Enable GPU support when wanting to use CUDNN")
......@@ -68,21 +70,19 @@ if( USE_CUDNN )
find_library( CUDNN_LIBRARIES
NAMES cudnn libcudnn
HINTS ${CUDA_TOOLKIT_ROOT_DIR}
${CUDNN_TOOLKIT_ROOT_DIR}
HINTS ${CUDNN_ROOT_DIR}
${CUDA_TOOLKIT_ROOT_DIR}
PATH_SUFFIXES lib lib64 lib/x64 lib/x86 targets/aarch64-linux
)
if(NOT CUDNN_LIBRARIES)
# Set this if cuda and cudnn are in seperate locations
set( CUDNN_TOOLKIT_ROOT_DIR "" CACHE PATH "CUDNN root folder" )
message(FATAL_ERROR "Unable to find cudnn libraries, please ensure \
CUDA_TOOLKIT_ROOT_DIR has cudnn or the CUDNN_TOOLKIT_ROOT_DIR variable is \
CUDA_TOOLKIT_ROOT_DIR has cudnn or the CUDNN_ROOT_DIR variable is \
properly set or set CUDNN_LIBRARIES" )
endif()
if(CUDNN_TOOLKIT_ROOT_DIR)
include_directories( SYSTEM ${CUDNN_TOOLKIT_ROOT_DIR}/include )
if(CUDNN_ROOT_DIR)
include_directories( SYSTEM ${CUDNN_ROOT_DIR}/include )
endif()
list( APPEND DARKNET_LINKED_LIBS ${CUDNN_LIBRARIES} )
......
......@@ -171,7 +171,11 @@ char *basecfg(char *cfgfile)
{
char *c = cfgfile;
char *next;
#ifdef WIN32
while((next = strchr(c, '\\')))
#else
while((next = strchr(c, '/')))
#endif
{
c = next+1;
}
......@@ -617,7 +621,7 @@ int rand_int()
#ifdef MSVC
unsigned int rand_int = 0;
rand_s( &rand_int );
return rand_int;
return abs( rand_int );
#else
return rand();
#endif
......