zdevito / ATen

ATen: A TENsor library for C++11
683 stars 125 forks source link

build error in cpuinfo #203

Open mobooya opened 6 years ago

mobooya commented 6 years ago

CMake Error at src/ATen/CMakeLists.txt:301 (ADD_SUBDIRECTORY): The source directory

/home/luminar/ATen/src/ATen/cpu/cpuinfo

does not contain a CMakeLists.txt file.

The cpuinfo submodule folder is present but there is no .gitmodules and there is no CMakeLists.txt file. I havent been able to fix this.

samhodge commented 6 years ago

I am having the same problem on OSX

CMake Error at src/ATen/CMakeLists.txt:301 (ADD_SUBDIRECTORY): The source directory

/Users/sam/dev/ATen/src/ATen/cpu/cpuinfo

does not contain a CMakeLists.txt file.

Any hints would be awesome, it installed great on Ubuntu 16 last night.

soumith commented 6 years ago

you probably should do: git submodule update --init --recursive

mobooya commented 6 years ago

@soumith there is no .gitmodules so git submodule will not work.

ShigekiKarita commented 6 years ago

.gitmodule was removed at https://github.com/zdevito/ATen/commit/6f52eadc3297daf0450b5fb7f351fb4578420941

happypepper commented 6 years ago

I finally got this working, here's what I did:

from the root directory: mkdir third_party && cd third_party git submodule add https://github.com/catchorg/Catch2 catch git submodule add https://github.com/01org/tbb git submodule add https://github.com/shibatch/sleef git submodule add https://github.com/pytorch/cpuinfo cd ../aten && mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DNO_CUDA=true make install

pharrellyhy commented 6 years ago

Hi, I still got error when compiled with CUDA. Here is the error message.

-- Does not need to define long separately. -- std::exception_ptr is supported. -- NUMA is not available -- Turning off deprecation warning due to glog. -- Current compiler supports avx2 extention. Will build perfkernels. -- The BLAS backend of choice:MKL -- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl] -- Library mkl_gf_lp64: /home/pharrell/anaconda3/envs/pytorch-0.4.0/lib/libmkl_gf_lp64.so -- Library mkl_gnu_thread: /home/pharrell/anaconda3/envs/pytorch-0.4.0/lib/libmkl_gnu_thread.so -- Library mkl_core: /home/pharrell/anaconda3/envs/pytorch-0.4.0/lib/libmkl_core.so -- Library gomp: -fopenmp -- Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so -- Library m: /usr/lib/x86_64-linux-gnu/libm.so -- Library dl: /usr/lib/x86_64-linux-gnu/libdl.so -- Found system Eigen at /usr/include/eigen3 -- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) -- Found CUDA: /usr/local/cuda (found suitable version "9.0", minimum required is "7.0") -- Caffe2: CUDA detected: 9.0 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 9.0 -- Found cuDNN: v7.0.5 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Autodetected CUDA architecture(s): 6.1 -- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61 CMake Error at /home/pharrell/codebase/github/ATen/cmake/public/utils.cmake:5 (set): set given invalid arguments for CACHE mode. Call Stack (most recent call first): /home/pharrell/codebase/github/ATen/cmake/Dependencies.cmake:410 (caffe2_update_option) CMakeLists.txt:78 (include)

CMake Error at /home/pharrell/codebase/github/ATen/cmake/public/utils.cmake:5 (set): set given invalid arguments for CACHE mode. Call Stack (most recent call first): /home/pharrell/codebase/github/ATen/cmake/Dependencies.cmake:427 (caffe2_update_option) CMakeLists.txt:78 (include)

-- Could NOT find CUB (missing: CUB_INCLUDE_DIR) -- Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor -- Removing -DNDEBUG from compile flags -- Compiling with OpenMP support -- MAGMA not found. Compiling without MAGMA support -- Could not find hardware support for NEON on this machine. -- No OMAP3 processor on this machine. -- No OMAP4 processor on this machine. -- SSE2 Found -- SSE3 Found -- AVX Found -- AVX2 Found -- Atomics: using GCC intrinsics -- Found a library with BLAS API (mkl). -- Found a library with LAPACK API. (mkl) -- Found CUDA: /usr/local/cuda (found suitable version "9.0", minimum required is "5.5") -- Could NOT find MKLDNN (missing: MKLDNN_INCLUDE_DIR MKLDNN_LIBRARY) -- MKLDNN not found. Compiling without MKLDNN support -- Configuring build for SLEEF-v3.2 Target system: Linux-4.13.0-45-generic Target processor: x86_64 Host system: Linux-4.13.0-45-generic Host processor: x86_64 Detected C compiler: GNU @ /usr/bin/cc -- Using option -Wall -Wno-unused -Wno-attributes -Wno-unused-result -Wno-psabi -ffp-contract=off -fno-math-errno -fno-trapping-math to compile libsleef -- Building shared libs : OFF -- MPFR : /home/pharrell/anaconda3/lib/libmpfr.so -- MPFR header file in /home/pharrell/anaconda3/include -- GMP : /home/pharrell/anaconda3/lib/libgmp.so -- RUNNING_ON_TRAVIS : 0 -- COMPILER_SUPPORTS_OPENMP : 1 -- Configuring incomplete, errors occurred!

samhodge commented 6 years ago

Are you just missing pybind11?

mjjdick commented 6 years ago

@pharrellyhy Hi, I met the same error like yours, did you solve the problem?