Commit 2e98916f authored by Jeff Daily's avatar Jeff Daily
Browse files

apply reviewer suggestions

parent 1b550a7a
/*! /*!
* Copyright(C) 2023 Advanced Micro Devices, Inc. All rights reserved. * Copyright(C) 2023 Advanced Micro Devices, Inc. All rights reserved.
*/ */
#pragma once #ifndef LIGHTGBM_CUDA_CUDA_ROCM_INTEROP_H_
#define LIGHTGBM_CUDA_CUDA_ROCM_INTEROP_H_
#ifdef USE_CUDA #ifdef USE_CUDA
...@@ -63,3 +64,5 @@ static inline constexpr int WARP_SIZE_INTERNAL() { ...@@ -63,3 +64,5 @@ static inline constexpr int WARP_SIZE_INTERNAL() {
#endif #endif
#endif // USE_CUDA #endif // USE_CUDA
#endif // LIGHTGBM_CUDA_CUDA_ROCM_INTEROP_H_
...@@ -144,7 +144,7 @@ class CUDASingleGPUTreeLearner: public SerialTreeLearner { ...@@ -144,7 +144,7 @@ class CUDASingleGPUTreeLearner: public SerialTreeLearner {
} // namespace LightGBM } // namespace LightGBM
#else // USE_CUDA || USE_ROCM #else // USE_CUDA
// When GPU support is not compiled in, quit with an error message // When GPU support is not compiled in, quit with an error message
...@@ -155,7 +155,7 @@ class CUDASingleGPUTreeLearner: public SerialTreeLearner { ...@@ -155,7 +155,7 @@ class CUDASingleGPUTreeLearner: public SerialTreeLearner {
#pragma warning(disable : 4702) #pragma warning(disable : 4702)
explicit CUDASingleGPUTreeLearner(const Config* tree_config, const bool /*boosting_on_cuda*/) : SerialTreeLearner(tree_config) { explicit CUDASingleGPUTreeLearner(const Config* tree_config, const bool /*boosting_on_cuda*/) : SerialTreeLearner(tree_config) {
Log::Fatal("CUDA Tree Learner was not enabled in this build.\n" Log::Fatal("CUDA Tree Learner was not enabled in this build.\n"
"Please recompile with CMake option -DUSE_CUDA=1 or -DUSE_ROCM=1"); "Please recompile with CMake option -DUSE_CUDA=1 (NVIDIA GPUs) or -DUSE_ROCM=1 (AMD GPUs)");
} }
}; };
......
...@@ -216,7 +216,7 @@ class SerialTreeLearner: public TreeLearner { ...@@ -216,7 +216,7 @@ class SerialTreeLearner: public TreeLearner {
std::vector<score_t, boost::alignment::aligned_allocator<score_t, 4096>> ordered_gradients_; std::vector<score_t, boost::alignment::aligned_allocator<score_t, 4096>> ordered_gradients_;
/*! \brief hessians of current iteration, ordered for cache optimized, aligned to 4K page */ /*! \brief hessians of current iteration, ordered for cache optimized, aligned to 4K page */
std::vector<score_t, boost::alignment::aligned_allocator<score_t, 4096>> ordered_hessians_; std::vector<score_t, boost::alignment::aligned_allocator<score_t, 4096>> ordered_hessians_;
#elif defined(USE_CUDA) || defined(USE_ROCM) #elif defined(USE_CUDA)
/*! \brief gradients of current iteration, ordered for cache optimized */ /*! \brief gradients of current iteration, ordered for cache optimized */
std::vector<score_t, CHAllocator<score_t>> ordered_gradients_; std::vector<score_t, CHAllocator<score_t>> ordered_gradients_;
/*! \brief hessians of current iteration, ordered for cache optimized */ /*! \brief hessians of current iteration, ordered for cache optimized */
......
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