Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7 from apache/master
Browse files Browse the repository at this point in the history
sync to latest master code
  • Loading branch information
Hao Li authored Dec 10, 2018
2 parents cf527e0 + f2ca66f commit 0de4156
Show file tree
Hide file tree
Showing 680 changed files with 29,288 additions and 14,397 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ script:
- mv make/osx.mk config.mk
- make -j 2

# Temporarily disabled due to https://github.com/apache/incubator-mxnet/issues/13136
# We ignore several tests to avoid possible timeouts on large PRs.
# This lowers our test coverage, but is required for consistent Travis runs.
# These tests will be tested in a variety of environments in Jenkins based tests.
- python -m nose --with-timer --exclude-test=test_sparse_operator.test_elemwise_binary_ops --exclude-test=test_gluon_model_zoo.test_models --exclude-test=test_random.test_shuffle --exclude-test=test_operator.test_broadcast_binary_op --exclude-test=test_operator.test_pick --exclude-test=test_profiler.test_continuous_profile_and_instant_marker --exclude-test=test_metric_perf.test_metric_performance --exclude-test=test_operator.test_order --verbose tests/python/unittest/
- python2 -m nose --verbose tools/coreml/test --exclude-test=test_mxnet_image
# - python -m nose --with-timer --exclude-test=test_sparse_operator.test_elemwise_binary_ops --exclude-test=test_gluon_model_zoo.test_models --exclude-test=test_random.test_shuffle --exclude-test=test_operator.test_broadcast_binary_op --exclude-test=test_operator.test_pick --exclude-test=test_profiler.test_continuous_profile_and_instant_marker --exclude-test=test_metric_perf.test_metric_performance --exclude-test=test_operator.test_order --verbose tests/python/unittest/
# - python2 -m nose --verbose tools/coreml/test --exclude-test=test_mxnet_image
2 changes: 1 addition & 1 deletion 3rdparty/mkldnn
39 changes: 17 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,17 @@ else(MSVC)
endif()
# For cross complication, turn off flag if target device does not support it
if(USE_F16C)
check_cxx_compiler_flag("-mf16c" COMPILER_SUPPORT_MF16C)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
execute_process(COMMAND cat /proc/cpuinfo
COMMAND grep flags
COMMAND grep f16c
OUTPUT_VARIABLE CPU_SUPPORT_F16C)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
execute_process(COMMAND sysctl -a
COMMAND grep machdep.cpu.features
COMMAND grep F16C
OUTPUT_VARIABLE CPU_SUPPORT_F16C)
endif()
if(NOT CPU_SUPPORT_F16C)
message("CPU does not support F16C instructions")
endif()
if(CPU_SUPPORT_F16C AND COMPILER_SUPPORT_MF16C)
set(SUPPORT_F16C TRUE)
endif()
# Determine if hardware supports F16C instruction set
message(STATUS "Determining F16C support")
include(cmake/AutoDetectF16C.cmake)
else()
set(SUPPORT_F16C FALSE)
endif()
if(SUPPORT_F16C)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mf16c")
else()
add_definitions(-DMSHADOW_USE_F16C=0)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "-Wall -Wno-unknown-pragmas -Wno-sign-compare")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang$")
Expand Down Expand Up @@ -234,13 +224,19 @@ if(ENABLE_TESTCOVERAGE)
endif()

if(USE_MKLDNN)
include(cmake/MklDnn.cmake)
include(cmake/DownloadMKLML.cmake)
# CPU architecture (e.g., C5) can't run on another architecture (e.g., g3).
if(NOT MSVC)
set(ARCH_OPT_FLAGS "-mtune=generic")
else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHsc")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /Gy")
endif()
set(WITH_TEST OFF)
set(WITH_EXAMPLE OFF)

set(WITH_TEST OFF CACHE INTERNAL "" FORCE)
set(WITH_EXAMPLE OFF CACHE INTERNAL "" FORCE)
set(ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE)

add_subdirectory(3rdparty/mkldnn)

include_directories(3rdparty/mkldnn/include)
Expand All @@ -261,7 +257,6 @@ if(USE_CUDA)
if(NOT CUDA_TOOLSET)
set(CUDA_TOOLSET "${CUDA_VERSION_STRING}")
endif()
set(CMAKE_GENERATOR_TOOLSET "cuda=${CUDA_TOOLSET},host=x64")
else()
set(FIRST_CUDA FALSE)
endif()
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ who are willing to help maintaining and leading the project. Committers come fro

New committers will be proposed by current committers, with support from more than two of current committers.


