summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Wasti <bwasti@fb.com>2017-01-03 15:19:58 -0800
committerGitHub <noreply@github.com>2017-01-03 15:19:58 -0800
commit4ab03516475f827a0419bae188aac48e1522681c (patch)
treeeb010ce809cb50a30efa66bf128e7b002b87b6c4
parent737f507786ae82421948140e7464fd91ebbdfbfb (diff)
parent0ce23319c25efe6bb7a736589dc2a451799fb70e (diff)
downloadpytorch-4ab03516475f827a0419bae188aac48e1522681c.tar.gz
pytorch-4ab03516475f827a0419bae188aac48e1522681c.tar.bz2
pytorch-4ab03516475f827a0419bae188aac48e1522681c.zip
Merge pull request #6 from caffe2/cmake
Cmake
-rw-r--r--README.md30
-rw-r--r--cmake/Dependencies.cmake12
2 files changed, 39 insertions, 3 deletions
diff --git a/README.md b/README.md
index 29cea7848c..f2086901bd 100644
--- a/README.md
+++ b/README.md
@@ -46,3 +46,33 @@ To run the tutorials you'll need ipython-notebooks and matplotlib, which can be
brew install matplotlib --with-python3
pip install ipython notebook
+
+## Build status (known working)
+
+Ubuntu 14.04 (GCC)
+- [ ] Default CPU build
+- [x] Default GPU build
+
+OS X (Clang)
+- [x] Default CPU build
+- [ ] Default GPU build
+
+Options (both Clang and GCC)
+- [ ] Nervana GPU
+- [ ] ZMQ
+- [ ] RocksDB
+- [ ] MPI
+- [ ] OpenMP
+- [ ] No LMDB
+- [ ] No LevelDB
+- [x] No OpenCV
+
+BLAS
+- [x] OpenBLAS
+- [x] ATLAS
+- [ ] MKL
+
+Other
+- [ ] CMake 2.8 support
+- [ ] List of dependencies for Ubuntu 14.04
+- [ ] List of dependencies for OS X
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 106d8dd041..1f223abea1 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -9,22 +9,28 @@ find_package(Threads REQUIRED)
list(APPEND Caffe2_LINKER_LIBS ${CMAKE_THREAD_LIBS_INIT})
# ---[ BLAS
-set(BLAS "Atlas" CACHE STRING "Selected BLAS library")
+set(BLAS "Eigen" CACHE STRING "Selected BLAS library")
set_property(CACHE BLAS PROPERTY STRINGS "Atlas;OpenBLAS;MKL")
-list(APPEND Caffe2_LINKER_LIBS cblas)
-if(BLAS STREQUAL "Atlas")
+if(BLAS STREQUAL "Eigen")
+ # Eigen is header-only and we do not have any dependent libraries
+ add_definitions(-DCAFFE2_USE_EIGEN_FOR_BLAS)
+elseif(BLAS STREQUAL "Atlas")
find_package(Atlas REQUIRED)
include_directories(SYSTEM ${ATLAS_INCLUDE_DIRS})
list(APPEND Caffe2_LINKER_LIBS ${ATLAS_LIBRARIES})
+ list(APPEND Caffe2_LINKER_LIBS cblas)
elseif(BLAS STREQUAL "OpenBLAS")
find_package(OpenBLAS REQUIRED)
include_directories(SYSTEM ${OpenBLAS_INCLUDE_DIR})
list(APPEND Caffe2_LINKER_LIBS ${OpenBLAS_LIB})
+ list(APPEND Caffe2_LINKER_LIBS cblas)
elseif(BLAS STREQUAL "MKL")
find_package(MKL REQUIRED)
include_directories(SYSTEM ${MKL_INCLUDE_DIR})
list(APPEND Caffe2_LINKER_LIBS ${MKL_LIBRARIES})
+ list(APPEND Caffe2_LINKER_LIBS cblas)
+ add_definitions(-DCAFFE2_USE_MKL)
endif()
# ---[ Google-glog