-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance optimizations for Intel CPUs (#3957)
* Initial performance optimizations for xgboost * remove includes * revert float->double * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * fix for CI * Check existence of _mm_prefetch and __builtin_prefetch * Fix lint
- Loading branch information
1 parent
dade7c3
commit 5f151c5
Showing
7 changed files
with
145 additions
and
43 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 |
---|---|---|
|
@@ -91,3 +91,4 @@ lib/ | |
metastore_db | ||
|
||
plugin/updater_gpu/test/cpp/data | ||
/include/xgboost/build_config.h |
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,7 @@ | ||
#ifndef XGBOOST_BUILD_CONFIG_H_ | ||
#define XGBOOST_BUILD_CONFIG_H_ | ||
|
||
#cmakedefine XGBOOST_MM_PREFETCH_PRESENT | ||
#cmakedefine XGBOOST_BUILTIN_PREFETCH_PRESENT | ||
|
||
#endif // XGBOOST_BUILD_CONFIG_H_ |
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,20 @@ | ||
/*! | ||
* Copyright (c) 2018 by Contributors | ||
* \file build_config.h | ||
* \brief Fall-back logic for platform-specific feature detection. | ||
* \author Hyunsu Philip Cho | ||
*/ | ||
#ifndef XGBOOST_BUILD_CONFIG_H_ | ||
#define XGBOOST_BUILD_CONFIG_H_ | ||
|
||
/* default logic for software pre-fetching */ | ||
#if (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) || defined(__INTEL_COMPILER) | ||
// Enable _mm_prefetch for Intel compiler and MSVC+x86 | ||
#define XGBOOST_MM_PREFETCH_PRESENT | ||
#define XGBOOST_BUILTIN_PREFETCH_PRESENT | ||
#elif defined(__GNUC__) | ||
// Enable __builtin_prefetch for GCC | ||
#define XGBOOST_BUILTIN_PREFETCH_PRESENT | ||
#endif | ||
|
||
#endif // XGBOOST_BUILD_CONFIG_H_ |
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