-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '12b619343b0e8e35cda6335f8230c4168277b8dd'
- Loading branch information
Showing
270 changed files
with
5,977 additions
and
2,534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
*.DS_Store | ||
build/ | ||
*.user | ||
|
||
.vscode | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
language: cpp | ||
cache: ccache | ||
sudo: required | ||
dist: trusty | ||
env: | ||
- JOB=DOCS | ||
- JOB=BUILD_AND_TEST | ||
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 | ||
before_install: | ||
- pip install wheel protobuf sphinx breathe recommonmark | ||
- sudo paddle/scripts/travis/before_install.sh | ||
script: | ||
- paddle/scripts/travis/main.sh | ||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This file is use to check all support level of AVX on your machine | ||
# so that PaddlePaddle can unleash the vectorization power of muticore. | ||
|
||
INCLUDE(CheckCXXSourceRuns) | ||
|
||
SET(FIND_AVX_10) | ||
SET(FIND_AVX_20) | ||
SET(AVX_FLAGS) | ||
SET(AVX_FOUND) | ||
|
||
# Check AVX 2 | ||
SET(CMAKE_REQUIRED_FLAGS) | ||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
SET(CMAKE_REQUIRED_FLAGS "-mavx2") | ||
ELSEIF(MSVC AND NOT CMAKE_CL_64) # reserve for WINDOWS | ||
SET(CMAKE_REQUIRED_FLAGS "/arch:AVX2") | ||
ENDIF() | ||
|
||
CHECK_CXX_SOURCE_RUNS(" | ||
#include <immintrin.h> | ||
int main() | ||
{ | ||
__m256i a = _mm256_set_epi32 (-1, 2, -3, 4, -1, 2, -3, 4); | ||
__m256i result = _mm256_abs_epi32 (a); | ||
return 0; | ||
}" FIND_AVX_20) | ||
|
||
# Check AVX | ||
SET(CMAKE_REQUIRED_FLAGS) | ||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
SET(CMAKE_REQUIRED_FLAGS "-mavx") | ||
ELSEIF(MSVC AND NOT CMAKE_CL_64) | ||
SET(CMAKE_REQUIRED_FLAGS "/arch:AVX") | ||
endif() | ||
|
||
CHECK_CXX_SOURCE_RUNS(" | ||
#include <immintrin.h> | ||
int main() | ||
{ | ||
__m256 a = _mm256_set_ps (-1.0f, 2.0f, -3.0f, 4.0f, -1.0f, 2.0f, -3.0f, 4.0f); | ||
__m256 b = _mm256_set_ps (1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f); | ||
__m256 result = _mm256_add_ps (a, b); | ||
return 0; | ||
}" FIND_AVX_10) | ||
|
||
IF(${FIND_AVX_20}) | ||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
SET(AVX_FLAGS "${AVX_FLAGS} -mavx2") | ||
ELSEIF(MSVC) | ||
SET(AVX_FLAGS "${AVX_FLAGS} /arch:AVX2") | ||
ENDIF() | ||
ENDIF() | ||
|
||
IF(${FIND_AVX_10}) | ||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
SET(AVX_FLAGS "${AVX_FLAGS} -mavx") | ||
ELSEIF(MSVC) | ||
SET(AVX_FLAGS "${AVX_FLAGS} /arch:AVX") | ||
ENDIF() | ||
ENDIF() | ||
|
||
IF("${FIND_AVX_10}" OR "${FIND_AVX_20}") | ||
SET(AVX_FOUND TRUE) | ||
MESSAGE(STATUS "Find CPU supports ${AVX_FLAGS}.") | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.