List of Contributors
--------------------
* [Full List of Contributors](https://github.com/apache/incubator-mxnet/graphs/contributors)
Expand Down Expand Up @@ -187,3 +188,20 @@ List of Contributors
* [LuckyPigeon](https://github.com/LuckyPigeon)
* [Anton Chernov](https://github.com/lebeg)
* [Denisa Roberts](https://github.com/D-Roberts)
* [Dick Carter](https://github.com/DickJC123)
* [Rahul Padmanabhan](https://github.com/rahul3)
* [Yuxi Hu](https://github.com/yuxihu)
* [Harsh Patel](https://github.com/harshp8l)

Label Bot
---------
* [mxnet-label-bot](https://github.com/mxnet-label-bot)
- mxnet-label-bot provides users with the functionality to manage labels for Issues/Pull Requests on the repository
- To use me, comment:
- @mxnet-label-bot add [specify comma separated labels here]
- @mxnet-label-bot remove [specify comma separated labels here]
- @mxnet-label-bot update [specify comma separated labels here]
(i.e. @mxnet-label-bot update [Bug, Python])

- Available label names which are supported: [Labels](https://github.com/apache/incubator-mxnet/labels)
- For further details: [My Wiki Page](https://cwiki.apache.org/confluence/display/MXNET/Machine+Learning+Based+GitHub+Bot)
94 changes: 88 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,20 @@
1. MXNet Cpp-package - For details, /cpp-package/LICENSE
2. MXNet rcnn - For details, see, example/rcnn/LICENSE
3. scala-package - For details, see, scala-package/LICENSE
4. Warp-CTC - For details, see, src/operator/contrib/ctc_include/LICENSE
4. Warp-CTC - For details, see, 3rdparty/ctc_include/LICENSE
5. 3rdparty/dlpack - For details, see, 3rdparty/dlpack/LICENSE
6. 3rdparty/dmlc-core - For details, see, 3rdparty/dmlc-core/LICENSE
7. 3rdparty/mshadow - For details, see, 3rdparty/mshadow/LICENSE
8. 3rdparty/tvm - For details, see, 3rdparty/tvm/LICENSE
9. 3rdparty/tvm/dmlc-core - For details, see, 3rdparty/tvm/dmlc-core/LICENSE
10. 3rdparty/tvm/nnvm - For details, see, 3rdparty/tvm/nnvm/LICENSE
11. 3rdparty/ps-lite - For details, see, 3rdparty/ps-lite/LICENSE
12. 3rdparty/mkldnn - For details, see, 3rdparty/mkldnn/LICENSE
13. googlemock scripts/generator - For details, see, 3rdparty/googletest/googlemock/scripts/generator/LICENSE
10. 3rdparty/tvm/dlpack - For details, see, 3rdparty/tvm/3rdparty/dlpack/LICENSE
11. 3rdparty/tvm/nnvm - For details, see, 3rdparty/tvm/nnvm/LICENSE
12. 3rdparty/ps-lite - For details, see, 3rdparty/ps-lite/LICENSE
13. 3rdparty/mkldnn - For details, see, 3rdparty/mkldnn/LICENSE
14. googlemock scripts/generator - For details, see, 3rdparty/googletest/googlemock/scripts/generator/LICENSE
15. clojure-package - For details, see, contrib/clojure-package/LICENSE
16. R-package - For details, see, R-package/LICENSE
17. ONNX-TensorRT benchmark package - For details, see, 3rdparty/onnx-tensorrt/third_party/onnx/third_party/benchmark/LICENSE


=======================================================================================
Expand All @@ -239,14 +243,17 @@
3. tree_lstm - For details, see example/gluon/tree_lstm/LICENSE
4. OpenMP - For details, see 3rdparty/openmp/LICENSE.txt
5. HalideIR - For details, see nnvm/tvm/HalideIR/LICENSE
6. HalideIR - For details, see 3rdparty/tvm/3rdparty/HalideIR/LICENSE
7. ONNX-TensorRT - For details, see 3rdparty/onnx-tensorrt/LICENSE
8. ONNX-TensorRT - For details, see 3rdparty/onnx-tensorrt/third_party/onnx/LICENSE


=======================================================================================
NVIDIA Licenses
=======================================================================================

1. Moderngpu
For details, see, src/operator/contrib/ctc_include/contrib/moderngpu/LICENSE
For details, see, 3rdparty/ctc_include/contrib/moderngpu/LICENSE

/******************************************************************************
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -559,4 +566,79 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=======================================================================================

12. Google tests
For details, see, 3rdparty/mkldnn/tests/gtests/gtest/LICENSE

Copyright 2008, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=======================================================================================

13. ONNX python bindings
For details, see, 3rdparty/onnx-tensorrt/third_party/onnx/third_party/pybind11/LICENSE

Copyright (c) 2016 Wenzel Jakob <[email protected]>, All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to the author of this software, without
imposing a separate written license agreement for such Enhancements, then you
hereby grant the following license: a non-exclusive, royalty-free perpetual
license to install, use, modify, prepare derivative works, incorporate into
other computer software, distribute, and sublicense such enhancements or
derivative works thereof, in binary and source code form.

33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ endif
# be JIT-compiled by the updated driver from the included PTX.
ifeq ($(USE_CUDA), 1)
ifeq ($(CUDA_ARCH),)
KNOWN_CUDA_ARCHS := 30 35 50 52 60 61 70
KNOWN_CUDA_ARCHS := 30 35 50 52 60 61 70 75
# Run nvcc on a zero-length file to check architecture-level support.
# Create args to include SASS in the fat binary for supported levels.
CUDA_ARCH := $(foreach arch,$(KNOWN_CUDA_ARCHS), \
Expand Down Expand Up @@ -584,19 +584,20 @@ rpkg:
cp -rf 3rdparty/tvm/nnvm/include/* R-package/inst/include
Rscript -e "if(!require(devtools)){install.packages('devtools', repo = 'https://cloud.r-project.org/')}"
Rscript -e "library(devtools); library(methods); options(repos=c(CRAN='https://cloud.r-project.org/')); install_deps(pkg='R-package', dependencies = TRUE)"
echo "import(Rcpp)" > R-package/NAMESPACE
echo "import(methods)" >> R-package/NAMESPACE
cp R-package/dummy.NAMESPACE R-package/NAMESPACE
echo "import(Rcpp)" >> R-package/NAMESPACE
R CMD INSTALL R-package
Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package')"
Rscript -e "if (!require('roxygen2')||packageVersion('roxygen2')!= '5.0.1'){\
devtools::install_version('roxygen2',version='5.0.1',\
repo='https://cloud.r-project.org/',quiet=TRUE)}"
Rscript -e "require(roxygen2); roxygen2::roxygenise('R-package')"
Rscript -e "if (!require('roxygen2')||packageVersion('roxygen2') < '5.0.1'){\
devtools::install_version('roxygen2',version='5.0.1',\
repos='https://cloud.r-project.org/',quiet=TRUE)}"
Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package'); warnings()"
rm R-package/NAMESPACE
Rscript -e "require(roxygen2); roxygen2::roxygenise('R-package'); warnings()"
R CMD INSTALL R-package

rpkgtest:
Rscript -e 'require(testthat);res<-test_dir("R-package/tests/testthat");if(!testthat:::all_passed(res)){stop("Test failures", call. = FALSE)}'
Rscript -e 'res<-covr:::package_coverage("R-package");fileConn<-file("r-package_coverage.json");writeLines(covr:::to_codecov(res), fileConn);close(fileConn)'
Rscript -e 'res<-covr:::package_coverage("R-package");fileConn<-file(paste("r-package_coverage_",toString(runif(1)),".json"));writeLines(covr:::to_codecov(res), fileConn);close(fileConn)'

scalaclean:
(cd $(ROOTDIR)/scala-package; \
Expand Down Expand Up @@ -657,20 +658,22 @@ scaladeploy:
jnilint:
3rdparty/dmlc-core/scripts/lint.py mxnet-jnicpp cpp scala-package/native/src

ifneq ($(EXTRA_OPERATORS),)
clean: cyclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~ R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
rclean:
$(RM) -r R-package/src/image_recordio.h R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
R-package/inst R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz

ifneq ($(EXTRA_OPERATORS),)
clean: rclean cyclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
cd $(AMALGAMATION_PATH); $(MAKE) clean; cd -
$(RM) -r $(patsubst %, %/*.d, $(EXTRA_OPERATORS)) $(patsubst %, %/*/*.d, $(EXTRA_OPERATORS))
$(RM) -r $(patsubst %, %/*.o, $(EXTRA_OPERATORS)) $(patsubst %, %/*/*.o, $(EXTRA_OPERATORS))
else
clean: mkldnn_clean cyclean testclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~ R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
R-package/inst R-package/src/image_recordio.h R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz
clean: rclean mkldnn_clean cyclean testclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
Expand Down
Loading

0 comments on commit 0de4156

Please sign in to comment.