Skip to content

Commit

Permalink
Merge branch 'master' into fix_dump_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
hitsgub committed Dec 16, 2018
2 parents 8a010b6 + 0e26944 commit 7fa1b6d
Show file tree
Hide file tree
Showing 811 changed files with 71,373 additions and 4,864 deletions.
164 changes: 164 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,164 @@
version: 2
jobs:
build:
docker:
- image: ubuntu:xenial
working_directory: ~/work
steps:

- run:
name: Preparation
command: |
echo 'export WORK_DIR=~/work' >> $BASH_ENV
echo 'export REPO_DIR=~/repo' >> $BASH_ENV
echo 'export RUN_STEP="bash $REPO_DIR/chainerx_cc/scripts/ci/run-step.sh"' >> $BASH_ENV
echo 'export CHAINERX_DIR="$REPO_DIR"/chainerx_cc' >> $BASH_ENV
# To avoid warning on checkout
apt-get update
apt-get install -y git openssh-client
# Checkout
- checkout:
path: ~/repo

# Setup
- run:
name: Setup
command: |
$RUN_STEP setup
# Checkout postprocess
- run:
name: Checkout postprocess
command: |
pushd "$REPO_DIR"
if [[ -n "${CIRCLE_PULL_REQUEST}" ]]
then
# CIRCLE_PR_NUMBER is available only if PR is created from a fork (unavailable if created from a branch).
# So, manually construct it from CIRCLE_PULL_REQUEST environment variable.
CIRCLE_PR_NUMBER=$(basename "${CIRCLE_PULL_REQUEST}")
# Update PR refs for testing.
FETCH_REFS="+master:master"
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head"
FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge"
# Retrieve the refs
echo "git fetch -u origin ${FETCH_REFS}"
git fetch -u origin ${FETCH_REFS}
# Checkout master and merge PR head ref. If conflicts occur, exit with non-zero.
echo "git checkout master"
git checkout master
git config user.name 'chainerx' # need to configure something to git merge
git config user.email 'chainerx@chainerx.org'
echo "git merge --no-commit \"pr/${CIRCLE_PR_NUMBER}/head\""
git merge --no-commit "pr/${CIRCLE_PR_NUMBER}/head"
fi
popd
# Setup conda
- run:
name: Setup conda
command: |
$RUN_STEP setup_conda
# Environment info
- run:
name: Environment info
command: |
$RUN_STEP show_environment_info
# Setup conda environment
- run:
name: Setup conda environment
command: |
$RUN_STEP setup_conda_environment
# Python PEP-8 check
- run:
name: Python PEP-8 check
command: |
$RUN_STEP python_style_check
# ClangFormat
- run:
name: ClangFormat
command: |
$RUN_STEP clang_format
# cpplint
- run:
name: cpplint
command: |
$RUN_STEP cpplint
# Setup openblas
- run:
name: Setup openblas
command: |
$RUN_STEP setup_openblas
# cmake
- run:
name: cmake
command: |
$RUN_STEP cmake
# clang-tidy (normal source files)
# NOTE: We runs this only on master branch because it takes much time.
- run:
name: clang-tidy (normal source files)
command: |
if [[ "$CIRCLE_BRANCH" = "master" ]]; then
$RUN_STEP clang_tidy normal
fi
# clang-tidy (test source files)
# NOTE: We runs this only on master branch because it takes much time.
- run:
name: clang-tidy (test source files)
command: |
if [[ "$CIRCLE_BRANCH" = "master" ]]; then
$RUN_STEP clang_tidy test
fi
# make
- run:
name: make
command: |
MAKEFLAGS=-j2 $RUN_STEP make
# make install
- run:
name: make install
command: |
$RUN_STEP make_install
# C++ test
- run:
name: C++ test
command: |
$RUN_STEP ctest
# Python build
- run:
name: Python build
command: |
MAKEFLAGS=-j2 $RUN_STEP python_build
# Python test
- run:
name: Python test
command: |
$RUN_STEP python_test_chainerx_nocuda
experimental:
notify:
branches:
only:
- nightly
- master
5 changes: 1 addition & 4 deletions .gitignore
Expand Up @@ -11,7 +11,6 @@ build
.eggs/
_readthedocs_build
/TAGS
/docs/source/reference/**/generated
/tags
chainer.egg-info/
dist/
Expand All @@ -24,6 +23,4 @@ docs/my.state
docs/my_mnist.model
docs/mnist_result
docs/*.png
docs/source/reference/core
docs/source/reference/generated
docs/source/reference/util
/docs/source/**/reference/**/generated
38 changes: 27 additions & 11 deletions .travis.yml
Expand Up @@ -6,36 +6,46 @@ cache:

matrix:
include:
- os: linux
- dist: trusty
python: "2.7"
- os: linux
env:
- SKIP_CHAINERX=1
- dist: trusty
python: "3.4"
- os: linux
env:
- SKIP_CHAINERX=1
- dist: xenial
python: "3.5"
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

