"include/vscode:/vscode.git/clone" did not exist on "483a9bbad23adecf8db9b77c9f2caa69080ecf7e"
Commit 548cec82 authored by Jeff Daily's avatar Jeff Daily
Browse files

Merge branch 'master' into rocm3

parents 2f7bd8ef 5dbfcdc4
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE file in the project root for * Licensed under the MIT License. See LICENSE file in the project root for
* license information. * license information.
*/ */
#ifndef LIGHTGBM_UTILS_LOG_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_LOG_H_
#define LIGHTGBM_UTILS_LOG_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_LOG_H_
#include <cstdarg> #include <cstdarg>
#include <cstdio> #include <cstdio>
...@@ -182,4 +182,4 @@ class Log { ...@@ -182,4 +182,4 @@ class Log {
}; };
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_UTILS_LOG_H_ #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_LOG_H_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_OPENMP_WRAPPER_H_
#define LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_OPENMP_WRAPPER_H_
#include <LightGBM/export.h> #include <LightGBM/export.h>
...@@ -132,6 +132,4 @@ class ThreadExceptionHelper { ...@@ -132,6 +132,4 @@ class ThreadExceptionHelper {
#endif #endif
#endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_OPENMP_WRAPPER_H_
#endif /* LIGHTGBM_OPENMP_WRAPPER_H_ */
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_UTILS_PIPELINE_READER_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_PIPELINE_READER_H_
#define LIGHTGBM_UTILS_PIPELINE_READER_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_PIPELINE_READER_H_
#include <LightGBM/utils/file_io.h> #include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
...@@ -68,4 +68,4 @@ class PipelineReader { ...@@ -68,4 +68,4 @@ class PipelineReader {
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_UTILS_PIPELINE_READER_H_ #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_PIPELINE_READER_H_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_UTILS_RANDOM_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_RANDOM_H_
#define LIGHTGBM_UTILS_RANDOM_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_RANDOM_H_
#include <cstdint> #include <cstdint>
#include <random> #include <random>
...@@ -114,4 +114,4 @@ class Random { ...@@ -114,4 +114,4 @@ class Random {
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_UTILS_RANDOM_H_ #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_RANDOM_H_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_UTILS_TEXT_READER_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_TEXT_READER_H_
#define LIGHTGBM_UTILS_TEXT_READER_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_TEXT_READER_H_
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/pipeline_reader.h> #include <LightGBM/utils/pipeline_reader.h>
...@@ -356,4 +356,4 @@ class TextReader { ...@@ -356,4 +356,4 @@ class TextReader {
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_UTILS_TEXT_READER_H_ #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_TEXT_READER_H_
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE file in the project root for * Licensed under the MIT License. See LICENSE file in the project root for
* license information. * license information.
*/ */
#ifndef LIGHTGBM_UTILS_THREADING_H_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_THREADING_H_
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
...@@ -197,4 +197,4 @@ class ParallelPartitionRunner { ...@@ -197,4 +197,4 @@ class ParallelPartitionRunner {
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_UTILS_THREADING_H_ #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_THREADING_H_
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
*/ */
#ifndef YAMC_ALTERNATE_SHARED_MUTEX_HPP_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_ALTERNATE_SHARED_MUTEX_HPP_
#define YAMC_ALTERNATE_SHARED_MUTEX_HPP_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_ALTERNATE_SHARED_MUTEX_HPP_
#include <cassert> #include <cassert>
#include <chrono> #include <chrono>
...@@ -209,4 +209,4 @@ using shared_timed_mutex = basic_shared_timed_mutex<YAMC_RWLOCK_SCHED_DEFAULT>; ...@@ -209,4 +209,4 @@ using shared_timed_mutex = basic_shared_timed_mutex<YAMC_RWLOCK_SCHED_DEFAULT>;
} // namespace alternate } // namespace alternate
} // namespace yamc } // namespace yamc
#endif #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_ALTERNATE_SHARED_MUTEX_HPP_
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
*/ */
#ifndef YAMC_RWLOCK_SCHED_HPP_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_RWLOCK_SCHED_HPP_
#define YAMC_RWLOCK_SCHED_HPP_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_RWLOCK_SCHED_HPP_
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef>
...@@ -146,4 +146,4 @@ struct WriterPrefer { ...@@ -146,4 +146,4 @@ struct WriterPrefer {
} // namespace rwlock } // namespace rwlock
} // namespace yamc } // namespace yamc
#endif #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_RWLOCK_SCHED_HPP_
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
*/ */
#ifndef YAMC_SHARED_LOCK_HPP_ #ifndef LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_SHARED_LOCK_HPP_
#define YAMC_SHARED_LOCK_HPP_ #define LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_SHARED_LOCK_HPP_
#include <cassert> #include <cassert>
#include <chrono> #include <chrono>
...@@ -194,4 +194,4 @@ void swap(yamc::shared_lock<Mutex>& lhs, ...@@ -194,4 +194,4 @@ void swap(yamc::shared_lock<Mutex>& lhs,
} // namespace std } // namespace std
#endif #endif // LIGHTGBM_INCLUDE_LIGHTGBM_UTILS_YAMC_YAMC_SHARED_LOCK_HPP_
...@@ -30,7 +30,7 @@ If you would like your AMD or Intel CPU to act like a GPU (for testing and debug ...@@ -30,7 +30,7 @@ If you would like your AMD or Intel CPU to act like a GPU (for testing and debug
you can install `AMD APP SDK <https://github.com/microsoft/LightGBM/releases/download/v2.0.12/AMD-APP-SDKInstaller-v3.0.130.135-GA-windows-F-x64.exe>`_ on **Windows** and `PoCL <https://portablecl.org>`_ on **Linux**. you can install `AMD APP SDK <https://github.com/microsoft/LightGBM/releases/download/v2.0.12/AMD-APP-SDKInstaller-v3.0.130.135-GA-windows-F-x64.exe>`_ on **Windows** and `PoCL <https://portablecl.org>`_ on **Linux**.
Many modern Linux distributions provide packages for PoCL, look for ``pocl-opencl-icd`` on Debian-based distributions and ``pocl`` on RedHat-based distributions. Many modern Linux distributions provide packages for PoCL, look for ``pocl-opencl-icd`` on Debian-based distributions and ``pocl`` on RedHat-based distributions.
For **Windows** users, `VC runtime <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>`_ is needed if **Visual Studio** is not installed. For **Windows** users, `VC runtime <https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist>`_ is needed if **Visual Studio** is not installed.
For **macOS** users, the **OpenMP** library is needed. For **macOS** users, the **OpenMP** library is needed.
You can install it by the following command: ``brew install libomp``. You can install it by the following command: ``brew install libomp``.
...@@ -346,7 +346,7 @@ To check that a contribution to the package matches its style expectations, run ...@@ -346,7 +346,7 @@ To check that a contribution to the package matches its style expectations, run
.. code:: sh .. code:: sh
bash .ci/run-pre-commit-mypy.sh pre-commit run --all-files
To run the tests locally and compute test coverage, install the Python package using one of the options mentioned above. To run the tests locally and compute test coverage, install the Python package using one of the options mentioned above.
Then run the following from the root of the repo. Then run the following from the root of the repo.
......
...@@ -16,13 +16,16 @@ ...@@ -16,13 +16,16 @@
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/text_reader.h>
#include <string>
#include <chrono> #include <chrono>
#include <cstdio> #include <cstdio>
#include <ctime> #include <ctime>
#include <fstream> #include <fstream>
#include <memory>
#include <sstream> #include <sstream>
#include <string>
#include <unordered_map>
#include <utility> #include <utility>
#include <vector>
#include "predictor.hpp" #include "predictor.hpp"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_PREDICTOR_HPP_ #ifndef LIGHTGBM_SRC_APPLICATION_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_ #define LIGHTGBM_SRC_APPLICATION_PREDICTOR_HPP_
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
...@@ -299,4 +299,4 @@ class Predictor { ...@@ -299,4 +299,4 @@ class Predictor {
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_PREDICTOR_HPP_ #endif // LIGHTGBM_SRC_APPLICATION_PREDICTOR_HPP_
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_BOOSTING_BAGGING_HPP_ #ifndef LIGHTGBM_SRC_BOOSTING_BAGGING_HPP_
#define LIGHTGBM_BOOSTING_BAGGING_HPP_ #define LIGHTGBM_SRC_BOOSTING_BAGGING_HPP_
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -293,4 +293,4 @@ class BaggingSampleStrategy : public SampleStrategy { ...@@ -293,4 +293,4 @@ class BaggingSampleStrategy : public SampleStrategy {
} // namespace LightGBM } // namespace LightGBM
#endif // LIGHTGBM_BOOSTING_BAGGING_HPP_ #endif // LIGHTGBM_SRC_BOOSTING_BAGGING_HPP_
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
*/ */
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
#include <memory>
#include <string>
#include "dart.hpp" #include "dart.hpp"
#include "gbdt.h" #include "gbdt.h"
#include "rf.hpp" #include "rf.hpp"
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_ #ifndef LIGHTGBM_SRC_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_ #define LIGHTGBM_SRC_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_
#ifdef USE_CUDA #ifdef USE_CUDA
...@@ -62,4 +62,4 @@ class CUDAScoreUpdater: public ScoreUpdater { ...@@ -62,4 +62,4 @@ class CUDAScoreUpdater: public ScoreUpdater {
#endif // USE_CUDA #endif // USE_CUDA
#endif // LIGHTGBM_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_ #endif // LIGHTGBM_SRC_BOOSTING_CUDA_CUDA_SCORE_UPDATER_HPP_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_BOOSTING_DART_H_ #ifndef LIGHTGBM_SRC_BOOSTING_DART_HPP_
#define LIGHTGBM_BOOSTING_DART_H_ #define LIGHTGBM_SRC_BOOSTING_DART_HPP_
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
...@@ -208,4 +208,4 @@ class DART: public GBDT { ...@@ -208,4 +208,4 @@ class DART: public GBDT {
}; };
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_BOOSTING_DART_H_ #endif // LIGHTGBM_SRC_BOOSTING_DART_HPP_
...@@ -12,10 +12,16 @@ ...@@ -12,10 +12,16 @@
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/sample_strategy.h> #include <LightGBM/sample_strategy.h>
#include <algorithm>
#include <chrono> #include <chrono>
#include <ctime> #include <ctime>
#include <memory>
#include <queue> #include <queue>
#include <sstream> #include <sstream>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace LightGBM { namespace LightGBM {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #ifndef LIGHTGBM_SRC_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_SRC_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h> #include <LightGBM/objective_function.h>
...@@ -621,4 +621,4 @@ class GBDT : public GBDTBase { ...@@ -621,4 +621,4 @@ class GBDT : public GBDTBase {
}; };
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_BOOSTING_GBDT_H_ #endif // LIGHTGBM_SRC_BOOSTING_GBDT_H_
...@@ -8,8 +8,11 @@ ...@@ -8,8 +8,11 @@
#include <LightGBM/utils/array_args.h> #include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <algorithm>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <unordered_map>
#include <utility>
#include <vector> #include <vector>
#include "gbdt.h" #include "gbdt.h"
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include <LightGBM/prediction_early_stop.h> #include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <unordered_map>
#include "gbdt.h" #include "gbdt.h"
namespace LightGBM { namespace LightGBM {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment