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

Commit

Permalink
revert to 8f80fe3
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham committed Sep 11, 2018
1 parent 6132aa2 commit 7248f35
Show file tree
Hide file tree
Showing 129 changed files with 3,578 additions and 6,645 deletions.
107 changes: 92 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,108 @@
sudo: true
sudo: false

language: cpp

cache: ccache

os:
# - linux
- osx

osx_image: xcode9.4
osx_image: xcode8

env:
# code analysis
# - TASK=lint
# build mxnet.so with CUDA
# - TASK=build
# run tests/cpp
- TASK=cpp_test
# run tests/python
- TASK=python_test
- TASK=r_test
# - TASK=julia JULIA_VER=0.4
# - TASK=scala_test

# TODO, R test, distributed test, clang, more g++ versions

matrix:
include:
- # os: linux
# dist: trusty
# env: TASK=perl_test
- os: osx
## sudo is required because
## prexexisting packages conflict
## with new ones.
## would be nice to have macports
## on travis osx, it has all needed perl packages
sudo: required
env: TASK=perl_test
# env: TASK=julia JULIA_VER=0.4
# - os: linux
# env: TASK=build
# - os: linux
# env: TASK=cpp_test
# - os: linux
# env: TASK=python_test
# - os: linux
# env: TASK=r_test
# - os: linux
# env: TASK=scala_test

# dependent apt packages
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- doxygen
- wget
- git
- libcurl4-openssl-dev
- unzip
- libatlas-dev
- libopencv-dev
- gcc-4.8
- g++-4.8
- python-numpy
- python-nose
- python3-numpy
- python3-dev
- python3-nose
- python-h5py
- python3-h5py
- graphviz
- libmouse-perl
- pdl
- cpanminus
- swig
- libgraphviz-perl

before_install:
- export NVCC_PREFIX=${HOME}
- source dmlc-core/scripts/travis/travis_setup_env.sh
- export PYTHONPATH=${PYTHONPATH}:${PWD}/python
- export MAVEN_SKIP_RC=true
- export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -XX:-UseGCOverheadLimit -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"

install:
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
- source ci/travis/install.sh

# We build with 2 concurrent jobs to match the number of cores present on MacOS virutal machines.
# nproc does not report the correct number of cores reliably in Travis, so using nproc is not
# recommended.
# https://docs.travis-ci.com/user/reference/overview/
- source tests/travis/setup.sh

script:
- export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
- mv make/osx.mk config.mk
- make -j 2
- tests/travis/run_test.sh

cache:
directories:
- ${HOME}/.cache/usr

before_cache:
- dmlc-core/scripts/travis/travis_before_cache.sh

after_failure:
- tests/travis/travis_after_failure.sh

