Skip to content

Commit

Permalink
Revert the bs thread pool change
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Jan 29, 2025
1 parent caa1e6a commit 036a571
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions cpp/cmake/rapids_config.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2025, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -11,9 +11,6 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
set(rapids-cmake-repo "kingcrimsontianyu/rapids-cmake")
set(rapids-cmake-branch "bump-bs-threadpool-version-5.0.0")

file(READ "${CMAKE_CURRENT_LIST_DIR}/../../VERSION" _rapids_version)
if(_rapids_version MATCHES [[^([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])]])
set(RAPIDS_VERSION_MAJOR "${CMAKE_MATCH_1}")
Expand Down
6 changes: 2 additions & 4 deletions cpp/include/kvikio/defaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ bool getenv_or(std::string_view env_var_name, bool default_val);
template <>
CompatMode getenv_or(std::string_view env_var_name, CompatMode default_val);

using BS_thread_pool = BS::thread_pool<BS::tp::none>;

/**
* @brief Singleton class of default values used throughout KvikIO.
*
*/
class defaults {
private:
BS_thread_pool _thread_pool{get_num_threads_from_env()};
BS::thread_pool _thread_pool{get_num_threads_from_env()};
CompatMode _compat_mode;
std::size_t _task_size;
std::size_t _gds_threshold;
Expand Down Expand Up @@ -185,7 +183,7 @@ class defaults {
*
* @return The the default thread pool instance.
*/
[[nodiscard]] static BS_thread_pool& thread_pool();
[[nodiscard]] static BS::thread_pool& thread_pool();

/**
* @brief Get the number of threads in the default thread pool.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/defaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool defaults::is_compat_mode_preferred(CompatMode compat_mode) noexcept

bool defaults::is_compat_mode_preferred() { return is_compat_mode_preferred(compat_mode()); }

BS_thread_pool& defaults::thread_pool() { return instance()->_thread_pool; }
BS::thread_pool& defaults::thread_pool() { return instance()->_thread_pool; }

unsigned int defaults::thread_pool_nthreads() { return thread_pool().get_thread_count(); }

Expand Down

0 comments on commit 036a571

Please sign in to comment.