TaoLv commented on a change in pull request #17430: cmake: add config files 
similar to make/config.mk
URL: https://github.com/apache/incubator-mxnet/pull/17430#discussion_r371047881
 
 

 ##########
 File path: config/config.cmake
 ##########
 @@ -0,0 +1,129 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#-------------------------------------------------------------------------------
+#  Template configuration for compiling MXNet
+#
+#  If you want to change the configuration, please use the following
+#  steps. Assume you are on the root directory of mxnet. First copy the this
+#  file so that any local changes will be ignored by git
+#
+#  $ cp config/config.cmake config.cmake
+#
+#  Next modify the according entries, and then compile by
+#
+#  $ mkdir build; cd build
+#  $ cmake -C ../config.cmake ..
+#  $ cmake --build . --parallel 8
+#
+# You can increase the --parallel 8 argument to match the number of processor
+# cores of your computer.
+#
+#-------------------------------------------------------------------------------
+
+#---------------------------------------------
+# GPU support
+#---------------------------------------------
+set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
+set(USE_CUDNN ON CACHE BOOL "Build with cudnn support, if found")
+
+# Target NVIDIA GPU achitecture.
+# Valid options are "Auto" for autodetection, "All" for all available
+# architectures or a list of architectures by compute capability number, such 
as
+# "7.0" or "7.0;7.5" as well as name, such as "Volta" or "Volta;Turing".
+# The value specified here is passed to cmake's CUDA_SELECT_NVCC_ARCH_FLAGS to
+# obtain the compilation flags for nvcc.
+#
+# When compiling on a machine without GPU, autodetection will fail and you
+# should instead specify the target architecture manually to avoid excessive
+# compilation times.
+set(MXNET_CUDA_ARCH "Auto" CACHE STRING "Target NVIDIA GPU achitecture")
+
+#---------------------------------------------
+# Common libraries
+#---------------------------------------------
+set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support")
+set(OPENCV_ROOT "" CACHE BOOL "OpenCV install path. Supports autodetection.")
+
+set(USE_OPENMP ON CACHE BOOL "Build with Openmp support")
+
+set(USE_MKL_IF_AVAILABLE ON CACHE BOOL "Use Intel MKL if found")
+set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support")
 
 Review comment:
   MKL-DNN should also support Apple and MSVC. See 
https://github.com/intel/mkl-dnn/#runtime-dependencies.
   Previously we decided to enable MKL-DNN by default only on linux machines, 
so Apple and MSVC are excluded. One note is that, if MSVC, 
`CMAKE_HOST_SYSTEM_PROCESSOR` may not be `x86_64`. Also if we want to default 
MKL-DNN on all platforms, similar change should be applied to makefile too.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to