From 2f6cdd383abbf46a37b84a5fad013726b5c62169 Mon Sep 17 00:00:00 2001 From: Tao Lv Date: Sun, 16 Feb 2020 02:54:08 +0800 Subject: [PATCH] Enable MKL-DNN by default in pip packages (#16899) * enable mkldnn by default in pip packages * add make file for native build * rm *mkl build scripts * remove *mkl variants * Change readme/cd * clear native build configurations * fix static build test in ci * git mv linux_cu102mkl.mk linux_cu102.mk * fix merge conflict --- cd/Jenkinsfile_cd_pipeline | 2 +- cd/Jenkinsfile_release_job | 2 +- cd/README.md | 13 +- cd/mxnet_lib/dynamic/Jenkins_pipeline.groovy | 2 +- cd/mxnet_lib/mxnet_lib_pipeline.groovy | 4 +- cd/mxnet_lib/static/Jenkins_pipeline.groovy | 4 +- cd/python/docker/test_python_image.sh | 2 +- cd/python/pypi/pypi_package.sh | 2 +- cd/utils/artifact_repository.md | 8 +- cd/utils/artifact_repository.py | 12 +- cd/utils/docker_tag.sh | 14 +- cd/utils/mxnet_base_image.sh | 2 +- cd/utils/test_artifact_repository.py | 24 +-- ci/docker/runtime_functions.sh | 12 +- ci/jenkins/Jenkins_steps.groovy | 6 +- make/staticbuild/darwin_cpu.mk | 20 +- make/staticbuild/linux_cpu.mk | 20 +- make/staticbuild/linux_cu100.mk | 18 +- make/staticbuild/linux_cu100mkl.mk | 172 ----------------- make/staticbuild/linux_cu101.mk | 19 +- make/staticbuild/linux_cu101mkl.mk | 173 ------------------ make/staticbuild/linux_cu102.mk | 19 +- make/staticbuild/linux_cu102mkl.mk | 173 ------------------ make/staticbuild/linux_cu75.mk | 18 +- make/staticbuild/linux_cu75mkl.mk | 167 ----------------- make/staticbuild/linux_cu80.mk | 18 +- make/staticbuild/linux_cu80mkl.mk | 170 ----------------- make/staticbuild/linux_cu90.mk | 18 +- make/staticbuild/linux_cu90mkl.mk | 172 ----------------- make/staticbuild/linux_cu91.mk | 18 +- make/staticbuild/linux_cu91mkl.mk | 172 ----------------- make/staticbuild/linux_cu92.mk | 18 +- make/staticbuild/linux_cu92mkl.mk | 172 ----------------- .../{linux_mkl.mk => linux_native.mk} | 4 +- tools/staticbuild/README.md | 7 +- tools/staticbuild/build_lib.sh | 5 +- 36 files changed, 64 insertions(+), 1618 deletions(-) delete mode 100644 make/staticbuild/linux_cu100mkl.mk delete mode 100644 make/staticbuild/linux_cu101mkl.mk delete mode 100644 make/staticbuild/linux_cu102mkl.mk delete mode 100644 make/staticbuild/linux_cu75mkl.mk delete mode 100644 make/staticbuild/linux_cu80mkl.mk delete mode 100644 make/staticbuild/linux_cu90mkl.mk delete mode 100644 make/staticbuild/linux_cu91mkl.mk delete mode 100644 make/staticbuild/linux_cu92mkl.mk rename make/staticbuild/{linux_mkl.mk => linux_native.mk} (97%) diff --git a/cd/Jenkinsfile_cd_pipeline b/cd/Jenkinsfile_cd_pipeline index 79b1df0bfcd4..5ed3e6dd9968 100644 --- a/cd/Jenkinsfile_cd_pipeline +++ b/cd/Jenkinsfile_cd_pipeline @@ -36,7 +36,7 @@ pipeline { parameters { // Release parameters - string(defaultValue: "cpu,mkl,cu90,cu90mkl,cu92,cu92mkl,cu100,cu100mkl,cu101,cu101mkl,cu102,cu102mkl", description: "Comma separated list of variants", name: "MXNET_VARIANTS") + string(defaultValue: "cpu,native,cu90,cu92,cu100,cu101,cu102", description: "Comma separated list of variants", name: "MXNET_VARIANTS") booleanParam(defaultValue: false, description: 'Whether this is a release build or not', name: "RELEASE_BUILD") } diff --git a/cd/Jenkinsfile_release_job b/cd/Jenkinsfile_release_job index 494e29140700..c8b4918f51b6 100644 --- a/cd/Jenkinsfile_release_job +++ b/cd/Jenkinsfile_release_job @@ -43,7 +43,7 @@ pipeline { // any disruption caused by different COMMIT_ID values chaning the job parameter configuration on // Jenkins. string(defaultValue: "mxnet_lib/static", description: "Pipeline to build", name: "RELEASE_JOB_TYPE") - string(defaultValue: "cpu,mkl,cu90,cu90mkl,cu92,cu92mkl,cu100,cu100mkl,cu101,cu101mkl,cu102,cu102mkl", description: "Comma separated list of variants", name: "MXNET_VARIANTS") + string(defaultValue: "cpu,native,cu90,cu92,cu100,cu101,cu102", description: "Comma separated list of variants", name: "MXNET_VARIANTS") booleanParam(defaultValue: false, description: 'Whether this is a release build or not', name: "RELEASE_BUILD") } diff --git a/cd/README.md b/cd/README.md index af71fa626683..266455c952ff 100644 --- a/cd/README.md +++ b/cd/README.md @@ -19,28 +19,23 @@ ## Introduction -MXNet aims to support a variety of frontends, e.g. Python, Java, Perl, R, etc. as well as environments (Windows, Linux, Mac, with or without GPU, with or without MKL support, etc.). This package contains a small continuous delivery (CD) framework used to automate the delivery nightly and release builds across our delivery channels. +MXNet aims to support a variety of frontends, e.g. Python, Java, Perl, R, etc. as well as environments (Windows, Linux, Mac, with or without GPU, with or without MKL-DNN support, etc.). This package contains a small continuous delivery (CD) framework used to automate the delivery nightly and release builds across our delivery channels. The CD process is driven by the [CD pipeline job](Jenkinsfile_cd_pipeline), which orchestrates the order in which the artifacts are delivered. For instance, first publish the libmxnet library before publishing the pip package. It does this by triggering the [release job](Jenkinsfile_release_job) with a specific set of parameters for each delivery channel. The release job executes the specific release pipeline for a delivery channel across all MXNet *variants*. -A variant is a specific environment or features for which MXNet is compiled. For instance CPU, GPU with CUDA v10.0, CUDA v9.0 with MKL support, etc. +A variant is a specific environment or features for which MXNet is compiled. For instance CPU, GPU with CUDA v10.0, CUDA v9.0 with MKL-DNN support, etc. -Currently, 10 variants are supported: +Currently, below variants are supported. All of these variants except native have MKL-DNN backend enabled. * *cpu*: CPU -* *mkl*: CPU w/ MKL +* *native*: CPU without MKL-DNN * *cu90*: CUDA 9.0 -* *cu90mkl*: CUDA 9.0 w/ MKL-DNN * *cu92*: CUDA 9.2 -* *cu92mkl*: CUDA 9.2 w/ MKL-DNN * *cu100*: CUDA 10 -* *cu100mkl*: CUDA 10 w/ MKL-DNN * *cu101*: CUDA 10.1 -* *cu101mkl*: CUDA 10.1 w/ MKL-DNN * *cu102*: CUDA 10.2 -* *cu102mkl*: CUDA 10.2 w/ MKL-DNN *For more on variants, see [here](https://github.com/apache/incubator-mxnet/issues/8671)* diff --git a/cd/mxnet_lib/dynamic/Jenkins_pipeline.groovy b/cd/mxnet_lib/dynamic/Jenkins_pipeline.groovy index e3d4b5908d57..3cef8114c76c 100644 --- a/cd/mxnet_lib/dynamic/Jenkins_pipeline.groovy +++ b/cd/mxnet_lib/dynamic/Jenkins_pipeline.groovy @@ -31,7 +31,7 @@ licenses = 'licenses/*' // libmxnet dependencies mx_deps = '' -mx_mkldnn_deps = '' +mx_native_deps = '' // library type // either static or dynamic - depending on how it links to its dependencies diff --git a/cd/mxnet_lib/mxnet_lib_pipeline.groovy b/cd/mxnet_lib/mxnet_lib_pipeline.groovy index 0b308e087af6..24172e843067 100644 --- a/cd/mxnet_lib/mxnet_lib_pipeline.groovy +++ b/cd/mxnet_lib/mxnet_lib_pipeline.groovy @@ -68,7 +68,7 @@ def get_pipeline(mxnet_variant, build_fn) { // Returns a string of comma separated resources to be stashed b/w stages // E.g. the libmxnet library and any other dependencies def get_stash(mxnet_variant) { - def deps = mxnet_variant.endsWith('mkl') ? mx_mkldnn_deps : mx_deps + def deps = mxnet_variant.endsWith('native') ? mx_native_deps : mx_deps return "${libmxnet}, ${licenses}, ${deps}" } @@ -120,7 +120,7 @@ def test_gpu_quantization_py3(mxnet_variant) { def push(mxnet_variant) { node(NODE_LINUX_CPU) { ws("workspace/mxnet_${libtype}/${mxnet_variant}/${env.BUILD_NUMBER}") { - def deps = (mxnet_variant.endsWith('mkl')? mx_mkldnn_deps : mx_deps).replaceAll(',', '') + def deps = (mxnet_variant.endsWith('native')? mx_native_deps : mx_deps).replaceAll(',', '') ci_utils.unpack_and_init("mxnet_${mxnet_variant}", get_stash(mxnet_variant), false) cd_utils.push_artifact(libmxnet, mxnet_variant, libtype, licenses, deps) } diff --git a/cd/mxnet_lib/static/Jenkins_pipeline.groovy b/cd/mxnet_lib/static/Jenkins_pipeline.groovy index c6b6eaeaef90..abbafdbef075 100644 --- a/cd/mxnet_lib/static/Jenkins_pipeline.groovy +++ b/cd/mxnet_lib/static/Jenkins_pipeline.groovy @@ -32,8 +32,8 @@ libmxnet = 'lib/libmxnet.so' licenses = 'licenses/*' // libmxnet dependencies -mx_deps = 'lib/libgfortran.so.3, lib/libquadmath.so.0' -mx_mkldnn_deps = 'lib/libgfortran.so.3, lib/libquadmath.so.0, 3rdparty/mkldnn/build/install/include/dnnl_version.h, 3rdparty/mkldnn/build/install/include/dnnl_config.h' +mx_native_deps = 'lib/libgfortran.so.3, lib/libquadmath.so.0' +mx_deps = 'lib/libgfortran.so.3, lib/libquadmath.so.0, 3rdparty/mkldnn/build/install/include/dnnl_version.h, 3rdparty/mkldnn/build/install/include/dnnl_config.h' // library type // either static or dynamic - depending on how it links to its dependencies diff --git a/cd/python/docker/test_python_image.sh b/cd/python/docker/test_python_image.sh index 88e03ea84a12..f6095c9b34fb 100755 --- a/cd/python/docker/test_python_image.sh +++ b/cd/python/docker/test_python_image.sh @@ -38,7 +38,7 @@ if [[ $mxnet_variant == cu* ]]; then test_conv_params="--gpu" fi -if [[ $mxnet_variant == *mkl ]]; then +if [[ $mxnet_variant == cpu ]]; then ${python_cmd} tests/python/mkl/test_mkldnn.py fi diff --git a/cd/python/pypi/pypi_package.sh b/cd/python/pypi/pypi_package.sh index 69ea89cfd153..fafd88e9742b 100755 --- a/cd/python/pypi/pypi_package.sh +++ b/cd/python/pypi/pypi_package.sh @@ -18,7 +18,7 @@ set -ex -# variant = cpu, mkl, cu80, cu80mkl, cu100, etc. +# variant = cpu, native, cu80, cu100, etc. export mxnet_variant=${1:?"Please specify the mxnet variant"} # Due to this PR: https://github.com/apache/incubator-mxnet/pull/14899 diff --git a/cd/utils/artifact_repository.md b/cd/utils/artifact_repository.md index 4cf88428e433..12b4a27208c6 100644 --- a/cd/utils/artifact_repository.md +++ b/cd/utils/artifact_repository.md @@ -53,13 +53,13 @@ If not set, derived through the value of sys.platform (https://docs.python.org/3 **Variant** -Manually configured through the --variant argument. The current variants are: cpu, mkl, cu80, cu80mk, cu90, cu90mkl, cu92, cu92mkl, cu100, cu100mkl. +Manually configured through the --variant argument. The current variants are: cpu, native, cu80, cu90, cu92, cu100, and cu101. -As long as the tool is being run from the MXNet code base, the runtime feature detection tool (https://github.com/larroy/mxnet/blob/dd432b7f241c9da2c96bcb877c2dc84e6a1f74d4/docs/api/python/libinfo/libinfo.md) can be used to detect whether the library has been compiled with MKL (library has MKLDNN feature enabled) and/or CUDA support (compiled with CUDA feature enabled). +As long as the tool is being run from the MXNet code base, the runtime feature detection tool (https://github.com/larroy/mxnet/blob/dd432b7f241c9da2c96bcb877c2dc84e6a1f74d4/docs/api/python/libinfo/libinfo.md) can be used to detect whether the library has been compiled with MKL (library has MKL-DNN feature enabled) and/or CUDA support (compiled with CUDA feature enabled). If it has been compiled with CUDA support, the output of /usr/local/cuda/bin/nvcc --version can be mined for the exact CUDA version (eg. 8.0, 9.0, etc.). -By knowing which features are enabled on the binary, and if necessary, which CUDA version is installed on the machine, the value for the variant argument can be calculated. Eg. if MKL and CUDA features are enabled, and nvcc reports cuda version 10, then the variant would be cu100mkl. If neither MKL nor CUDA features are enabled, the variant would be cpu. +By knowing which features are enabled on the binary, and if necessary, which CUDA version is installed on the machine, the value for the variant argument can be calculated. Eg. if CUDA features are enabled, and nvcc reports cuda version 10, then the variant would be cu100. If neither MKL-DNN nor CUDA features are enabled, the variant would be native. **Dependency Linking** @@ -83,7 +83,7 @@ The user must specify the directory to which the artifact should be downloaded. Example: -`./artifact_repository.py --pull --static --variant=cu90mkl ./dist` +`./artifact_repository.py --pull --static --variant=cu90 ./dist` This would result in the following directory structure: diff --git a/cd/utils/artifact_repository.py b/cd/utils/artifact_repository.py index 4ef34c901242..9cced457335b 100755 --- a/cd/utils/artifact_repository.py +++ b/cd/utils/artifact_repository.py @@ -291,9 +291,9 @@ def probe_cpu_variant(mxnet_features: Dict[str, bool]) -> str: :return: Either cpu, or mkl as the variant """ logger.debug('Determining cpu variant') - if mxnet_features['MKLDNN']: - logger.debug('variant is: mkl') - return 'mkl' + if not mxnet_features['MKLDNN']: + logger.debug('variant is: native') + return 'native' logger.debug('variant is: cpu') return 'cpu' @@ -312,8 +312,8 @@ def probe_gpu_variant(mxnet_features: Dict[str, bool]) -> Optional[str]: cuda_version = get_cuda_version() if cuda_version: variant = 'cu{}'.format(cuda_version) - if mxnet_features['MKLDNN']: - variant = '{}mkl'.format(variant) + if not mxnet_features['MKLDNN']: + RuntimeError('Error determining mxnet variant: MKL-DNN should be enabled for cuda variants') logger.debug('variant is: {}'.format(variant)) return variant @@ -323,7 +323,7 @@ def probe_gpu_variant(mxnet_features: Dict[str, bool]) -> Optional[str]: def probe_mxnet_variant(limxnet_path: str) -> Optional[str]: """ Probes the libmxnet library and environment to determine - the mxnet variant, eg. cpu, mkl, cu90, cu90mkl, etc. + the mxnet variant, eg. cpu, cu90, etc. :return: """ logger.debug('Probing for mxnet variant') diff --git a/cd/utils/docker_tag.sh b/cd/utils/docker_tag.sh index d16da4930774..e77cbe7856bf 100755 --- a/cd/utils/docker_tag.sh +++ b/cd/utils/docker_tag.sh @@ -28,15 +28,11 @@ version=${VERSION:-nightly} if [[ ${mxnet_variant} == "cpu" ]]; then tag_suffix="cpu" -elif [[ ${mxnet_variant} == "mkl" ]]; then - tag_suffix="cpu_mkl" +elif [[ ${mxnet_variant} == "native" ]]; then + tag_suffix="native" elif [[ ${mxnet_variant} == cu* ]]; then tag_suffix="gpu_${mxnet_variant}" - # *mkl => *_mkl - if [[ $tag_suffix == *mkl ]]; then - tag_suffix="${tag_suffix:0:${#tag_suffix}-3}_mkl" - fi else echo "Error: Unrecognized mxnet variant: '${mxnet_variant}'." exit 1 @@ -49,11 +45,9 @@ if [[ ${is_release} == "true" ]]; then if [[ ${mxnet_variant} == "cpu" ]]; then echo "latest" echo "latest_cpu" - elif [[ ${mxnet_variant} == "mkl" ]]; then - echo "latest_cpu_mkl" + elif [[ ${mxnet_variant} == "native" ]]; then + echo "latest_cpu_native" elif [[ ${mxnet_variant} == "cu90" ]]; then echo "latest_gpu" - elif [[ ${mxnet_variant} == "cu90mkl" ]]; then - echo "latest_gpu_mkl" fi fi diff --git a/cd/utils/mxnet_base_image.sh b/cd/utils/mxnet_base_image.sh index c39746797ac9..c87db661818c 100755 --- a/cd/utils/mxnet_base_image.sh +++ b/cd/utils/mxnet_base_image.sh @@ -42,7 +42,7 @@ case ${mxnet_variant} in cpu) echo "ubuntu:16.04" ;; - mkl) + native) echo "ubuntu:16.04" ;; *) diff --git a/cd/utils/test_artifact_repository.py b/cd/utils/test_artifact_repository.py index c8ab70aecec2..2ab5d910c87b 100644 --- a/cd/utils/test_artifact_repository.py +++ b/cd/utils/test_artifact_repository.py @@ -159,20 +159,20 @@ def test_get_cuda_version_not_found(self, mock): self.assertIsNone(get_cuda_version()) @patch('artifact_repository.get_libmxnet_features') - def test_probe_variant_cpu(self, mock_features): + def test_probe_variant_native(self, mock_features): """ - Tests 'cpu' is returned if MKLDNN and CUDA features are OFF + Tests 'native' is returned if MKLDNN and CUDA features are OFF """ mock_features.return_value = {'MKLDNN': False, 'CUDA': False} - self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'cpu') + self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'native') @patch('artifact_repository.get_libmxnet_features') - def test_probe_variant_mkl(self, mock_features): + def test_probe_variant_cpu(self, mock_features): """ - Tests 'mkl' is returned if MKLDNN is ON and CUDA is OFF + Tests 'cpu' is returned if MKLDNN is ON and CUDA is OFF """ mock_features.return_value = {'MKLDNN': True, 'CUDA': False} - self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'mkl') + self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'cpu') @patch('artifact_repository.get_libmxnet_features') @patch('artifact_repository.get_cuda_version') @@ -180,19 +180,9 @@ def test_probe_variant_cuda(self, mock_cuda_version, mock_features): """ Tests 'cu100' is returned if MKLDNN is OFF and CUDA is ON and CUDA version is 10.0 """ - mock_features.return_value = {'MKLDNN': False, 'CUDA': True} - mock_cuda_version.return_value = '100' - self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'cu100') - - @patch('artifact_repository.get_libmxnet_features') - @patch('artifact_repository.get_cuda_version') - def test_probe_variant_cuda_mkl(self, mock_cuda_version, mock_features): - """ - Tests 'cu100mkl' is returned if MKLDNN is ON and CUDA is ON and CUDA version is 10.0 - """ mock_features.return_value = {'MKLDNN': True, 'CUDA': True} mock_cuda_version.return_value = '100' - self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'cu100mkl') + self.assertEqual(probe_mxnet_variant('libmxnet.so'), 'cu100') @patch('artifact_repository.get_libmxnet_features') def test_probe_variant_cuda_returns_none_on_no_features(self, mock_features): diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 8360f88143dd..e2b236006a37 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -1994,28 +1994,28 @@ cd_s3_publish() { aws s3 cp ${filepath} s3://apache-mxnet/dist/python/${variant}/${filename} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=id=43f628fab72838a4f0b929d7f1993b14411f4b0294b011261bc6bd3e950a6822 } -build_static_scala_mkl() { +build_static_scala_cpu() { set -ex pushd . scala_prepare export MAVEN_PUBLISH_OS_TYPE=linux-x86_64-cpu - export mxnet_variant=mkl + export mxnet_variant=cpu ./ci/publish/scala/build.sh popd } -build_static_python_mkl() { +build_static_python_cpu() { set -ex pushd . - export mxnet_variant=mkl + export mxnet_variant=cpu ./ci/publish/python/build.sh popd } -build_static_python_cu101mkl() { +build_static_python_cu101() { set -ex pushd . - export mxnet_variant=cu101mkl + export mxnet_variant=cu101 ./ci/publish/python/build.sh popd } diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index 61aaad75c58b..0e8bc36bfe89 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -656,7 +656,7 @@ def test_static_scala_cpu() { ws('workspace/ut-publish-scala-cpu') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run("publish.ubuntu1404_cpu", 'build_static_scala_mkl', false) + utils.docker_run("publish.ubuntu1404_cpu", 'build_static_scala_cpu', false) } } } @@ -669,7 +669,7 @@ def test_static_python_cpu() { ws('workspace/ut-publish-python-cpu') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run("publish.ubuntu1404_cpu", 'build_static_python_mkl', false) + utils.docker_run("publish.ubuntu1404_cpu", 'build_static_python_cpu', false) } } } @@ -695,7 +695,7 @@ def test_static_python_gpu() { ws('workspace/ut-publish-python-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.init_git() - utils.docker_run("publish.ubuntu1404_gpu", 'build_static_python_cu101mkl', true) + utils.docker_run("publish.ubuntu1404_gpu", 'build_static_python_cu101', true) } } } diff --git a/make/staticbuild/darwin_cpu.mk b/make/staticbuild/darwin_cpu.mk index 2497aadc9d3d..1859936f180e 100644 --- a/make/staticbuild/darwin_cpu.mk +++ b/make/staticbuild/darwin_cpu.mk @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - +# #------------------------------------------------------------------------------- # Template configuration for compiling mxnet for making python wheel #------------------------------------------------------------------------------- @@ -83,24 +83,8 @@ USE_OPENMP = 0 USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - # whether use MKL-DNN library -USE_MKLDNN = 0 - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cpu.mk b/make/staticbuild/linux_cpu.mk index 4d3b95f4dbd8..1cf389ae4a57 100644 --- a/make/staticbuild/linux_cpu.mk +++ b/make/staticbuild/linux_cpu.mk @@ -37,7 +37,7 @@ DEBUG = 0 USE_SIGNAL_HANDLER = 1 # the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib -lpng -ltiff -ljpeg -lz -lgfortran -ldl -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections +ADD_LDFLAGS += -L$(DEPS_PATH)/lib -lpng -ltiff -ljpeg -lz -lgfortran -ldl -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections # the additional compile flags you want to add ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections @@ -84,23 +84,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu100.mk b/make/staticbuild/linux_cu100.mk index 09a760f16b3a..862c1f56f8ae 100644 --- a/make/staticbuild/linux_cu100.mk +++ b/make/staticbuild/linux_cu100.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu100mkl.mk b/make/staticbuild/linux_cu100mkl.mk deleted file mode 100644 index 862c1f56f8ae..000000000000 --- a/make/staticbuild/linux_cu100mkl.mk +++ /dev/null @@ -1,172 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-10.0 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_cu101.mk b/make/staticbuild/linux_cu101.mk index 82044bdae4ec..6161431454ba 100644 --- a/make/staticbuild/linux_cu101.mk +++ b/make/staticbuild/linux_cu101.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 @@ -186,3 +170,4 @@ EXTRA_OPERATORS = # git@github.com:dato-code/SFrame.git # SFRAME_PATH = $(HOME)/SFrame # MXNET_PLUGINS += plugin/sframe/plugin.mk + diff --git a/make/staticbuild/linux_cu101mkl.mk b/make/staticbuild/linux_cu101mkl.mk deleted file mode 100644 index 6161431454ba..000000000000 --- a/make/staticbuild/linux_cu101mkl.mk +++ /dev/null @@ -1,173 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-10.1 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk - diff --git a/make/staticbuild/linux_cu102.mk b/make/staticbuild/linux_cu102.mk index 7e2a46e3b411..4bc649fb5423 100644 --- a/make/staticbuild/linux_cu102.mk +++ b/make/staticbuild/linux_cu102.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 @@ -186,3 +170,4 @@ EXTRA_OPERATORS = # git@github.com:dato-code/SFrame.git # SFRAME_PATH = $(HOME)/SFrame # MXNET_PLUGINS += plugin/sframe/plugin.mk + diff --git a/make/staticbuild/linux_cu102mkl.mk b/make/staticbuild/linux_cu102mkl.mk deleted file mode 100644 index 4bc649fb5423..000000000000 --- a/make/staticbuild/linux_cu102mkl.mk +++ /dev/null @@ -1,173 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-10.2 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk - diff --git a/make/staticbuild/linux_cu75.mk b/make/staticbuild/linux_cu75.mk index 3070a907825a..e263794600df 100644 --- a/make/staticbuild/linux_cu75.mk +++ b/make/staticbuild/linux_cu75.mk @@ -84,23 +84,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu75mkl.mk b/make/staticbuild/linux_cu75mkl.mk deleted file mode 100644 index e263794600df..000000000000 --- a/make/staticbuild/linux_cu75mkl.mk +++ /dev/null @@ -1,167 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-7.5 - -# whether use CuDNN R3 library -USE_CUDNN = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_cu80.mk b/make/staticbuild/linux_cu80.mk index 969229e22608..a42220d3d467 100644 --- a/make/staticbuild/linux_cu80.mk +++ b/make/staticbuild/linux_cu80.mk @@ -87,23 +87,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu80mkl.mk b/make/staticbuild/linux_cu80mkl.mk deleted file mode 100644 index a42220d3d467..000000000000 --- a/make/staticbuild/linux_cu80mkl.mk +++ /dev/null @@ -1,170 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-8.0 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_cu90.mk b/make/staticbuild/linux_cu90.mk index 310b1fac421b..c46c10f6358b 100644 --- a/make/staticbuild/linux_cu90.mk +++ b/make/staticbuild/linux_cu90.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu90mkl.mk b/make/staticbuild/linux_cu90mkl.mk deleted file mode 100644 index c46c10f6358b..000000000000 --- a/make/staticbuild/linux_cu90mkl.mk +++ /dev/null @@ -1,172 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-9.0 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_cu91.mk b/make/staticbuild/linux_cu91.mk index b1684cf83fa8..b2a33d7e36c8 100644 --- a/make/staticbuild/linux_cu91.mk +++ b/make/staticbuild/linux_cu91.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu91mkl.mk b/make/staticbuild/linux_cu91mkl.mk deleted file mode 100644 index b2a33d7e36c8..000000000000 --- a/make/staticbuild/linux_cu91mkl.mk +++ /dev/null @@ -1,172 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-9.1 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_cu92.mk b/make/staticbuild/linux_cu92.mk index ee431d88afbf..bbaa4bfcd772 100644 --- a/make/staticbuild/linux_cu92.mk +++ b/make/staticbuild/linux_cu92.mk @@ -89,23 +89,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 0 - - -# MKL ML Library for Intel CPU/Xeon Phi -# Please refer to MKL_README.md for details - -# MKL ML Library folder, need to be root for /usr/local -# Change to User Home directory for standard user -# For USE_BLAS!=mkl only -MKLML_ROOT=/usr/local - -# whether use MKL2017 library -USE_MKL2017 = 0 - -# whether use MKL2017 experimental feature for high performance -# Prerequisite USE_MKL2017=1 -USE_MKL2017_EXPERIMENTAL = 0 +USE_MKLDNN = 1 # whether use NNPACK library USE_NNPACK = 0 diff --git a/make/staticbuild/linux_cu92mkl.mk b/make/staticbuild/linux_cu92mkl.mk deleted file mode 100644 index bbaa4bfcd772..000000000000 --- a/make/staticbuild/linux_cu92mkl.mk +++ /dev/null @@ -1,172 +0,0 @@ -# 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 for making python wheel -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export CC = gcc -export CXX = g++ -export NVCC = nvcc - -# whether compile with options for MXNet developer -DEV = 0 - -# whether compile with debug -DEBUG = 0 - -# whether to turn on signal handler (e.g. segfault logger) -USE_SIGNAL_HANDLER = 1 - -# the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib $(DEPS_PATH)/lib/libculibos.a -lpng -ltiff -ljpeg -lz -ldl -lgfortran -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections - -# the additional compile flags you want to add -ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections - -#--------------------------------------------- -# matrix computation libraries for CPU/GPU -#--------------------------------------------- - -# choose the version of blas you want to use -# can be: mkl, blas, atlas, openblas -# in default use atlas for linux while apple for osx -USE_BLAS=openblas - -# whether use opencv during compilation -# you can disable it, however, you will not able to use -# imbin iterator -USE_OPENCV = 1 -# Add OpenCV include path, in which the directory `opencv2` exists -USE_OPENCV_INC_PATH = NONE -# Add OpenCV shared library path, in which the shared library exists -USE_OPENCV_LIB_PATH = NONE - -# whether use CUDA during compile -USE_CUDA = 1 - -# add the path to CUDA library to link and compile flag -# if you have already add them to environment variable, leave it as NONE -# USE_CUDA_PATH = /usr/local/cuda -USE_CUDA_PATH = $(DEPS_PATH)/usr/local/cuda-9.2 - -# whether to use CuDNN library -USE_CUDNN = 1 - -# whether to use NCCL library -USE_NCCL = 1 - -# CUDA architecture setting: going with all of them. -# For CUDA < 6.0, comment the *_50 lines for compatibility. -# CUDA_ARCH := - -# whether use cuda runtime compiling for writing kernels in native language (i.e. Python) -ENABLE_CUDA_RTC = 1 - -USE_NVTX=1 - -# use openmp for parallelization -USE_OPENMP = 1 -USE_OPERATOR_TUNING = 1 -USE_LIBJPEG_TURBO = 1 - -# whether use MKL-DNN library -USE_MKLDNN = 1 - -# whether use NNPACK library -USE_NNPACK = 0 - -# whether use lapack during compilation -# only effective when compiled with blas versions openblas/apple/atlas/mkl -USE_LAPACK = 1 - -# path to lapack library in case of a non-standard installation -USE_LAPACK_PATH = $(DEPS_PATH)/lib - -# add path to intel library, you may need it for MKL, if you did not add the path -# to environment variable -USE_INTEL_PATH = NONE - -# If use MKL, choose static link automatically to allow python wrapper -ifeq ($(USE_BLAS), mkl) -USE_STATIC_MKL = 1 -else -USE_STATIC_MKL = NONE -endif - -#---------------------------- -# Settings for power and arm arch -#---------------------------- -ARCH := $(shell uname -a) -ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64)) - USE_SSE=0 -else - USE_SSE=1 -endif - -#---------------------------- -# distributed computing -#---------------------------- - -# whether or not to enable multi-machine supporting -USE_DIST_KVSTORE = 1 - -# whether or not allow to read and write HDFS directly. If yes, then hadoop is -# required -USE_HDFS = 0 - -# path to libjvm.so. required if USE_HDFS=1 -LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server - -# whether or not allow to read and write AWS S3 directly. If yes, then -# libcurl4-openssl-dev is required, it can be installed on Ubuntu by -# sudo apt-get install -y libcurl4-openssl-dev -USE_S3 = 1 - -#---------------------------- -# additional operators -#---------------------------- - -# path to folders containing projects specific operators that you don't want to put in src/operators -EXTRA_OPERATORS = - - -#---------------------------- -# plugins -#---------------------------- - -# whether to use caffe integration. This requires installing caffe. -# You also need to add CAFFE_PATH/build/lib to your LD_LIBRARY_PATH -# CAFFE_PATH = $(HOME)/caffe -# MXNET_PLUGINS += plugin/caffe/caffe.mk - -# whether to use torch integration. This requires installing torch. -# You also need to add TORCH_PATH/install/lib to your LD_LIBRARY_PATH -# TORCH_PATH = $(HOME)/torch -# MXNET_PLUGINS += plugin/torch/torch.mk - -# WARPCTC_PATH = $(HOME)/warp-ctc -# MXNET_PLUGINS += plugin/warpctc/warpctc.mk - -# whether to use sframe integration. This requires build sframe -# git@github.com:dato-code/SFrame.git -# SFRAME_PATH = $(HOME)/SFrame -# MXNET_PLUGINS += plugin/sframe/plugin.mk diff --git a/make/staticbuild/linux_mkl.mk b/make/staticbuild/linux_native.mk similarity index 97% rename from make/staticbuild/linux_mkl.mk rename to make/staticbuild/linux_native.mk index 1cf389ae4a57..348a659cd9e2 100644 --- a/make/staticbuild/linux_mkl.mk +++ b/make/staticbuild/linux_native.mk @@ -37,7 +37,7 @@ DEBUG = 0 USE_SIGNAL_HANDLER = 1 # the additional link flags you want to add -ADD_LDFLAGS += -L$(DEPS_PATH)/lib -lpng -ltiff -ljpeg -lz -lgfortran -ldl -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections +ADD_LDFLAGS += -L$(DEPS_PATH)/lib -lpng -ltiff -ljpeg -lz -lgfortran -ldl -Wl,--version-script=$(CURDIR)/make/config/libmxnet.ver,-rpath,'$${ORIGIN}',--gc-sections # the additional compile flags you want to add ADD_CFLAGS += -I$(DEPS_PATH)/include -ffunction-sections -fdata-sections @@ -84,7 +84,7 @@ USE_OPERATOR_TUNING = 1 USE_LIBJPEG_TURBO = 1 # whether use MKL-DNN library -USE_MKLDNN = 1 +USE_MKLDNN = 0 # whether use NNPACK library USE_NNPACK = 0 diff --git a/tools/staticbuild/README.md b/tools/staticbuild/README.md index 201bf76276f5..af0abcbd84cf 100644 --- a/tools/staticbuild/README.md +++ b/tools/staticbuild/README.md @@ -27,14 +27,13 @@ environment variable settings. Here are examples you can run with this script: ``` tools/staticbuild/build.sh cu102 ``` - -This would build the mxnet package based on CUDA 10.2. +This would build the mxnet package based on CUDA 10.2. Currently, we support variants cpu, native, cu90, cu92, cu100, and cu101. All of these variants expect native have MKL-DNN backend enabled. ``` tools/staticbuild/build.sh cpu ``` -This would build the mxnet package based on MKLDNN. +This would build the mxnet package based on MKL-DNN. To use CMake to build the `libmxnet.so` instead of the deprecated Makefile based build logic, set the `CMAKE_STATICBUILD` environment variable. For example @@ -53,7 +52,7 @@ This script clones the most up-to-date master and builds the MXNet backend with - `DEPS_PATH` Path to your static dependencies - `PLATFORM` linux, darwin -- `VARIANT` cpu, cu*, cu*mkl, mkl +- `VARIANT` cpu, cu* It is not recommended to run this file alone since there are a bunch of variables need to be set. diff --git a/tools/staticbuild/build_lib.sh b/tools/staticbuild/build_lib.sh index 111c907db863..6cceced6f27a 100755 --- a/tools/staticbuild/build_lib.sh +++ b/tools/staticbuild/build_lib.sh @@ -34,10 +34,7 @@ git submodule update --init --recursive || true $MAKE DEPS_PATH=$DEPS_PATH DMLCCORE $MAKE DEPS_PATH=$DEPS_PATH $PWD/3rdparty/tvm/nnvm/lib/libnnvm.a $MAKE DEPS_PATH=$DEPS_PATH PSLITE - -if [[ $VARIANT == *mkl ]]; then - $MAKE DEPS_PATH=$DEPS_PATH mkldnn -fi +$MAKE DEPS_PATH=$DEPS_PATH mkldnn >&2 echo "Now building mxnet..." $MAKE DEPS_PATH=$DEPS_PATH