Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,12 @@ object VeloxConfig extends ConfigRegistry {
.booleanConf
.createWithDefault(true)

val CUDF_ALLOW_CPU_FALLBACK =
buildStaticConf("spark.gluten.sql.columnar.backend.velox.cudf.allowCpuFallback")
.doc("Allow cuDF to fall back to CPU execution for unsupported operators.")
.booleanConf
.createWithDefault(true)

val CUDF_CONCURRENT_GPU_TASKS =
buildStaticConf("spark.gluten.sql.columnar.backend.velox.cudf.concurrentGpuTasks")
.doc("The number of concurrent GPU tasks to run.")
Expand Down
2 changes: 2 additions & 0 deletions cpp/core/config/GlutenConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ const std::string kCudfEnabled = "spark.gluten.sql.columnar.cudf";
constexpr bool kCudfEnabledDefault = false;
const std::string kDebugCudf = "spark.gluten.sql.debug.cudf";
const std::string kDebugCudfDefault = "false";
const std::string kCudfAllowCpuFallback = "spark.gluten.sql.columnar.backend.velox.cudf.allowCpuFallback";
const std::string kCudfAllowCpuFallbackDefault = "true";

std::unordered_map<std::string, std::string>
parseConfMap(JNIEnv* env, const uint8_t* planData, const int32_t planDataLength);
Expand Down
4 changes: 3 additions & 1 deletion cpp/velox/compute/VeloxBackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ void VeloxBackend::init(
{velox::cudf_velox::CudfConfig::kCudfMemoryResource,
backendConf_->get(kCudfMemoryResource, kCudfMemoryResourceDefault)},
{velox::cudf_velox::CudfConfig::kCudfMemoryPercent,
backendConf_->get(kCudfMemoryPercent, kCudfMemoryPercentDefault)}};
backendConf_->get(kCudfMemoryPercent, kCudfMemoryPercentDefault)},
{velox::cudf_velox::CudfConfig::kCudfAllowCpuFallback,
backendConf_->get(kCudfAllowCpuFallback, kCudfAllowCpuFallbackDefault)}};
auto& cudfConfig = velox::cudf_velox::CudfConfig::getInstance();
cudfConfig.initialize(std::move(options));
velox::cudf_velox::registerCudf();
Expand Down
1 change: 1 addition & 0 deletions docs/velox-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ nav_order: 16
| spark.gluten.sql.columnar.backend.velox.cacheEnabled | ⚓ Static | false | Enable Velox cache, default off. It's recommended to enablesoft-affinity as well when enable velox cache. |
| spark.gluten.sql.columnar.backend.velox.cachePrefetchMinPct | ⚓ Static | 0 | Set prefetch cache min pct for velox file scan |
| spark.gluten.sql.columnar.backend.velox.checkUsageLeak | ⚓ Static | true | Enable check memory usage leak. |
| spark.gluten.sql.columnar.backend.velox.cudf.allowCpuFallback | ⚓ Static | true | Allow cuDF to fall back to CPU execution for unsupported operators. |
| spark.gluten.sql.columnar.backend.velox.cudf.batchSize | 🔄 Dynamic | 2147483647 | Cudf input batch size after shuffle reader |
| spark.gluten.sql.columnar.backend.velox.cudf.concurrentGpuTasks | ⚓ Static | 1 | The number of concurrent GPU tasks to run. |
| spark.gluten.sql.columnar.backend.velox.cudf.enableTableScan | ⚓ Static | false | Enable cudf table scan |
Expand Down
Loading