- os: osx
language: generic
env:
- PYTHON_VERSION=2.7.10
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
- SKIP_CHAINERX=1
if: (branch = master OR branch = v5) AND (NOT type in (pull_request))
- os: osx
language: generic
env:
- PYTHON_VERSION=3.4.4
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
- SKIP_CHAINERX=1
if: (branch = master OR branch = v5) AND (NOT type in (pull_request))
- os: osx
language: generic
env:
- PYTHON_VERSION=3.5.1
- PYENV_ROOT=~/.pyenv
- PATH=$PYENV_ROOT/shims:$PATH:$PYENV_ROOT/bin
- MATRIX_EVAL="brew install gcc5 && CC=gcc-5 && CXX=g++-5"
if: (branch = master OR branch = v5) AND (NOT type in (pull_request))

before_install:
- eval "${MATRIX_EVAL}"
# Remove oclint as it conflicts with GCC (indirect dependency of hdf5)
- if [[ $TRAVIS_OS_NAME = "osx" ]]; then
brew update >/dev/null;
Expand All @@ -54,13 +64,17 @@ install:
- pip install -U pip wheel
- pip install mpi4py
- python setup.py sdist
- pip install dist/*.tar.gz
- travis_wait pip install -U -e .[travis]
- if [[ $SKIP_CHAINERX != 1 ]]; then
export CHAINER_BUILD_CHAINERX=1;
fi
- MAKEFLAGS=-j2
pip install dist/*.tar.gz
- MAKEFLAGS=-j2
travis_wait pip install -U -e .[travis]

script:
- flake8
- autopep8 -r . --diff | tee check_autopep8
- test ! -s check_autopep8
- autopep8 -r . --diff --exit-code
# To workaround Travis issue (https://github.com/travis-ci/travis-ci/issues/7261),
# ignore DeprecationWarning raised in `site.py`.
- python -Werror::DeprecationWarning -Wignore::DeprecationWarning:site -m compileall -f -q chainer chainermn examples tests docs
Expand All @@ -70,11 +84,13 @@ script:
- (for NP in 1 2; do mpiexec -n ${NP} pytest -s -v -m 'not gpu and not slow' chainermn_tests || exit $?; done)
- popd
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
READTHEDOCS=True python setup.py develop;
python setup.py develop;
fi
- if [[ $SKIP_CHAINERX != 1 ]]; then
make -C docs html;
else
echo "Documentation build is skipped as ChainerX is not available.";
fi
- pushd docs
- make html
- popd

sudo: false

Expand Down
9 changes: 9 additions & 0 deletions MANIFEST.in
@@ -1,2 +1,11 @@
include README.md
include LICENSE

graft chainerx
include chainerx_build_helper.py
include chainerx_cc/README.txt
include chainerx_cc/LINCENSE.txt
include chainerx_cc/CMakeLists.txt
graft chainerx_cc/chainerx
graft chainerx_cc/third_party
graft chainerx_cc/cmake
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -13,6 +13,7 @@
| [**Install Guide**](https://docs.chainer.org/en/stable/install.html)
| [**Tutorial**](https://docs.chainer.org/en/stable/guides/)
| **Examples** ([Official](https://github.com/chainer/chainer/tree/master/examples), [External](https://github.com/chainer-community/awesome-chainer))
| [**ChainerX**](#chainerx)

**Forum** ([en](https://groups.google.com/forum/#!forum/chainer), [ja](https://groups.google.com/forum/#!forum/chainer-jp))
| **Slack invitation** ([en](https://bit.ly/join-chainer-slack), [ja](https://bit.ly/join-chainer-jp-slack))
Expand Down Expand Up @@ -61,6 +62,11 @@ Any contributions to Chainer are welcome!
If you want to file an issue or send a pull request, [please follow the contribution guide](https://docs.chainer.org/en/stable/contribution.html).


## ChainerX

See this [separate user guide](chainerx.md) for how to build and run Chainer with ChainerX.


## License

MIT License (see `LICENSE` file).
Expand All @@ -79,3 +85,10 @@ Chainer: a Next-Generation Open Source Framework for Deep Learning,
*Proceedings of Workshop on Machine Learning Systems(LearningSys) in
The Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS)*, (2015)
[URL](http://learningsys.org/papers/LearningSys_2015_paper_33.pdf), [BibTex](chainer_bibtex.txt)


Akiba, T., Fukuda, K. and Suzuki, S.,
ChainerMN: Scalable Distributed Deep Learning Framework,
*Proceedings of Workshop on ML Systems in
The Thirty-first Annual Conference on Neural Information Processing Systems (NIPS)*, (2017)
[URL](http://learningsys.org/nips17/assets/papers/paper_25.pdf), [BibTex](chainermn_bibtex.txt)

0 comments on commit 7fa1b6d

Please sign in to comment.