diff --git a/cpp/src/io/utilities/config_utils.cpp b/cpp/src/io/utilities/config_utils.cpp index 067623f8992..377a6eb68b9 100644 --- a/cpp/src/io/utilities/config_utils.cpp +++ b/cpp/src/io/utilities/config_utils.cpp @@ -56,11 +56,11 @@ void set_up_kvikio() { static std::once_flag flag{}; std::call_once(flag, [] { + auto compat_mode = kvikio::detail::getenv_or("KVIKIO_COMPAT_MODE", true); + kvikio::defaults::compat_mode_reset(compat_mode); + auto nthreads = getenv_or("KVIKIO_NTHREADS", 4U); kvikio::defaults::thread_pool_nthreads_reset(nthreads); - - auto compat_mode = getenv_or("KVIKIO_COMPAT_MODE", true); - kvikio::defaults::compat_mode_reset(compat_mode); }); } } // namespace cufile_integration diff --git a/docs/cudf/source/user_guide/io/io.md b/docs/cudf/source/user_guide/io/io.md index 750050bc279..c0a1b803a11 100644 --- a/docs/cudf/source/user_guide/io/io.md +++ b/docs/cudf/source/user_guide/io/io.md @@ -97,9 +97,14 @@ This variable also controls the GDS compatibility mode. There are four valid values for the environment variable: -- "GDS": Enable GDS use; GDS compatibility mode is *off*. -- "ALWAYS": Enable GDS use; GDS compatibility mode is *on*. -- "KVIKIO": Enable GDS through [KvikIO](https://github.com/rapidsai/kvikio). +- "GDS": Enable GDS use. If the cuFile library cannot be properly loaded, +fall back to the GDS compatibility mode. +- "ALWAYS": Enable GDS use. If the cuFile library cannot be properly loaded, +throw an exception. +- "KVIKIO": Enable GDS through [KvikIO](https://github.com/rapidsai/kvikio). Note +that if the environment variable `KVIKIO_COMPAT_MODE` is `ON`, or if KvikIO detects +that the system is not properly configured for GDS, the I/O will fall back to the +GDS compatibility mode. - "OFF": Completely disable GDS use. If no value is set, behavior will be the same as the "KVIKIO" option.