Skip to content

Commit

Permalink
* Add CUDA-enabled build for MXNet via -gpu extension (pull #609)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitstormFA authored and saudet committed Sep 27, 2018
1 parent 9723868 commit 4fe8952
Show file tree
Hide file tree
Showing 7 changed files with 321 additions and 45 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,10 @@ matrix:
env: PROJ=caffe OS=linux-x86_64 EXT=-gpu
install: true
script: ./ci/install-travis.sh
- os: linux
env: PROJ=mxnet OS=linux-x86_64 EXT=-gpu
install: true
script: ./ci/install-travis.sh
- os: linux
env: PROJ=tensorflow OS=linux-x86_64 EXT=-gpu
install: true
Expand All @@ -744,6 +748,11 @@ matrix:
env: PROJ=caffe OS=macosx-x86_64 EXT=-gpu
install: true
script: ./ci/install-travis.sh
- os: osx
osx_image: xcode8.3
env: PROJ=mxnet OS=macosx-x86_64 EXT=-gpu
install: true
script: ./ci/install-travis.sh
- os: osx
osx_image: xcode8.3
env: PROJ=tensorflow OS=macosx-x86_64 EXT=-gpu
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Add CUDA-enabled build for MXNet via `-gpu` extension ([pull #609](https://github.com/bytedeco/javacpp-presets/pull/609))
* Prevent MKL-DNN from compiling code with `-march=native` ([pull #618](https://github.com/bytedeco/javacpp-presets/pull/618))
* Add an RPATH to `libmkldnn.so.0` to avoid loading issues on Linux ([issue deeplearning4j/deeplearning4j#6366](https://github.com/deeplearning4j/deeplearning4j/issues/6366))
* Fix logic in `tensorflow.Tensor.createIndexer()` to support scalar tensors
Expand Down
243 changes: 223 additions & 20 deletions mxnet/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -201,46 +201,51 @@
See the License for the specific language governing permissions and
limitations under the License.

=======================================================================
======================================================================================
Apache MXNET (incubating) Subcomponents:

The Apache MXNET (incubating) project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.

========================================================================
=======================================================================================
Apache-2.0 licenses
========================================================================
=======================================================================================

The following components are provided under an Apache 2.0 license.

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
5. dlpack - For details, see, dlpack/LICENSE
6. dmlc-core - For details, see, dmlc-core/LICENSE
7. mshadow - For details, see, mshadow/LICENSE
8. nnvm/dmlc-core - For details, see, nnvm/dmlc-core/LICENSE
9. nnvm - For details, see, nnvm/LICENSE
10. nnvm-fusion - For details, see, nnvm/plugin/nnvm-fusion/LICENSE
11. ps-lite - For details, see, ps-lite/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


=======================================================================================
MIT licenses
========================================================================
=======================================================================================

1. Fast R-CNN - For details, see example/rcnn/LICENSE
2. Faster R-CNN - For details, see example/rcnn/LICENSE
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


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

1. Warp-CTC
1. Moderngpu
For details, see, src/operator/contrib/ctc_include/contrib/moderngpu/LICENSE

/******************************************************************************
Expand Down Expand Up @@ -269,7 +274,7 @@
******************************************************************************/

2. CUB Library
For details, see, cub/LICENSE.TXT
For details, see, 3rdparty/cub/LICENSE.TXT

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -293,10 +298,9 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


========================================================================
=======================================================================================
Other Licenses
========================================================================
=======================================================================================

1. Caffe
For details, see, example/rcnn/LICENSE
Expand Down Expand Up @@ -329,6 +333,7 @@
or otherwise, the contributor releases their content to the
license and copyright terms herein.

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

2. MS COCO API
For details, see, example/rcnn/LICENSE
Expand Down Expand Up @@ -357,3 +362,201 @@
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.

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

3. Sphinx JavaScript utilties for the full-text search
For details, see, docs/_static/searchtools_custom.js

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.

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.

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

4. FindCrypto.cmake
For details, see, 3rdparty/dmlc-core/cmake/Modules/FindCrypto.cmake,
Redistribution and use is allowed according to the terms of the BSD license.

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

5. Googlemock
For details, see, 3rdparty/googletest/googlemock/LICENSE

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.

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

6. Googletest
For details, see, 3rdparty/googletest/googletest/LICENSE

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.

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

7. OpenMP Testsuite
For details, see, 3rdparty/openmp/testsuite/LICENSE

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

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

o 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.

o Neither the name of the University of Houston System 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.

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

8. Semaphore implementation in blockingconcurrentqueue.h
This file uses a semaphore implementation under the terms of its separate zlib license.
For details, see, 3rdparty/dmlc-core/include/dmlc/blockingconcurrentqueue.h

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

9. blockingconcurrentqueue.h
This file is Distributed under the terms of the simplified BSD license.
For details, see, 3rdparty/dmlc-core/include/dmlc/blockingconcurrentqueue.h

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

10. concurrentqueue.h
This file is Distributed under the terms of the simplified BSD license.
For details, see, 3rdparty/dmlc-core/include/dmlc/concurrentqueue.h

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

11. ONNX Export module
For details, see, python/mxnet/contrib/onnx/_export/LICENSE

# 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.
#
# Based on
# https://github.com/NVIDIA/mxnet_to_onnx/blob/master/mx2onnx_converter/#
# Copyright (c) 2017, NVIDIA CORPORATION. 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 NVIDIA CORPORATION 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 ``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.


29 changes: 29 additions & 0 deletions mxnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,35 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<artifactId>mxnet-platform</artifactId>
<version>1.3.0-1.4.3-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies required to use CUDA and cuDNN -->
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>mxnet</artifactId>
<version>1.3.0-1.4.3-SNAPSHOT</version>
<classifier>linux-x86_64-gpu</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>mxnet</artifactId>
<version>1.3.0-1.4.3-SNAPSHOT</version>
<classifier>macosx-x86_64-gpu</classifier>
</dependency>

<!-- Additional dependencies to use bundled CUDA and cuDNN -->
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>cuda</artifactId>
<version>10.0-7.3-1.4.3-SNAPSHOT</version>
<classifier>linux-x86_64-redist</classifier>
</dependency>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>cuda</artifactId>
<version>10.0-7.3-1.4.3-SNAPSHOT</version>
<classifier>macosx-x86_64-redist</classifier>
</dependency>

</dependencies>
</project>
```
Expand Down
Loading

0 comments on commit 4fe8952

Please sign in to comment.