Commit 592361ed authored by Davis King's avatar Davis King

Moved the CUDA stuff into its own folder.

parent 49a5d39d
...@@ -254,8 +254,8 @@ if (NOT TARGET dlib) ...@@ -254,8 +254,8 @@ if (NOT TARGET dlib)
threads/async.cpp threads/async.cpp
timer/timer.cpp timer/timer.cpp
stack_trace.cpp stack_trace.cpp
dnn/cpu_dlib.cpp cuda/cpu_dlib.cpp
dnn/tensor_tools.cpp cuda/tensor_tools.cpp
) )
if(UNIX) if(UNIX)
...@@ -657,13 +657,13 @@ if (NOT TARGET dlib) ...@@ -657,13 +657,13 @@ if (NOT TARGET dlib)
if (CUDA_FOUND AND cudnn AND (NOT USING_OLD_VISUAL_STUDIO_COMPILER) AND cuda_test_compile_worked AND cudnn_test_compile_worked AND cudnn_include) if (CUDA_FOUND AND cudnn AND (NOT USING_OLD_VISUAL_STUDIO_COMPILER) AND cuda_test_compile_worked AND cudnn_test_compile_worked AND cudnn_include)
set(source_files ${source_files} set(source_files ${source_files}
dnn/cuda_dlib.cu cuda/cuda_dlib.cu
dnn/cudnn_dlibapi.cpp cuda/cudnn_dlibapi.cpp
dnn/cublas_dlibapi.cpp cuda/cublas_dlibapi.cpp
dnn/cusolver_dlibapi.cu cuda/cusolver_dlibapi.cu
dnn/curand_dlibapi.cpp cuda/curand_dlibapi.cpp
dnn/cuda_data_ptr.cpp cuda/cuda_data_ptr.cpp
dnn/gpu_data.cpp cuda/gpu_data.cpp
) )
set(dlib_needed_libraries ${dlib_needed_libraries} set(dlib_needed_libraries ${dlib_needed_libraries}
${CUDA_CUBLAS_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES}
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
#include "../gui_core/gui_core_kernel_2.cpp" #include "../gui_core/gui_core_kernel_2.cpp"
#endif // DLIB_NO_GUI_SUPPORT #endif // DLIB_NO_GUI_SUPPORT
#include "../dnn/cpu_dlib.cpp" #include "../cuda/cpu_dlib.cpp"
#include "../dnn/tensor_tools.cpp" #include "../cuda/tensor_tools.cpp"
#endif // DLIB_ISO_CPP_ONLY #endif // DLIB_ISO_CPP_ONLY
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 2.8.12)
project(cuda_test) project(cuda_test)
include_directories(../../dnn) include_directories(../../cuda)
add_definitions(-DDLIB_USE_CUDA) add_definitions(-DDLIB_USE_CUDA)
# Override the FindCUDA.cmake setting to avoid duplication of host flags if using a toolchain: # Override the FindCUDA.cmake setting to avoid duplication of host flags if using a toolchain:
......
...@@ -14,6 +14,6 @@ include(find_cudnn.txt) ...@@ -14,6 +14,6 @@ include(find_cudnn.txt)
if (cudnn_include AND cudnn) if (cudnn_include AND cudnn)
include_directories(${cudnn_include}) include_directories(${cudnn_include})
cuda_add_library(cudnn_test STATIC ../../dnn/cudnn_dlibapi.cpp ${cudnn} ) cuda_add_library(cudnn_test STATIC ../../cuda/cudnn_dlibapi.cpp ${cudnn} )
enable_cpp11_for_target(cudnn_test) enable_cpp11_for_target(cudnn_test)
endif() endif()
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# pragma warning( disable: 4503 ) # pragma warning( disable: 4503 )
#endif #endif
#include "dnn/tensor.h" #include "cuda/tensor.h"
#include "dnn/input.h" #include "dnn/input.h"
// Problem: Visual Studio's vcpkgsrv.exe constantly uses a single CPU core, // Problem: Visual Studio's vcpkgsrv.exe constantly uses a single CPU core,
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include "dnn/core.h" #include "dnn/core.h"
#include "dnn/solvers.h" #include "dnn/solvers.h"
#include "dnn/trainer.h" #include "dnn/trainer.h"
#include "dnn/cpu_dlib.h" #include "cuda/cpu_dlib.h"
#include "dnn/tensor_tools.h" #include "cuda/tensor_tools.h"
#include "dnn/utilities.h" #include "dnn/utilities.h"
#include "dnn/validation.h" #include "dnn/validation.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#define DLIB_DNn_CORE_H_ #define DLIB_DNn_CORE_H_
#include "core_abstract.h" #include "core_abstract.h"
#include "tensor.h" #include "../cuda/tensor.h"
#include <iterator> #include <iterator>
#include <memory> #include <memory>
#include <sstream> #include <sstream>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <tuple> #include <tuple>
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include "tensor_tools.h" #include "../cuda/tensor_tools.h"
#include <type_traits> #include <type_traits>
#include "../metaprogramming.h" #include "../metaprogramming.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#undef DLIB_DNn_CORE_ABSTRACT_H_ #undef DLIB_DNn_CORE_ABSTRACT_H_
#ifdef DLIB_DNn_CORE_ABSTRACT_H_ #ifdef DLIB_DNn_CORE_ABSTRACT_H_
#include "tensor_abstract.h" #include "../cuda/tensor_abstract.h"
#include <memory> #include <memory>
#include <type_traits> #include <type_traits>
#include <tuple> #include <tuple>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "../image_processing.h" #include "../image_processing.h"
#include <sstream> #include <sstream>
#include <array> #include <array>
#include "tensor_tools.h" #include "../cuda/tensor_tools.h"
namespace dlib namespace dlib
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
#define DLIB_DNn_LAYERS_H_ #define DLIB_DNn_LAYERS_H_
#include "layers_abstract.h" #include "layers_abstract.h"
#include "tensor.h" #include "../cuda/tensor.h"
#include "core.h" #include "core.h"
#include <iostream> #include <iostream>
#include <string> #include <string>
#include "../rand.h" #include "../rand.h"
#include "../string.h" #include "../string.h"
#include "tensor_tools.h" #include "../cuda/tensor_tools.h"
#include "../vectorstream.h" #include "../vectorstream.h"
#include "utilities.h" #include "utilities.h"
#include <sstream> #include <sstream>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#undef DLIB_DNn_LAYERS_ABSTRACT_H_ #undef DLIB_DNn_LAYERS_ABSTRACT_H_
#ifdef DLIB_DNn_LAYERS_ABSTRACT_H_ #ifdef DLIB_DNn_LAYERS_ABSTRACT_H_
#include "tensor_abstract.h" #include "../cuda/tensor_abstract.h"
#include "core_abstract.h" #include "core_abstract.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "loss_abstract.h" #include "loss_abstract.h"
#include "core.h" #include "core.h"
#include "../matrix.h" #include "../matrix.h"
#include "tensor_tools.h" #include "../cuda/tensor_tools.h"
#include "../geometry.h" #include "../geometry.h"
#include "../image_processing/box_overlap_testing.h" #include "../image_processing/box_overlap_testing.h"
#include "../image_processing/full_object_detection.h" #include "../image_processing/full_object_detection.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#define DLIB_DNn_SOLVERS_H_ #define DLIB_DNn_SOLVERS_H_
#include "solvers_abstract.h" #include "solvers_abstract.h"
#include "tensor.h" #include "../cuda/tensor.h"
#include <iostream> #include <iostream>
#include "layers.h" #include "layers.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#undef DLIB_DNn_SOLVERS_ABSTRACT_H_ #undef DLIB_DNn_SOLVERS_ABSTRACT_H_
#ifdef DLIB_DNn_SOLVERS_ABSTRACT_H_ #ifdef DLIB_DNn_SOLVERS_ABSTRACT_H_
#include "tensor_abstract.h" #include "../cuda/tensor_abstract.h"
#include <iostream> #include <iostream>
namespace dlib namespace dlib
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "../pipe.h" #include "../pipe.h"
#include "../threads.h" #include "../threads.h"
#include "cuda_dlib.h" #include "../cuda/cuda_dlib.h"
#include "../statistics/running_gradient.h" #include "../statistics/running_gradient.h"
#include <atomic> #include <atomic>
#include <cstdio> #include <cstdio>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <cstdlib> #include <cstdlib>
#include <ctime> #include <ctime>
#include <vector> #include <vector>
#include "../dnn/tensor_tools.h" #include "../cuda/tensor_tools.h"
#include "tester.h" #include "tester.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment