summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYangqing Jia <jiayq84@gmail.com>2018-01-22 13:47:44 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-01-22 14:04:11 -0800
commit27f4041738ab44f783060d7cc3555fee73327277 (patch)
tree6a0c16bde9fff1bc96fa32f965adc52795c2b411 /CMakeLists.txt
parenta82b3096effa7acbe80db3a96bd1dd6834c04ab5 (diff)
downloadpytorch-27f4041738ab44f783060d7cc3555fee73327277.tar.gz
pytorch-27f4041738ab44f783060d7cc3555fee73327277.tar.bz2
pytorch-27f4041738ab44f783060d7cc3555fee73327277.zip
Checking performance flags during init.
Summary: Adds 2 features: (1) In cmake, allow the use of -march=native (2) During initialization, check if Caffe2 is built with matching cpu features of the current machine. This helps us guarding performance claims in case the Caffe2 baseline is built with limited computation capability. Currently only added avx, avx2 and fma which are common. Closes https://github.com/caffe2/caffe2/pull/1775 Reviewed By: ezyang Differential Revision: D6772059 Pulled By: Yangqing fbshipit-source-id: 884a3d7c7a71ed9631b7c6269ae95d842a09e1bd
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fcaf6f767..0c345582f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,7 @@ option(USE_LMDB "Use LMDB" ON)
option(USE_METAL "Use Metal for iOS build" ON)
option(USE_MOBILE_OPENGL "Use OpenGL for mobile code" ON)
option(USE_MPI "Use MPI" ON)
+option(USE_NATIVE_ARCH "Use -march=native" OFF)
option(USE_NCCL "Use NCCL" ON)
option(USE_NERVANA_GPU "Use Nervana GPU backend" OFF)
option(USE_NNPACK "Use NNPACK" ON)