diff --git a/cpp/core/config/GlutenConfig.h b/cpp/core/config/GlutenConfig.h index 2f5992b9c0df..110c741a4b4b 100644 --- a/cpp/core/config/GlutenConfig.h +++ b/cpp/core/config/GlutenConfig.h @@ -95,9 +95,9 @@ const std::string kSparkJsonIgnoreNullFields = "spark.sql.jsonGenerator.ignoreNu // cudf const std::string kCudfEnabled = "spark.gluten.sql.columnar.cudf"; -const bool kCudfEnabledDefault = "true"; +constexpr bool kCudfEnabledDefault = true; const std::string kDebugCudf = "spark.gluten.sql.debug.cudf"; -const bool kDebugCudfDefault = "false"; +const std::string kDebugCudfDefault = "false"; std::unordered_map parseConfMap(JNIEnv* env, const uint8_t* planData, const int32_t planDataLength); diff --git a/cpp/velox/compute/VeloxBackend.cc b/cpp/velox/compute/VeloxBackend.cc index 54cb08bf572a..fedb5aa1712c 100644 --- a/cpp/velox/compute/VeloxBackend.cc +++ b/cpp/velox/compute/VeloxBackend.cc @@ -28,6 +28,7 @@ #include "utils/qat/QatCodec.h" #endif #ifdef GLUTEN_ENABLE_GPU +#include "velox/experimental/cudf/CudfConfig.h" #include "velox/experimental/cudf/connectors/hive/CudfHiveConnector.h" #include "velox/experimental/cudf/exec/ToCudf.h" #endif @@ -166,11 +167,16 @@ void VeloxBackend::init( #ifdef GLUTEN_ENABLE_GPU if (backendConf_->get(kCudfEnabled, kCudfEnabledDefault)) { - FLAGS_velox_cudf_debug = backendConf_->get(kDebugCudf, kDebugCudfDefault); - FLAGS_velox_cudf_memory_resource = backendConf_->get(kCudfMemoryResource, kCudfMemoryResourceDefault); - auto& options = velox::cudf_velox::CudfOptions::getInstance(); - options.memoryPercent = backendConf_->get(kCudfMemoryPercent, kCudfMemoryPercentDefault); - velox::cudf_velox::registerCudf(options); + std::unordered_map options = { + {velox::cudf_velox::CudfConfig::kCudfEnabled, "true"}, + {velox::cudf_velox::CudfConfig::kCudfDebugEnabled, backendConf_->get(kDebugCudf, kDebugCudfDefault)}, + {velox::cudf_velox::CudfConfig::kCudfMemoryResource, + backendConf_->get(kCudfMemoryResource, kCudfMemoryResourceDefault)}, + {velox::cudf_velox::CudfConfig::kCudfMemoryPercent, + backendConf_->get(kCudfMemoryPercent, kCudfMemoryPercentDefault)}}; + auto& cudfConfig = velox::cudf_velox::CudfConfig::getInstance(); + cudfConfig.initialize(std::move(options)); + velox::cudf_velox::registerCudf(); } #endif diff --git a/cpp/velox/config/VeloxConfig.h b/cpp/velox/config/VeloxConfig.h index 690fbd59f15e..4406887978b4 100644 --- a/cpp/velox/config/VeloxConfig.h +++ b/cpp/velox/config/VeloxConfig.h @@ -179,7 +179,7 @@ const std::string kCudfMemoryResourceDefault = // Initial percent of GPU memory to allocate for memory resource for one thread const std::string kCudfMemoryPercent = "spark.gluten.sql.columnar.backend.velox.cudf.memoryPercent"; -const int32_t kCudfMemoryPercentDefault = 50; +const std::string kCudfMemoryPercentDefault = "50"; /// Preferred size of batches in bytes to be returned by operators. const std::string kVeloxPreferredBatchBytes = "spark.gluten.sql.columnar.backend.velox.preferredBatchBytes"; diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh index 019c38fd7697..6553623c4dc2 100755 --- a/ep/build-velox/src/get_velox.sh +++ b/ep/build-velox/src/get_velox.sh @@ -18,11 +18,11 @@ set -exu CURRENT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd) VELOX_REPO=https://github.com/oap-project/velox.git -VELOX_BRANCH=2025_10_06 +VELOX_BRANCH=2025_10_07 VELOX_HOME="" RUN_SETUP_SCRIPT=ON VELOX_ENHANCED_REPO=https://github.com/IBM/velox.git -VELOX_ENHANCED_BRANCH=ibm-2025_10_06 +VELOX_ENHANCED_BRANCH=ibm-2025_10_07 ENABLE_ENHANCED_FEATURES=OFF # Developer use only for testing Velox PR.