Skip to content

Commit 880aa22

Browse files
committed
Add inline and bit manipulation in CpuId.h
2 parents 917c9cc + 1adc6a2 commit 880aa22

File tree

789 files changed

+4078
-4369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

789 files changed

+4078
-4369
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ build/
99
.pydevproject
1010
Makefile
1111
.test_env/
12+
13+
*~
14+
bazel-*

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- repo: https://github.com/reyoung/mirrors-yapf.git
77
sha: v0.13.2
88
hooks:
9-
- id: yapf
9+
- id: yapf
10+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ # Bazel BUILD files follow Python syntax.
1011
- repo: https://github.com/pre-commit/pre-commit-hooks
1112
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
1213
hooks:

.travis.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ os:
88
env:
99
- JOB=DOCS
1010
- JOB=BUILD_AND_TEST
11+
- JOB=PRE_COMMIT
1112
matrix:
1213
exclude:
1314
- os: osx
14-
env: JOB=DOCS # Only generate documentation in linux
15+
env: JOB=DOCS # Only generate documentation in linux.
16+
- os: osx
17+
env: JOB=PRE_COMMIT # Only check pre-commit hook in linux
1518

1619
addons:
1720
apt:
@@ -39,18 +42,23 @@ addons:
3942
- lcov
4043
- graphviz
4144
- swig
45+
- clang-format-3.8
4246
before_install:
4347
- |
4448
if [ ${JOB} == "BUILD_AND_TEST" ]; then
45-
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
46-
then
47-
echo "Only markdown docs were updated, stopping build process."
48-
exit
49+
local change_list=`git diff --name-only $TRAVIS_COMMIT_RANGE`
50+
if [ $? -eq 0 ]; then # if git diff return no zero, then rerun unit test.
51+
if ! echo ${change_list} | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
52+
then
53+
echo "Only markdown docs were updated, stopping build process."
54+
exit
55+
fi
4956
fi
5057
fi
5158
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
5259
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
53-
- pip install wheel protobuf sphinx breathe recommonmark virtualenv numpy sphinx_rtd_theme
60+
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
61+
- pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit
5462
script:
5563
- paddle/scripts/travis/main.sh
5664
notifications:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ include(coveralls)
6969
find_package(Git REQUIRED)
7070
# version.cmake will get the current PADDLE_VERSION
7171
include(version)
72-
add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\")
72+
add_definitions(-DPADDLE_VERSION=${PADDLE_VERSION})
7373

7474
if(NOT WITH_GPU)
7575
add_definitions(-DPADDLE_ONLY_CPU)

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
22

33
Apache License
44
Version 2.0, January 2004
@@ -188,7 +188,7 @@ Copyright (c) 2016 Baidu, Inc. All Rights Reserved
188188
same "printed page" as the copyright notice for easier
189189
identification within third-party archives.
190190

191-
Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
191+
Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
192192

193193
Licensed under the Apache License, Version 2.0 (the "License");
194194
you may not use this file except in compliance with the License.

WORKSPACE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# External dependency to Google protobuf.
2+
http_archive(
3+
name="protobuf",
4+
url="http://github.com/google/protobuf/archive/v3.1.0.tar.gz",
5+
sha256="0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7",
6+
strip_prefix="protobuf-3.1.0", )
7+
8+
# External dependency to gtest 1.7.0. This method comes from
9+
# https://www.bazel.io/versions/master/docs/tutorial/cpp.html.
10+
new_http_archive(
11+
name="gtest",
12+
url="https://github.com/google/googletest/archive/release-1.7.0.zip",
13+
sha256="b58cb7547a28b2c718d1e38aee18a3659c9e3ff52440297e965f5edffe34b6d0",
14+
build_file="third_party/gtest.BUILD",
15+
strip_prefix="googletest-release-1.7.0", )

benchmark/tensorflow/rnn/run_multi.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ test 4 2 256 512
2525
test 4 2 512 128
2626
test 4 2 512 256
2727
test 4 2 512 512
28-

cmake/check_packages.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ if(WITH_DOC)
3030
find_package(Sphinx REQUIRED)
3131
find_package(Doxygen REQUIRED)
3232
find_python_module(recommonmark REQUIRED)
33-
find_python_module(breathe REQUIRED)
3433
endif()
3534

3635
if(WITH_SWIG_PY)

demo/gan/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Then you can run the command below. The flag -d specifies the training data (cif
1010
$python gan_trainer.py -d cifar --use_gpu 1
1111

1212
The generated images will be stored in ./cifar_samples/
13-
The corresponding models will be stored in ./cifar_params/
13+
The corresponding models will be stored in ./cifar_params/

demo/gan/data/download_cifar.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -15,4 +15,3 @@ set -e
1515
wget https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
1616
tar zxf cifar-10-python.tar.gz
1717
rm cifar-10-python.tar.gz
18-

0 commit comments

Comments
 (0)