caffe2 icon indicating copy to clipboard operation
caffe2 copied to clipboard

ImportError: No module named avx

Open mraway opened this issue 7 years ago • 10 comments

If this is a build issue, please fill out the template below.

System information

  • Operating system: Linux mint
  • Compiler version:
  • CMake version:
  • CMake arguments:
  • Relevant libraries/versions (e.g. CUDA):

CMake summary output

******** Summary ********
caffe2/build/confu-srcs/peachpy/peachpy/x86_64/function.py", line 16, in <module>
    import peachpy.x86_64.avx
ImportError: No module named avx
confu-deps/CMakeFiles/nnpack.dir/build.make:61: recipe for target 'confu-deps/src/x86_64-fma/2d-fourier-8x8.py.o' failed

mraway avatar Jan 11 '18 06:01 mraway

you can checkout whether your cpu support avx and avx2 instruction set through command "cat /proc/cpuinfo". NNPack requires availability of avx2

breadbread1984 avatar Jan 11 '18 08:01 breadbread1984

Please paste complete build log. It looks like PeachPy's generate instructions step failed to some reason.

Maratyszcza avatar Jan 11 '18 19:01 Maratyszcza

BTW, if you are not planning to use NNPACK, you could disable building it with -DUSE_NNPACK=OFF configuration option

Maratyszcza avatar Jan 11 '18 19:01 Maratyszcza

Was there a fix for this issue?

sidpethe avatar Jan 23 '18 11:01 sidpethe

@sidpethe We don't have enough details to investigate. If you have this problem, please post a complete build log

Maratyszcza avatar Jan 23 '18 19:01 Maratyszcza

Hey there, Here's the output on the command line interface.

/opt/caffe2$ sudo make && cd build && sudo make install -- Does not need to define long separately. -- Current compiler supports avx2 extention. Will build perfkernels. -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.0.0") -- The BLAS backend of choice:Eigen -- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY PTHREADPOOL_LIBRARY CPUINFO_LIBRARY) -- Brace yourself, we are building NNPACK -- Found PythonInterp: /usr/bin/python (found version "2.7.13") CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/six-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/six-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/six-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/six-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/six-download' CMake Error: The source directory "/home/siddharth/caffe2/build/six-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/six-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/enum-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/enum-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/enum-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/enum-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/enum-download' CMake Error: The source directory "/home/siddharth/caffe2/build/enum-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/enum-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/opcodes-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/opcodes-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/opcodes-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/opcodes-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/opcodes-download' CMake Error: The source directory "/home/siddharth/caffe2/build/opcodes-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: Leaving directory '/opt/caffe2/build/opcodes-download' make[1]: *** [cmake_check_build_system] Error 1 CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/peachpy-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/peachpy-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/peachpy-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/peachpy-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/peachpy-download' CMake Error: The source directory "/home/siddharth/caffe2/build/peachpy-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/peachpy-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fp16-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fp16-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fp16-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fp16-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/fp16-download' CMake Error: The source directory "/home/siddharth/caffe2/build/fp16-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: Leaving directory '/opt/caffe2/build/fp16-download' make[1]: *** [cmake_check_build_system] Error 1 CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fxdiv-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fxdiv-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fxdiv-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fxdiv-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/fxdiv-download' CMake Error: The source directory "/home/siddharth/caffe2/build/fxdiv-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/fxdiv-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/psimd-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/psimd-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/psimd-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/psimd-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/psimd-download' CMake Error: The source directory "/home/siddharth/caffe2/build/psimd-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/psimd-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/pthreadpool-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/pthreadpool-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/pthreadpool-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/pthreadpool-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/pthreadpool-download' CMake Error: The source directory "/home/siddharth/caffe2/build/pthreadpool-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/pthreadpool-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googletest-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googletest-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googletest-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fxdiv-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fxdiv-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/fxdiv-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/fxdiv-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/fxdiv-download' CMake Error: The source directory "/home/siddharth/caffe2/build/fxdiv-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/fxdiv-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googletest-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googletest-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googletest-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googlebenchmark-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googlebenchmark-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googlebenchmark-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googletest-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googletest-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googletest-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googlebenchmark-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googlebenchmark-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googlebenchmark-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googletest-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googletest-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googletest-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googletest-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googletest-download' CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The current CMakeCache.txt directory /opt/caffe2/build/googlebenchmark-download/CMakeCache.txt is different than the directory /home/siddharth/caffe2/build/googlebenchmark-download where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt make[1]: Entering directory '/opt/caffe2/build/googlebenchmark-download' CMake Error: The source directory "/home/siddharth/caffe2/build/googlebenchmark-download" does not exist. Specify --help for usage, or press the help button on the CMake GUI. Makefile:146: recipe for target 'cmake_check_build_system' failed make[1]: *** [cmake_check_build_system] Error 1 make[1]: Leaving directory '/opt/caffe2/build/googlebenchmark-download' -- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so) -- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so) -- git Version: v0.0.0 -- Version: 0.0.0 -- Performing Test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- success -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- success -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- success -- Found lmdb (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so) -- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so) -- Found Snappy (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so) -- Could NOT find RocksDB (missing: RocksDB_INCLUDE_DIR RocksDB_LIBRARIES) CMake Warning at cmake/Dependencies.cmake:177 (message): Not compiling with RocksDB. Suppress this warning with -DUSE_ROCKSDB=OFF Call Stack (most recent call first): CMakeLists.txt:81 (include)