notifications:
# Emails are sent to the committer's git-configured email address by default,
email:
on_success: change
on_failure: always
#slack: dmlc:NmroCzntCiWOuxUZpii40USd
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated from 5fec9a to 290226
1 change: 0 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,3 @@ List of Contributors
* [Aaron Markham](https://github.com/aaronmarkham)
* [Sam Skalicky](https://github.com/samskalicky)
* [Per Goncalves da Silva](https://github.com/perdasilva)
* [Cheng-Che Lee](https://github.com/stu1130)
6 changes: 1 addition & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -900,10 +900,6 @@ core_logic: {
}
}
},
/* Disabled due to master build failure:
* http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/master/1221/pipeline/
* https://github.com/apache/incubator-mxnet/issues/11801
'dist-kvstore tests CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/it-dist-kvstore') {
Expand All @@ -915,7 +911,7 @@ core_logic: {
}
}
}
}, */
},
'Scala: GPU': {
node(NODE_LINUX_GPU) {
ws('workspace/ut-scala-gpu') {
Expand Down
22 changes: 10 additions & 12 deletions R-package/R/initializer.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @param name the name of the variable.
#' @param shape the shape of the array to be generated.
#'
mx.init.internal.default <- function(name, shape, ctx, allow.unknown = FALSE) {
mx.init.internal.default <- function(name, shape, ctx, allow.unknown=FALSE) {
if (endsWith(name, "bias")) return (mx.nd.zeros(shape))
if (endsWith(name, "gamma")) return (mx.nd.ones(shape))
if (endsWith(name, "beta")) return (mx.nd.zeros(shape))
Expand All @@ -19,7 +19,7 @@ mx.init.internal.default <- function(name, shape, ctx, allow.unknown = FALSE) {
#'
#' @export
mx.init.uniform <- function(scale) {
function(name, shape, ctx, allow.unknown = FALSE) {
function(name, shape, ctx, allow.unknown=FALSE) {
if (!endsWith(name, "weight")) {
return (mx.init.internal.default(name = name, shape = shape, allow.unknown = allow.unknown))
}
Expand All @@ -33,7 +33,7 @@ mx.init.uniform <- function(scale) {
#'
#' @export
mx.init.normal <- function(sd) {
function(name, shape, ctx, allow.unknown = FALSE) {
function(name, shape, ctx, allow.unknown=FALSE) {
if (!endsWith(name, "weight")) {
return (mx.init.internal.default(name = name, shape = shape, allow.unknown = allow.unknown))
}
Expand All @@ -59,15 +59,15 @@ mx.init.Xavier <- function(rnd_type = "uniform", factor_type = "avg",
return (mx.init.internal.default(name = name, shape = shape, allow.unknown = allow.unknown))
}

fan_out <- shape[length(shape)]
fan_in <- prod(shape[-length(shape)])
fan_out = shape[length(shape)]
fan_in = prod(shape[-length(shape)])
factor_val <- switch(factor_type,
"avg" = (fan_in + fan_out) / 2,
"in" = fan_in,
"out" = fan_out,
stop("Not supported factor type. See usage of function mx.init.Xavier"))

scale <- sqrt(magnitude / factor_val)
scale = sqrt(magnitude / factor_val)

if (rnd_type == "uniform"){
return(mx.nd.random.uniform(low = -scale, high = scale, shape = shape))
Expand All @@ -83,16 +83,14 @@ mx.init.Xavier <- function(rnd_type = "uniform", factor_type = "avg",
#' Create initialization of argument like arg.array
#'
#' @param initializer The initializer.
#' @param shape.array A named list that represents the shape of the weights
#' @param shape.array named-list The shape of the weights
#' @param ctx mx.context The context of the weights
#' @param skip.unknown Whether skip the unknown weight types
#' @export
mx.init.create <- function(initializer, shape.array, ctx = NULL, skip.unknown = TRUE) {
mx.init.create <- function(initializer, shape.array, ctx=NULL, skip.unknown=TRUE) {
if (length(shape.array) == 0) return(list())
names <- names(shape.array)
ret <- lapply(
seq_along(names),
function(i) initializer(names[[i]], shape.array[[i]], ctx, allow.unknown = skip.unknown))
names = names(shape.array)
ret <- lapply(seq_along(names), function(i) initializer(names[[i]], shape.array[[i]], ctx, allow.unknown=skip.unknown))
names(ret) <- names
if (skip.unknown) {
ret <- mx.util.filter.null(ret)
Expand Down
5 changes: 1 addition & 4 deletions ci/docker/install/tensorrt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ apt-get install -y automake libtool
git clone --recursive -b 3.5.1.1 https://github.com/google/protobuf.git
cd protobuf
./autogen.sh
./configure --disable-shared CXXFLAGS=-fPIC
./configure
make -j$(nproc)
make install
rm -rf /usr/local/lib/libprotobuf-lite.so*
rm -rf /usr/local/lib/libprotobuf.so*
rm -rf /usr/local/lib/libprotoc.so*
ldconfig
popd

Expand Down
4 changes: 2 additions & 2 deletions ci/docker/install/ubuntu_mklml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# the whole docker cache for the image

set -ex
wget -q --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz
tar -zxf /tmp/mklml.tgz && cp -rf mklml_*/* /usr/local/ && rm -rf mklml_*
wget --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.14/mklml_lnx_2018.0.3.20180406.tgz
tar -zxvf /tmp/mklml.tgz && cp -rf mklml_*/* /usr/local/ && rm -rf mklml_*
14 changes: 7 additions & 7 deletions ci/docker/install/ubuntu_tvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ cd tvm
# This is a stable tag that support MXNet TVM bridge.
# We use this since support for mxnet bridge just checked
# into master and there is yet a version tag
git checkout v0.4

cp cmake/config.cmake .
echo set\(USE_CUDA /usr/local/cuda\) >> config.cmake
echo set\(USE_LLVM llvm-config-5.0\) >> config.cmake
echo set\(USE_RPC ON\) >> config.cmake
echo set\(USE_GRAPH_RUNTIME ON\) >> config.cmake
git checkout 30eaf463e34d7c301357c31a010945d11df16537

cp make/config.mk
echo USE_CUDA=1 >> config.mk
echo LLVM_CONFIG=llvm-config-5.0 >> config.mk
echo USE_RPC=1 >> config.mk
echo USE_GRAPH_RUNTIME=1 >> config.mk
echo CUDA_PATH=/usr/local/cuda >> config.mk
make -j$(nproc)

cd python
Expand Down
1 change: 0 additions & 1 deletion ci/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import os
import contextlib
import logging
import requests

def get_mxnet_root() -> str:
Expand Down
20 changes: 10 additions & 10 deletions docs/_static/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(document).ready(function () {
function label(lbl) {
return lbl.replace(/[ .]/g, '-').toLowerCase();
}

function urlSearchParams(searchString) {
let urlDict = new Map();
let searchParams = searchString.substring(1).split("&");
Expand Down Expand Up @@ -45,11 +45,11 @@ $(document).ready(function () {
showContent();
if (window.location.href.indexOf("/install/index.html") >= 0) {
if (versionSelect.indexOf(defaultVersion) >= 0) {
history.pushState(null, null, 'index.html?platform=' + platformSelect + '&language=' + languageSelect + '&processor=' + processorSelect);
history.pushState(null, null, '/install/index.html?platform=' + platformSelect + '&language=' + languageSelect + '&processor=' + processorSelect);
} else {
history.pushState(null, null, 'index.html?version=' + versionSelect + '&platform=' + platformSelect + '&language=' + languageSelect + '&processor=' + processorSelect);
history.pushState(null, null, '/install/index.html?version=' + versionSelect + '&platform=' + platformSelect + '&language=' + languageSelect + '&processor=' + processorSelect);
}
}
}
}

function showContent() {
Expand All @@ -73,22 +73,22 @@ $(document).ready(function () {
$('.current-version').html( $(this).text() + ' <span class="caret"></span></button>' );
if ($(this).text().indexOf(defaultVersion) < 0) {
if (window.location.search.indexOf("version") < 0) {
history.pushState(null, null, 'index.html' + window.location.search.concat( '&version=' + $(this).text() ));
history.pushState(null, null, '/install/index.html' + window.location.search.concat( '&version=' + $(this).text() ));
} else {
history.pushState(null, null, 'index.html' + window.location.search.replace( urlParams.get('version'), $(this).text() ));
history.pushState(null, null, '/install/index.html' + window.location.search.replace( urlParams.get('version'), $(this).text() ));
}
} else if (window.location.search.indexOf("version") >= 0) {
history.pushState(null, null, 'index.html' + window.location.search.replace( 'version', 'prev' ));
history.pushState(null, null, '/install/index.html' + window.location.search.replace( 'version', 'prev' ));
}
}
else if ($(this).hasClass("platforms")) {
history.pushState(null, null, 'index.html' + window.location.search.replace( urlParams.get('platform'), $(this).text() ));
history.pushState(null, null, '/install/index.html' + window.location.search.replace( urlParams.get('platform'), $(this).text() ));
}
else if ($(this).hasClass("languages")) {
history.pushState(null, null, 'index.html' + window.location.search.replace( urlParams.get('language'), $(this).text() ));
history.pushState(null, null, '/install/index.html' + window.location.search.replace( urlParams.get('language'), $(this).text() ));
}
else if ($(this).hasClass("processors")) {
history.pushState(null, null, 'index.html' + window.location.search.replace( urlParams.get('processor'), $(this).text() ));
history.pushState(null, null, '/install/index.html' + window.location.search.replace( urlParams.get('processor'), $(this).text() ));
}
showContent();
//window.location.search = window.location.search.replace( urlParams.get('version'), $(this).text() );
Expand Down
8 changes: 4 additions & 4 deletions docs/_static/searchtools_custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* 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
Expand Down Expand Up @@ -523,7 +523,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.md.txt',
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
Expand Down
11 changes: 0 additions & 11 deletions docs/api/clojure/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
# MXNet - Clojure API

MXNet supports the Clojure programming language. The MXNet Clojure package brings flexible and efficient GPU
computing and state-of-art deep learning to Clojure. It enables you to write seamless tensor/matrix computation with multiple GPUs in Clojure. It also lets you construct and customize the state-of-art deep learning models in Clojure, and apply them to tasks, such as image classification and data science challenges.

See the [MXNet Clojure API Documentation](docs/index.html) for detailed API information.

```eval_rst
.. toctree::
:maxdepth: 1
kvstore.md
module.md
ndarray.md
symbol_in_pictures.md
symbol.md
```

## Tensor and Matrix Computations
You can perform tensor or matrix computation in pure Clojure:
Expand Down
14 changes: 0 additions & 14 deletions docs/api/index.md

This file was deleted.

Loading

0 comments on commit 7248f35

Please sign in to comment.