Skip to content

Commit

Permalink
Master (#1)
Browse files Browse the repository at this point in the history
* refine sparse momentum api and unittest (PaddlePaddle#126)

* refine sparse momentum api and unittest
* fix unittests bug

* Remove main function in some unittest.

* Update Mac OS X port
* follow comments to fix bugs

* Revise some word in build doc

* Add automatic check AVX in CMake (PaddlePaddle#145)

* Add automatic check AVX in CMake
* Revise table format and some words in build docs

* Fix cmake/FindAVX.cmake

* Update build docs (PaddlePaddle#148)

* Add automatic check AVX in CMake

* Add indent in FindAVX.cmake

* Revise table format and some words in build docs

* Update build docs

* Fix bug when only support AVX 2 (PaddlePaddle#150)

In some situation, for instance, in the virtual machine, it could happen.

* add scripts to build ubuntu install package. (PaddlePaddle#132)

* also refine install docs, too

* some bug fix for sparse matrix (PaddlePaddle#133)

* some bug fix for sparse matrix

* a minor bug fix

* Update build docs (PaddlePaddle#149)

* Add automatic check AVX in CMake

* Add indent in FindAVX.cmake

* Revise table format and some words in build docs

* Update build docs

* Update build docs

* [DOC CHANGE] Rerange Build docs & emphasize them in README.md (PaddlePaddle#151)

* Rerange Build docs & emphasize them in README.md

* Rerange Build docs & emphasize them in README.md

* Update Readme (PaddlePaddle#153)

* Update Readme

* Update readme

* Update readme

* Fix  CUDA_VERSION Comparsion (PaddlePaddle#165)

* Update readme (PaddlePaddle#155)

* Update readme

* Apache 2.0

* add interface and test of RecurrentGradientMachine (PaddlePaddle#156)

* add interface and unittest of RecurrentGradientMachine for the function of multiple Subsequence inlinks with unequal token length

* bug fix for dataprovider for quick start inference (PaddlePaddle#168)

* Support MAC OS Sierra (PaddlePaddle#169)

* typo in image classification demo (PaddlePaddle#167)

* support rectangle padding, stride, window and input for PoolProjection (PaddlePaddle#115)

* support rectangle padding, stride, window and input for PoolProjection

* Follow comments.
1. Remove start
2. refine img_pool_a/b.conf for test_NetworkCompare
3. Split unit test

* Modify the test in img_layers.py

* Use C++ 11 atomic_flag in MacOS as spin lock (PaddlePaddle#175)

* Use C++ 11 atomic_flag in MacOS as spin lock
* Add unittest for it.

* Read git sha1 when building Paddle, and add it to PADDLE_VERSION macro

* save the model file including git sha1

* add weight for cost layer interface (PaddlePaddle#177)

* Should not compile the two files if -DWITH_AVX=OFF. (PaddlePaddle#163)

* If cmake -DWITH_AVX=OFF during configuration, should not compile the file src/hl_math.cc and src/hl_avx_functions.cc.

* Add travis for osx (PaddlePaddle#189)

* set MKL search path with intel64 (PaddlePaddle#188)

* Mnist demo (PaddlePaddle#162)

* added mnist demo

* modified .gitignore for .project files

* normalize pixel in mnist_provider.py and set use_gpu=0

* add interface and unittest for nce layer (PaddlePaddle#180)

* add interface and unittest for nce layer

* follow comments

* Merge internal changes (PaddlePaddle#198)

* fix DataProvider create function args bug

Change-Id: I9e3a1c535c805bf30204a14aea8d5143ff534784

* remove PserverForPython.h which is not used

Change-Id: I2b27f1f3c11a42766a92fc689f0f5f1f73ee1d70

* add internal document script

Change-Id: Ia0fec79456caea0b271f9903cc13e8a3d32e0774

* hierarchical rnn document, add new config example (PaddlePaddle#106)

* hierarchical rnn document, add new config example

* update inputs_type of label

* add check for unsupported config

* refine hierarchical document

* refine doc title

* update docs, fix paddle to PaddlePaddle

* follow comments

* remove some copyfrom in AgentLayer and ExpandLayer, fix warning in seq2seq config (PaddlePaddle#183)

* remove redundant HPPL_TYPE_DOUBLE (PaddlePaddle#200)

* add cost_type constraint to weighted_cost interface (PaddlePaddle#206)

* remove unmerged internal documents (PaddlePaddle#205)

* Add FAQ (PaddlePaddle#128)

* Init commit for doing FAQ

* Add speed up training

* Add graphviz to ci

* Add shared paramter

* Tiny refine

* Fix bug in yield dictionary in DataProvider. (PaddlePaddle#197)

* Fix bug in yield dictionary in DataProvider.
* Also make virtualenv work in Paddle.

* Update docker_instll.rst docker image name (PaddlePaddle#210)

* Fix sparse training for trainer_count=1 (PaddlePaddle#204)

* Fix sparse training for trainer_count=1

For trainer_count=1, the gradient machine is NeuralNetwork, which does not create parameter buf for PARAMETER_GRADIENT for sparse update in Parameter::enableType. But gradient parameter buf is still used in SgdThreadUpdater.

* Minor update to comment

* Supplement doc for RNN (PaddlePaddle#214)

* Speed up PyDP2, support numpy.float array (PaddlePaddle#207)

* fix bug in some different python environment (PaddlePaddle#220)

* Fix install_docker.rst and data_sources file open mode

* Follow PaddlePaddle#223
* Fix PaddlePaddle#222

* add base class for seqlastin/max/average layer (PaddlePaddle#187)

* Added Bidi-LSTM and DB-LSTM to quick_start demo (PaddlePaddle#226)

* add missing layer_attr (PaddlePaddle#234)

* fix build bug in gcc46 (PaddlePaddle#236)

* error in doc of quick_start (PaddlePaddle#228)

* fix error in doc of quick_start
* There are some warning when execute preprocess.sh

* add maxout layer, including interface and unittest (PaddlePaddle#229)

* add maxout layer, including interface and unittest

* follow maxout comments

* auto setting channels

* fix unittest bug in test_RecurrentGradientMachine

* remove deprecated start input in img_pool_layer (PaddlePaddle#237)

* Fix dataprovider converter for sparse data

* FIx check type unmatch in MaxOutLayer (PaddlePaddle#242)

Compiled failed on gcc 4.6

* Sequence tagging demo (PaddlePaddle#225)

* Update contribute_to_paddle.md (PaddlePaddle#248)

* add input sparse data check for sparse layer at runtime (PaddlePaddle#247)

* add input sparse data check for sparse layer at runtime,
to avoid invalid data access at pserver end while doing prefetch

* remote sparse design support binary sparse and float saprse both

* Python trainer api (PaddlePaddle#193)

* Python trainer API and demo

* Adding missing PaddleAPIPrivate.h

* Adding api_train.sh

* More comments

* Bump up patch version to 0b3

* Change contribute to paddle to fit new branching model (PaddlePaddle#275)

* Change contribute to paddle to fit new branching model

* set test_period default value to 0 (PaddlePaddle#279)

* Make Paddle --save_dir support a directory name  (PaddlePaddle#277)

* Also fix PaddlePaddle#243

* fix interface bug of block_expand_layer and add unittest (PaddlePaddle#265)

* fix interface bug of block_expand_layer and add unittest

* auto compute num_channels

* default value of num_channels is None

* adjust input order of block_expand

* Support empty Param Block in ParameterSever (PaddlePaddle#244)

* Because in cluster maybe use a lot machine to train a model, and some parameter size could be too small for ParameterServer. Then some of pservers could not have any ParamBlock.
* Also, because ports_num or ports_num_for_sparse is too large, then give a warning in runtime.

* Add bilinear interpolation layer

* fix type unmatch on gcc

* Adding an introduction doc for Paddle to implement simplest linear regression.

* Add default cuda system path (PaddlePaddle#192)

* DYLD_LIBRARY_PATH is disable after Mac OS X 10.11
* fix clang + gpu compile error on Mac OS
* fix some words and errors in build docs

* Add glog header path to include (PaddlePaddle#295)

* add SpatialPyramidPoolLayer c++ support

* Add job=time in trainer, refine cudnn_conv to reduce gpu memory and speed up training. (PaddlePaddle#218)

* Add benchmark for PaddlePaddle, tensorflow and caffe

* ConvProjection to reduce memory for goolenet

* Add unit test for ConvProjection.
1. unit test in test_LayerGrad.
2. compare the ConvPorjection and CudnnConvLayer, also compare the concat_layer+img_conv_layer and concat_layer_conv_projection.

* Reduce cudnn_conv memory and add benchmark document.
1. Use TmpMatrix as the workspace in cudnn_conv to reduce gpu memory. It reduce lots of memory.
2. Add benchmark document.
3. fix smallnet_mnist_cifar.py in paddle.

* Add job=time and refine cudnn_conv to reduce gpu memroy and speed up

* Refine cudnn_conv and shared biases operation in concat_layer and mixed_layer.

* follow comments

* follow comments

* Use unique_ptr to prevent memory leaks in CudnnConvLayer.

* Add some concepts documents to guide user for using paddle (PaddlePaddle#249)

* reuse code of PoolProjection in PoolProjectionLayer

* Add How to build docs (PaddlePaddle#312)

* Bug fix in CudnnConvLayer, which will lead to destruction error. (PaddlePaddle#317)

* Fix a bug in testOnePeriod. (PaddlePaddle#322)

* Forget to finishTestPeriod in testOnePeriod.
* Fix PaddlePaddle#318

* add user_arg to LayerConfig (PaddlePaddle#315)

* install the right python package version (PaddlePaddle#326)

For multiple installation of paddle, there might be multiple versions of python package at opt/paddle/share/wheels/. We should install the right version.
Ideally, we should remove the wrong versions when install. But it's not easy to do this with cmake.

Change-Id: Ida8a8d60643ad9e42cf1c85776de9122d5ba1392

* Add matrix inverse (PaddlePaddle#240)

* Add matrix inverse

* report error when use parallel_nn to train recurrent_nn model (PaddlePaddle#335)

* install the right python package version (PaddlePaddle#340)

For multiple installation of paddle, there might be multiple versions of python package at opt/paddle/share/wheels/. We should install the right version.
Ideally, we should remove the wrong versions when install. But it's not easy to do this with cmake.

Change-Id: Ida8a8d60643ad9e42cf1c85776de9122d5ba1392

* Fix minor errors in instructions of building Paddle on Mac OS X (PaddlePaddle#347)

* Fix bug and redundant code in hl_dso_loader.cc (PaddlePaddle#306)

* Fix glog check type unmatch in Util.cpp (PaddlePaddle#353)

* Fix glog check type unmatch in Util.cpp

PaddlePaddle#352

* Add code coverage and coveralls (PaddlePaddle#296)

* Add Issue template to guide user submit good issue (PaddlePaddle#354)

* Add issue template

* Update ISSUE_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Rename

* Rename

* Typo

* Typo

* Typo

* Typo

* Follow comments

* Follow comments

* Add elementwise math operations (PaddlePaddle#343)

* Add elementwise math operations
This allows use to use expressions like: y=log(1+exp(x))
Also added unittests for ActivationFunction
* Enforce keyword arguments for non-positional arguments
* Add LogActivation to doc

* include mkl_lapacke.h (PaddlePaddle#359)

* Update ISSUE_TEMPLATE.md (PaddlePaddle#357)

* add rdma cmake support (PaddlePaddle#284)

* add rdma cmake support

* move rdma related code to rdma.cmake

* using find_package for swig (PaddlePaddle#334)

* Use diff to compare config unittest (PaddlePaddle#363)

Fix PaddlePaddle#342

* Fix SRL hang when exit. (PaddlePaddle#291)

* Fix SRL hang when exit.

* Error occurred when enable Async Load in TestDataProvider.
  * It because DataProvider is calling getNextBatchInternal in one thread, and destructing DataProvider in other thread.
  * Add wait routine in DataProvider destructing.
* Also fix another bug, when destructing TestDataProvider and do not read any test data.

Fix PaddlePaddle#286

* Follow comments, Use mutex is cool!

* Follow comments

* Add img_size for unit test

* Fix bilinear interp bug

* revert flags.cmake

* Replace outputH to batchSize

* Follow comments

* Revise one word in ISSUE_TEMPLATE.md (PaddlePaddle#371)

* abstract outputSize function in CNN-related layers (PaddlePaddle#314)

* Add define for double getrf, getri (PaddlePaddle#381)

* Add SumCost

This allows user to implement any type of cost by summing over the output of non-cost layers.

Change-Id: Ic55aaabbf0c1299e70b8e48a0effcc91f8f5bd29

* Add sum_cost to document

And rebase

Change-Id: I7ea234b3aa8fc70675af15d91db08242c43fb5ff

* Remove Mac OS X build docs (PaddlePaddle#386)

Currently, Paddle on Mac OS X is not deliberate testing through the different versions of  Mac OS X and Clang.
When all these things that we've done, we will reopen Mac build docs.

* add python wrap for sppLayer

* Cancelling Travis build with docs updates only. (PaddlePaddle#372)

* fix deadlink in Chinese quick start doc. (PaddlePaddle#389)

* add python-related unittest problem in faq document (PaddlePaddle#377)

* Fix macOS quick start preprocess script. (PaddlePaddle#390)

* Use `gshuf` instead of `shuf` in macOS
* Fix PaddlePaddle#388

* fix floating-point overflow problem of tanh (PaddlePaddle#355)

* py_paddle link zlib(PaddlePaddle#393)

* enable swig unittest in travis-ci (PaddlePaddle#394)

* Init

* Add numpy deps

* Refine

* fix some nvcc compile options (PaddlePaddle#392)

* Follow comments

* modify the format of diff information in protostr (PaddlePaddle#398)

* Fix minior bug
* add patch does not trigger travis ci

* follow comments

* Fix Travis Ci does not build when push patches (PaddlePaddle#399)

* add getSize method for PoolProjection

* Make matrix well-conditioned when unittest inverse

* Implement setDiag() with BaseMatrix::assign()

* Follow comments

* follow comments

* Update FindAVX.cmake (PaddlePaddle#404)

* make AVX_FOUND is default value to WITH AVX
* let AVX_FLAG always keep -mavx flag since compiler can build binary with -mavx even CPU does not support avx.

* some tiny fixs (PaddlePaddle#406)

* some tiny fixs

* use VLOG(3)

* [Work in Progress] Update cluster_train.md (PaddlePaddle#391)

Update cluster_train.md for easier understanding

* Fix memory leak in image classification demo, which is caused by dataprovider (PaddlePaddle#323)

* the memory leak is inside one pass.

* Update

* Delelte old protostr

* Follow comments

* add some code comments for SppLayer

* Update

* Fix a bug

* initial take on deconv layers

* added convTrans test and python components

* added more test on convTrans layer and comments

* Refactor ExpandConvTransLayer to share codes with ExpandConvLayer

* refactored ExpandConvLayer and ExpandConvTransLayer with ConvBaseLayerCpu

* fixed a bug in refactoring ExpandConv/TransLayer

* add another small test in test_LayerGrad for convTransLayer

* Revised deconv implementations according to luotao1

* rebase deconv implementation with develop branch and resolve conflicts with pull#218 commit 45c81a4

* deconv layer implementation modification following luotao1 comments

* fix a small bug in ConvTransLayerBase in config_parser.py

* deconv implementation mionr changes in ConvBaseLayer.cpp and config_parser.py

* minor changes on deconv per luotao1 comments

* Refactored imageSize in ConvBaseLayer to MathUtil

* minor change to convTransLayer test in test_LayerGrad

* minor changes on deconv implementation and add protostr test for deconv layer

* fixed a bug in parse_conv in config_parser.py

* Generate bilinear protostr via Linux

* set mixedlayer output size according to input operator (PaddlePaddle#414)

* set mixedlayer output size according to input operator
* change from num_channel to num_channels for conv_operator (the old one is
really misleading because all the others are num_channels)

* also changed the arg name in projections.py

* change the act.name for LinearActivation() to "linear" so that it won't
fail in hl_activetype; also fix the hasinputsset in submodel

* Revise code

* use yapf to format python code, add style config file

* Add checkout name for Dockerfile

* Because in dockerhub, we cannot set the `docker build `running
  directory, we could only use `git clone` command to get the latest
  code if we put `Dockerfile` in subdirectory

* But the `git clone` will checkout the default branch only, so here
  we add a `ENV` in Dockerfile to checkout special branch or tag in
  git repo. We could change it to `V0.9.0` tag when it release.

* '*' operator overload for LayerOutput

Making '*' support the multiplication between a scalar and LayerOutput

Also changing '+' to support adding between a vector and a scalar.

Change-Id: I7daf35590dc2b2f855a29d9ef43ac57979442e0f

* change hlactivetype instead of act.name

* fix bug in sum_cost

* fix test_layerHelpers unittest error

* change python code style to pep8

* Fix bug in multple objects in define_py_sources

* Add unittest for split datasource

* Fix PaddlePaddle#436

* multi_binary_cross_entropy when ids vector is provided

* copy the data when createSparseMatrix

* format python code in demo, doc, doc_cn and paddle directories

* format python code in python directory

* modifications according to comments

* Add pre-commit config file.

* Add yapf hook to format python code.
* Add Remove CRLF

* Update pre-commit-config

* Check all files by pre commit hooks

* Bug fix in testing mode.

* Refine clang-format for Paddle style

* fix url of sub-pages

* added resnet lstm architecture from GNMT

* modify document directory structure in model config helpers

* Revert "fix url of sub-pages"

* Add ScalingProjection

out = w * input
where w is a parameter of size 1

Change-Id: Ife682d62323ceb1a20cbbf6269421b20a862d888

* Fix unittest

Change-Id: Ic80845c892c96c37a0df0ddc433fe1aeaa5a9d1c

* Fix forwardTest for ids in python swig.

* unittest need to be added. But fix the bugs first.

* Bumping up version number to v0.9.0a0

* Fix some problems in Debian build scripts.

* Mount local Paddle instead of git clone from remote.
* Use official chinese ubuntu source instead of 163 mirror.

* Update dockerfile tags

* Add version check for paddle

* Refine ver2num function, add comments

* Fix Debian package name in ubuntu install docs.

* Fix PaddlePaddle#486

* Change demo datafile location by using CDN in baidu.

* merge bugfix PaddlePaddle#593 and # 597 from develop branch

* Bumping up version number

* Add Release notes

* Refine documentation in RELEASE.md

* fix dead link for quick start

* update

* Fix Travis-CI build for release

* Remove typo in documentation.

* fix typo
  • Loading branch information
sanylcs authored Dec 21, 2016
1 parent 819fa2f commit eb530f7
Show file tree
Hide file tree
Showing 591 changed files with 31,403 additions and 12,582 deletions.
5 changes: 2 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
# The document of clang-format is
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# TODO(yuyang18): Add python and other language code style
---
Language: Cpp
BasedOnStyle: Google
IndentWidth: 2
TabWidth: 2
ContinuationIndentWidth: 4
AccessModifierOffset: -2 # The private/protected/public has no indent in class
PointerAlignment: Left # int* p/int& p, not int *p/int &p
Standard: Cpp11
AllowAllParametersOfDeclarationOnNextLine: true
BinPackParameters: false
BinPackArguments: false
...

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
*.DS_Store
build/
*.user

.vscode
.idea
.project
.cproject
.pydevproject
Makefile
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: c25201a00e6b0514370501050cf2a8538ac12270
hooks:
- id: remove-crlf
- repo: https://github.com/reyoung/mirrors-yapf.git
sha: v0.13.2
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: 4ef03c4223ad322c7adaa6c6c0efb26b57df3b71
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
# TODO(yuyang): trailing whitespace has some bugs on markdown
# files now, please not add it to pre-commit hook now
# - id: trailing-whitespace
#
# TODO(yuyang): debug-statements not fit for Paddle, because
# not all of our python code is runnable. Some are used for
# documenation
# - id: debug-statements
3 changes: 3 additions & 0 deletions .style.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[style]
based_on_style = pep8
column_limit = 80
59 changes: 59 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
language: cpp
cache: ccache
sudo: required
dist: trusty
os:
- linux
- osx
env:
- JOB=DOCS
- JOB=BUILD_AND_TEST
matrix:
exclude:
- os: osx
env: JOB=DOCS # Only generate documentation in linux

addons:
apt:
packages:
- gcc-4.8
- g++-4.8
- wget
- git
- build-essential
- libatlas-base-dev
- python
- python-pip
- python2.7-dev
- m4
- libprotobuf-dev
- doxygen
- protobuf-compiler
- python-protobuf
- python-numpy
- python-wheel
- libgoogle-glog-dev
- libgflags-dev
- libgtest-dev
- curl
- lcov
- graphviz
- swig
before_install:
- |
if [ ${JOB} == "BUILD_AND_TEST" ]; then
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)'
then
echo "Only markdown docs were updated, stopping build process."
exit
fi
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
- pip install wheel protobuf 'sphinx==1.4.9' breathe recommonmark virtualenv numpy
script:
- paddle/scripts/travis/main.sh
notifications:
email:
on_success: change
on_failure: always
66 changes: 53 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ cmake_minimum_required(VERSION 2.8)

project(paddle CXX C)
set(PADDLE_MAJOR_VERSION 0)
set(PADDLE_MINOR_VERSION 8)
set(PADDLE_PATCH_VERSION 0b)
set(PADDLE_MINOR_VERSION 9)
set(PADDLE_PATCH_VERSION 0)
set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATCH_VERSION})

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set(PROJ_ROOT ${CMAKE_SOURCE_DIR})
include(package)
include(swig)
find_package(SWIG 2.0)
find_package(CUDA QUIET)
find_package(Protobuf REQUIRED)
find_package(PythonLibs 2.7 REQUIRED)
find_package(PythonInterp 2.7 REQUIRED)
find_package(NumPy)
find_package(ZLIB REQUIRED)
find_package(NumPy REQUIRED)
find_package(Threads REQUIRED)
find_package(AVX QUIET)
find_package(Glog)
find_package(Gflags QUIET)
find_package(GTest)
Expand All @@ -27,7 +29,7 @@ find_program(M4_EXECUTABLE m4)
option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" ON)
option(WITH_GPU "Compile PaddlePaddle with gpu" ${CUDA_FOUND})
option(WITH_DOUBLE "Compile PaddlePaddle with double precision, otherwise use single precision" OFF)
option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ON) # TODO(yuyang18): Check AVX is supported or not as default value
option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ${AVX_FOUND})
option(WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON)
option(WITH_STYLE_CHECK "Style Check for PaddlePaddle" ${PYTHONINTERP_FOUND})
option(WITH_RDMA "Compile PaddlePaddle with rdma support" OFF)
Expand All @@ -37,6 +39,10 @@ option(WITH_TIMER "Compile PaddlePaddle use timer" OFF)
option(WITH_TESTING "Compile and run unittest for PaddlePaddle" ${GTEST_FOUND})
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
option(WITH_SWIG_PY "Compile PaddlePaddle with py PaddlePaddle prediction api" ${SWIG_FOUND})
option(ON_TRAVIS "Running test on travis-ci or not." OFF)
option(ON_COVERALLS "Generating code coverage data on coveralls or not." OFF)
option(COVERALLS_UPLOAD "Uploading the generated coveralls json." ON)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel"
Expand All @@ -46,11 +52,16 @@ endif()
include(enableCXX11)
include(cpplint)
include(ccache)
if(WITH_RDMA)
include(rdma)
endif()
include(util)
include(flags)
include(cudnn)
include(FindPythonModule)
include(check_packages)
include(swig)
include(coveralls)

# add PaddlePaddle version
if(DEFINED ENV{PADDLE_VERSION})
Expand All @@ -62,6 +73,19 @@ else()
Subversion_WC_INFO(${PROJ_ROOT} Project)
add_definitions(-DPADDLE_VERSION=${Project_WC_REVISION})
endif()
elseif(EXISTS ${PROJ_ROOT}/.git/)
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format=%H
WORKING_DIRECTORY ${PROJ_ROOT}
OUTPUT_VARIABLE GIT_SHA1
RESULT_VARIABLE GIT_RESULT
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ${GIT_RESULT})
add_definitions(-DPADDLE_VERSION=\"${GIT_SHA1}\")
else()
message(WARNING "Cannot add paddle version from git tag")
endif()
endif()
endif()

Expand All @@ -71,11 +95,24 @@ if(NOT WITH_GPU)
add_definitions(-DHPPL_STUB_FUNC)
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
else()
if(${CUDA_VERSION_MAJOR} GREATER 6)
if(COMPILER_SUPPORT_CXX11)
LIST(APPEND CUDA_NVCC_FLAGS -std=c++11)
endif()
endif()

# TODO(yuyang18): Change it to remove std=c++11 in cuda compile.
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
if(NOT CUDNN_FOUND)
message(FATAL_ERROR "Paddle need cudnn to compile")
endif()
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-g -O3 --use_fast_math")

if(WITH_AVX)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${AVX_FLAG}")
else(WITH_AVX)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}")
endif(WITH_AVX)

if(WITH_DSO)
set(CUDA_LIBRARIES "")
Expand All @@ -88,7 +125,7 @@ else()
endif(NOT WITH_GPU)

if(WITH_DOUBLE)
add_definitions(-DPADDLE_TYPE_DOUBLE -DHPPL_TYPE_DOUBLE)
add_definitions(-DPADDLE_TYPE_DOUBLE)
set(ACCURACY double)
else(WITH_DOUBLE)
set(ACCURACY float)
Expand All @@ -99,11 +136,11 @@ if(NOT WITH_TIMER)
endif(NOT WITH_TIMER)

if(WITH_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${AVX_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${AVX_FLAG}")
else(WITH_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE3_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE3_FLAG}")
endif(WITH_AVX)

if(WITH_PYTHON)
Expand All @@ -113,12 +150,15 @@ else(WITH_PYTHON)
add_definitions(-DPADDLE_NO_PYTHON)
endif(WITH_PYTHON)

if(NOT WITH_RDMA)
add_definitions(-DPADDLE_DISABLE_RDMA)
endif()
if(WITH_RDMA)
include_directories("${RDMA_INC_DIR}")
else(WITH_RDMA)
add_definitions(-DPADDLE_DISABLE_RDMA)
endif(WITH_RDMA)

if(WITH_GLOG)
add_definitions(-DPADDLE_USE_GLOG)
include_directories(${LIBGLOG_INCLUDE_DIR})
endif()

if(WITH_GFLAGS)
Expand Down
14 changes: 14 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Thank you for contributing to PaddlePaddle. Submitting an issue is a great help for us.
Both Chinese and English issues are welcome.

It's hard to solve a problem when important details are missing.
Before submitting the issue, look over the following criteria before handing your request in.

- [ ] Was there a similar issue submitted or resolved before ? You could search issue in the github.
- [ ] Did you retrieve your issue from widespread search engines ?
- [ ] Is my description of the issue clear enough to reproduce this problem?
* If some errors occurred, we need details about `how do you run your code?`, `what system do you use?`, `Are you using GPU or not?`, etc.
* If you use an recording [asciinema](https://asciinema.org/) to show what you are doing to make it happen, that's awesome! We could help you solve the problem more quickly.
- [ ] Is my description of the issue use the github markdown correctly?
* Please use the proper markdown syntaxes for styling all forms of writing, e.g, source code, error information, etc.
* Check out [this page](https://guides.github.com/features/mastering-markdown/) to find out much more about markdown.
74 changes: 41 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,67 @@
# PaddlePaddle

Welcome to the PaddlePaddle GitHub.

The software will be released on Sept. 30 with full documentation and installation support.
[![Build Status](https://travis-ci.org/baidu/Paddle.svg?branch=master)](https://travis-ci.org/baidu/Paddle)
[![Coverage Status](https://coveralls.io/repos/github/baidu/Paddle/badge.svg?branch=develop)](https://coveralls.io/github/baidu/Paddle?branch=develop)
[![Join the chat at https://gitter.im/PaddlePaddle/Deep_Learning](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PaddlePaddle/Deep_Learning?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)

A pre-release version is available now for those who are eager to take a look.
Welcome to the PaddlePaddle GitHub.

PaddlePaddle (PArallel Distributed Deep LEarning) is an easy-to-use,
efficient, flexible and scalable deep learning platform, which is originally
developed by Baidu scientists and engineers for the purpose of applying deep
learning to many products at Baidu.

Our vision is to enable deep learning for everyone via PaddlePaddle.
Please refer to our [release announcement](https://github.com/baidu/Paddle/releases) to track the latest feature of PaddlePaddle.

## Features

- **Flexibility**

PaddlePaddle supports a wide range of neural network architectures and
optimization algorithms. It is easy to configure complex models such as
neural machine translation model with attention mechanism or complex memory
connection.
PaddlePaddle supports a wide range of neural network architectures and
optimization algorithms. It is easy to configure complex models such as
neural machine translation model with attention mechanism or complex memory
connection.

- **Efficiency**

In order to unleash the power of heterogeneous computing resource,
optimization occurs at different levels of PaddlePaddle, including
computing, memory, architecture and communication. The following are some
examples:
1. Optimized math operations through SSE/AVX intrinsics, BLAS libraries
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
2. Highly optimized recurrent networks which can handle **variable-length**
sequence without padding.
3. Optimized local and distributed training for models with high dimensional
sparse data.
In order to unleash the power of heterogeneous computing resource,
optimization occurs at different levels of PaddlePaddle, including
computing, memory, architecture and communication. The following are some
examples:

- Optimized math operations through SSE/AVX intrinsics, BLAS libraries
(e.g. MKL, ATLAS, cuBLAS) or customized CPU/GPU kernels.
- Highly optimized recurrent networks which can handle **variable-length**
sequence without padding.
- Optimized local and distributed training for models with high dimensional
sparse data.

- **Scalability**

With PaddlePaddle, it is easy to use many CPUs/GPUs and machines to speed
up your training. PaddlePaddle can achieve high throughput and performance
via optimized communication.
With PaddlePaddle, it is easy to use many CPUs/GPUs and machines to speed
up your training. PaddlePaddle can achieve high throughput and performance
via optimized communication.

- **Connected to Products**

In addition, PaddlePaddle is also designed to be easily deployable. At Baidu,
PaddlePaddle has been deployed into products or service with a vast number
of users, including ad click-through rate (CTR) prediction, large-scale image
classification, optical character recognition(OCR), search ranking, computer
virus detection, recommendation, etc. It is widely utilized in products at
Baidu and it has achieved a significant impact. We hope you can also exploit
the capability of PaddlePaddle to make a huge impact for your product.
In addition, PaddlePaddle is also designed to be easily deployable. At Baidu,
PaddlePaddle has been deployed into products or service with a vast number
of users, including ad click-through rate (CTR) prediction, large-scale image
classification, optical character recognition(OCR), search ranking, computer
virus detection, recommendation, etc. It is widely utilized in products at
Baidu and it has achieved a significant impact. We hope you can also exploit
the capability of PaddlePaddle to make a huge impact for your product.

## Installation
See [Installation Guide](http://paddlepaddle.org/doc/build/) to install from pre-built package or build from the source code. (Note: The installation packages are still in pre-release state and your experience of installation may not be smooth.).

Check out the [Install Guide](http://paddlepaddle.org/doc/build/) to install from
pre-built packages (**docker image**, **deb package**) or
directly build on **Linux** and **Mac OS X** from the source code.

## Documentation
- [Chinese Documentation](http://paddlepaddle.org/doc_cn/) <br>
Both [English Docs](http://paddlepaddle.org/doc/) and [Chinese Docs](http://paddlepaddle.org/doc_cn/) are provided for our users and developers.

- [Quick Start](http://paddlepaddle.org/doc/demo/quick_start/index_en) <br>
You can follow the quick start tutorial to learn how use PaddlePaddle
Expand All @@ -80,9 +88,9 @@ See [Installation Guide](http://paddlepaddle.org/doc/build/) to install from pre
- [Source Code Documents](http://paddlepaddle.org/doc/source/) <br>

## Ask Questions

If you want to ask questions and discuss about methods and models, welcome
to send email to paddle-dev@baidu.com. Framework development discussions and
Please join the [**gitter chat**](https://gitter.im/PaddlePaddle/Deep_Learning) or send email to
**paddle-dev@baidu.com** to ask questions and talk about methods and models.
Framework development discussions and
bug reports are collected on [Issues](https://github.com/baidu/paddle/issues).

## Copyright and License
Expand Down
Loading

0 comments on commit eb530f7

Please sign in to comment.