-- OpenCV found (/usr/share/OpenCV) CMake Warning at cmake/Dependencies.cmake:241 (find_package): By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eigen3", but CMake did not find one.

Could not find a package configuration file provided by "Eigen3" with any of the following names:

Eigen3Config.cmake
eigen3-config.cmake

Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set "Eigen3_DIR" to a directory containing one of the above files. If "Eigen3" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:81 (include)

-- Did not find system Eigen. Using third party subdirectory. -- Found PythonInterp: /usr/bin/python (found suitable version "2.7.13", minimum required is "2.7") -- NumPy ver. 1.12.1 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include) -- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) -- MPI support found -- MPI compile flags: -- MPI include path: /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include/usr/lib/x86_64-linux-gnu/openmpi/include -- MPI LINK flags path: -- MPI libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so CMake Warning at cmake/Dependencies.cmake:295 (message): OpenMPI found, but it is not built with CUDA support. Call Stack (most recent call first): CMakeLists.txt:81 (include)

CMake Warning at cmake/Dependencies.cmake:360 (message): Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF Call Stack (most recent call first): CMakeLists.txt:81 (include)

CMake Warning at cmake/Dependencies.cmake:368 (message): If not using cuda, one should not use NCCL either. Call Stack (most recent call first): CMakeLists.txt:81 (include)

-- Could NOT find Gloo (missing: Gloo_INCLUDE_DIR Gloo_LIBRARY) -- MPI include path: /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include/usr/lib/x86_64-linux-gnu/openmpi/include -- MPI libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so CMake Warning at cmake/Dependencies.cmake:453 (message): mobile opengl is only used in android or ios builds. Call Stack (most recent call first): CMakeLists.txt:81 (include)

CMake Warning at cmake/Dependencies.cmake:473 (message): Metal is only used in ios builds. Call Stack (most recent call first): CMakeLists.txt:81 (include)

-- GCC 6.3.0: Adding gcc and gcc_s libs to link line -- NCCL operators skipped due to no CUDA support -- CUDA RTC operators skipped due to no CUDA support -- Including image processing operators -- Excluding video processing operators due to no opencv -- Excluding mkl operators as we are not using mkl -- Include Observer library -- Automatically generating missing init.py files.

-- ******** Summary ******** -- General: -- CMake version : 3.7.2 -- CMake command : /usr/bin/cmake -- Git version : v0.8.1-969-g1898ed34 -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 6.3.0 -- Protobuf compiler : /usr/bin/protoc -- Protobuf include path : /usr/include -- Protobuf libraries : /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread -- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing -Wno-invalid-partial-specialization -- Build type : Release -- Compile definitions :

-- BUILD_BINARY : ON -- BUILD_DOCS : OFF -- BUILD_PYTHON : ON -- Python version : 2.7.13 -- Python library : /usr/lib/x86_64-linux-gnu/libpython2.7.so -- BUILD_SHARED_LIBS : ON -- BUILD_TEST : ON -- USE_ATEN : OFF -- USE_ASAN : OFF -- USE_CUDA : OFF -- USE_EIGEN_FOR_BLAS : 1 -- USE_FFMPEG : OFF -- USE_GFLAGS : ON -- USE_GLOG : ON -- USE_GLOO : ON -- USE_LEVELDB : ON -- LevelDB version : 1.18 -- Snappy version : 1.1.4 -- USE_LITE_PROTO : OFF -- USE_LMDB : ON -- LMDB version : 0.9.18 -- USE_METAL : OFF -- USE_MKL : -- USE_MOBILE_OPENGL : OFF -- USE_MPI : ON -- USE_NCCL : OFF -- USE_NERVANA_GPU : OFF -- USE_NNPACK : ON -- USE_OBSERVERS : ON -- USE_OPENCV : ON -- OpenCV version : 2.4.9.1 -- USE_OPENMP : OFF -- USE_PROF : OFF -- USE_REDIS : OFF -- USE_ROCKSDB : OFF -- USE_THREADS : ON -- USE_ZMQ : OFF -- Configuring done -- Generating done -- Build files have been written to: /opt/caffe2/build make[1]: Entering directory '/opt/caffe2/build' make[2]: Entering directory '/opt/caffe2/build' make[3]: Entering directory '/opt/caffe2/build' make[3]: Leaving directory '/opt/caffe2/build' [ 1%] Built target pthreadpool make[3]: Entering directory '/opt/caffe2/build' [ 1%] Generating src/x86_64-fma/2d-fourier-8x8.py.o Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main mod_name, _Error) File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details import(mod_name) # Do not catch exceptions initializing package File "/opt/caffe2/build/confu-srcs/peachpy/peachpy/x86_64/init.py", line 25, in from peachpy.x86_64.function import Function, LocalVariable File "/opt/caffe2/build/confu-srcs/peachpy/peachpy/x86_64/function.py", line 16, in import peachpy.x86_64.avx ImportError: No module named avx confu-deps/CMakeFiles/nnpack.dir/build.make:61: recipe for target 'confu-deps/src/x86_64-fma/2d-fourier-8x8.py.o' failed make[3]: *** [confu-deps/src/x86_64-fma/2d-fourier-8x8.py.o] Error 1 make[3]: Leaving directory '/opt/caffe2/build' CMakeFiles/Makefile2:127: recipe for target 'confu-deps/CMakeFiles/nnpack.dir/all' failed make[2]: *** [confu-deps/CMakeFiles/nnpack.dir/all] Error 2 make[2]: Leaving directory '/opt/caffe2/build' Makefile:127: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/opt/caffe2/build' Makefile:4: recipe for target 'all' failed make: *** [all] Error 2

