{"action":"created","issue":{"url":"https://api.github.com/repos/davisking/dlib/issues/1676","repository_url":"https://api.github.com/repos/davisking/dlib","labels_url":"https://api.github.com/repos/davisking/dlib/issues/1676/labels{/name}","comments_url":"https://api.github.com/repos/davisking/dlib/issues/1676/comments","events_url":"https://api.github.com/repos/davisking/dlib/issues/1676/events","html_url":"https://github.com/davisking/dlib/issues/1676","id":416321581,"node_id":"MDU6SXNzdWU0MTYzMjE1ODE=","number":1676,"title":"Fail to compile dlib with cuda 10.1","user":{"login":"daisyron","id":2479814,"node_id":"MDQ6VXNlcjI0Nzk4MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2479814?v=4","gravatar_id":"","url":"https://api.github.com/users/daisyron","html_url":"https://github.com/daisyron","followers_url":"https://api.github.com/users/daisyron/followers","following_url":"https://api.github.com/users/daisyron/following{/other_user}","gists_url":"https://api.github.com/users/daisyron/gists{/gist_id}","starred_url":"https://api.github.com/users/daisyron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daisyron/subscriptions","organizations_url":"https://api.github.com/users/daisyron/orgs","repos_url":"https://api.github.com/users/daisyron/repos","events_url":"https://api.github.com/users/daisyron/events{/privacy}","received_events_url":"https://api.github.com/users/daisyron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2019-03-01T23:37:53Z","updated_at":"2019-03-03T14:49:48Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nTried to compile dlib 19.16 with cuda 10.1, and got the following error during running cmake:\r\n\r\n-- Found CUDA: /usr/local/cuda (found suitable version \"10.1\", minimum required is \"7.5\") \r\n-- Looking for cuDNN install...\r\n-- Found cuDNN: /usr/local/cuda/lib64/libcudnn.so\r\n-- Building a CUDA test project to see if your compiler is compatible with CUDA...\r\n-- *****************************************************************************************************************\r\n-- *** CUDA was found but your compiler failed to compile a simple CUDA program so dlib isn't going to use CUDA. \r\n-- *** The output of the failed CUDA test compile is shown below: \r\n-- ***   Change Dir: /home/ron/DeepLearning/dlib-19.16/build/dlib/cuda_test_build\r\n   ***   \r\n   ***   Run Build Command:\"/usr/bin/gmake\"\r\n   ***   [ 50%] Building NVCC (Device) object CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h: In instantiation of ‘dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper::~literal_assign_helper() [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’:\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/../optimization/optimization_line_search.h:209:11:   required from here\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1774:36: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(!has_been_used || r == m->nr(),\r\n   ***                                  ~~~~~^~~~~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h: In instantiation of ‘const dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper& dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper::operator,(const T&) const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’:\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/../optimization/optimization_line_search.h:209:23:   required from here\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:14: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                 ^  ~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:30: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nc() const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                            ~~~~~^~~~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:893: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^          \r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:929: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nc() const [with T = double; long int num_rows = 2; long int num_cols = 2; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^          \r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h: In instantiation of ‘dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper::~literal_assign_helper() [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’:\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/../optimization/optimization_line_search.h:211:32:   required from here\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1774:36: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(!has_been_used || r == m->nr(),\r\n   ***                                  ~~~~~^~~~~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h: In instantiation of ‘const dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper& dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::literal_assign_helper::operator,(const T&) const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’:\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/../optimization/optimization_line_search.h:211:61:   required from here\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:14: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                 ^  ~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:30: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nc() const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                            ~~~~~^~~~~~~\r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:893: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nr() const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^          \r\n   ***   /home/ron/DeepLearning/dlib-19.16/dlib/cmake_utils/test_for_cuda/../../cuda/../matrix/matrix.h:1783:929: error: cannot call member function ‘long int dlib::matrix<T, num_rows, num_cols, mem_manager, layout>::nc() const [with T = double; long int num_rows = 2; long int num_cols = 1; mem_manager = dlib::memory_manager_stateless_kernel_1<char>; layout = dlib::row_major_layout]’ without object\r\n   ***                    DLIB_CASSERT(r < m->nr() && c < m->nc(),\r\n   ***                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^          \r\n   ***   CMake Error at cuda_test_generated_cuda_test.cu.o.cmake:275 (message):\r\n   ***     Error generating file\r\n   ***     /home/ron/DeepLearning/dlib-19.16/build/dlib/cuda_test_build/CMakeFiles/cuda_test.dir//./cuda_test_generated_cuda_test.cu.o\r\n   ***   \r\n   ***   \r\n   ***   gmake[2]: *** [CMakeFiles/cuda_test.dir/build.make:65: CMakeFiles/cuda_test.dir/cuda_test_generated_cuda_test.cu.o] Error 1\r\n   ***   gmake[1]: *** [CMakeFiles/Makefile2:72: CMakeFiles/cuda_test.dir/all] Error 2\r\n   ***   gmake: *** [Makefile:84: all] Error 2\r\n   ***   \r\n-- *****************************************************************************************************************\r\n\r\nAny comment?\r\n\r\nThanks.\r\nRon."},"comment":{"url":"https://api.github.com/repos/davisking/dlib/issues/comments/469030348","html_url":"https://github.com/davisking/dlib/issues/1676#issuecomment-469030348","issue_url":"https://api.github.com/repos/davisking/dlib/issues/1676","id":469030348,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2OTAzMDM0OA==","user":{"login":"pavelpe","id":33594067,"node_id":"MDQ6VXNlcjMzNTk0MDY3","avatar_url":"https://avatars1.githubusercontent.com/u/33594067?v=4","gravatar_id":"","url":"https://api.github.com/users/pavelpe","html_url":"https://github.com/pavelpe","followers_url":"https://api.github.com/users/pavelpe/followers","following_url":"https://api.github.com/users/pavelpe/following{/other_user}","gists_url":"https://api.github.com/users/pavelpe/gists{/gist_id}","starred_url":"https://api.github.com/users/pavelpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavelpe/subscriptions","organizations_url":"https://api.github.com/users/pavelpe/orgs","repos_url":"https://api.github.com/users/pavelpe/repos","events_url":"https://api.github.com/users/pavelpe/events{/privacy}","received_events_url":"https://api.github.com/users/pavelpe/received_events","type":"User","site_admin":false},"created_at":"2019-03-03T14:49:48Z","updated_at":"2019-03-03T14:49:48Z","author_association":"NONE","body":"> I just tried cuda 10.1 and the only issue I found was on some versions of cmake it doesn't find cusolver. I just pushed a fix for that, but I didn't see any other issues. There is probably just something wrong with your cuda install unrelated to dlib.\r\n> \r\n\r\nThis solved my recent dlib setup problem  (since last Thursday). \r\nJust to for the record my platform:\r\n\r\nDistributor ID:\tUbuntu\r\nDescription:\tUbuntu 16.04.4 LTS\r\nRelease:\t16.04\r\nCode name: xenial\r\nCMake version: 3.5.1\r\ndlib version: 19.16.99\r\ncuda version: cuda-10.1\r\ng++ (Ubuntu 5.4.0-6ubuntu1~16.04) 5.4.0"}}
{"actor":{"display_login":"pavelpe"}}