sidpethe avatar Jan 24 '18 04:01 sidpethe

Did you move caffe2 directory after configuration? This will almost certainly break the build.

Maratyszcza avatar Jan 24 '18 04:01 Maratyszcza

If you're trying to install caffe2 into /opt/caffe2, do the following:

git clone https://github.com/caffe2/caffe2.git ~/caffe2-clean
cd ~/caffe2-clean
scripts/build_local.sh -DCMAKE_INSTALL_PREFIX=/opt/caffe2
cd build
sudo -H make install

Maratyszcza avatar Jan 24 '18 04:01 Maratyszcza

I did move the directory. But I was getting the same error before doing so as well. I'll try the steps you mentioned above and post the build log.

Thanks for the prompt reply.

sidpethe avatar Jan 24 '18 04:01 sidpethe

Hey,

So I used sudo make clean in /opt/caffe2/ and it has now built successfully.

There was a problem in the anaconda environment which I was trying to use before. Thanks for your help. The build doesn't have GPU support for some reason and the tests give me this warning.

/opt/caffe2/build$ sudo python -m caffe2.python.operator_test.relu_op_test
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu
E0125 11:11:30.811765 23416 init_intrinsics_check.cc:54] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0125 11:11:30.811789 23416 init_intrinsics_check.cc:54] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0125 11:11:30.811801 23416 init_intrinsics_check.cc:54] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([ 0.], dtype=float32), gc=, dc=[], engine=u'')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([[ 0.17897987,  0.84875673,  0.24049324,  0.17897987,  0.17897987],
       [ 0.17897987,  0.17897987,  0.17897987,  0.17897987,  0.17897987],
       [ 0.17897987,  0.17897987,  0.56052977,  0.17897987,  0.17897987]], dtype=float32), gc=, dc=[], engine=u'CUDNN')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([[[[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.97566986, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.0056721 , -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]]],


       [[[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647,  0.29574829, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.25046286, -0.54940647, -0.54940647]]],


       [[[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.08754086],
         [-0.54940647, -0.54940647, -0.54940647]],

        [[-0.54940647, -0.54940647, -0.54940647],
         [-0.54940647, -0.54940647, -0.54940647]]]], dtype=float32), gc=, dc=[], engine=u'CUDNN')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([[ 0.54179448,  0.86911315, -0.18575333, -0.83451599]], dtype=float32), gc=, dc=[], engine=u'CUDNN')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([ 0.56756508,  0.05445644,  0.56756508,  0.56756508,  0.56756508], dtype=float32), gc=, dc=[], engine=u'')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([-0.37512606], dtype=float32), gc=, dc=[], engine=u'')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([[[[-0.53043658],
         [-0.38390794],
         [ 0.2840555 ],
         [-0.94792432]],

        [[-0.38390794],
         [-0.60606468],
         [ 0.72265363],
         [-0.38390794]],

        [[-0.38390794],
         [-0.38390794],
         [ 0.94160867],
         [ 0.65589368]],

        [[-0.38390794],
         [-0.38390794],
         [-0.38390794],
         [-0.38390794]],

        [[-0.38390794],
         [-0.38390794],
         [-0.38390794],
         [-0.38390794]]]], dtype=float32), gc=, dc=[], engine=u'')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([-0.23278527, -0.23278527, -0.23278527], dtype=float32), gc=, dc=[], engine=u'')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([ 0.46621171], dtype=float32), gc=, dc=[], engine=u'CUDNN')
Trying example: test_relu(self=<__main__.TestRelu testMethod=test_relu>, X=array([-0.81965411], dtype=float32), gc=, dc=[], engine=u'')
.
----------------------------------------------------------------------
Ran 1 test in 0.093s

OK

sidpethe avatar Jan 25 '18 00:01 sidpethe