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
9 changes: 5 additions & 4 deletions cpp/velox/cudf/CudfPlanValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
#include "compute/ResultIterator.h"
#include "compute/VeloxBackend.h"
#include "compute/VeloxPlanConverter.h"
#include "config/GlutenConfig.h"
#include "velox/core/PlanNode.h"
#include "velox/exec/Task.h"
#include "velox/exec/TableScan.h"
#include "velox/exec/Task.h"
#include "velox/experimental/cudf/exec/NvtxHelper.h"
#include "velox/experimental/cudf/exec/ToCudf.h"

Expand All @@ -36,15 +37,15 @@ bool isCudfOperator(const exec::Operator* op) {
return dynamic_cast<const velox::cudf_velox::NvtxHelper*>(op) != nullptr;
}

}
} // namespace

bool CudfPlanValidator::validate(const ::substrait::Plan& substraitPlan) {
auto veloxMemoryPool = gluten::defaultLeafVeloxMemoryPool();
std::vector<::substrait::ReadRel_LocalFiles> localFiles;
std::unordered_map<std::string, std::string> configValues;
std::vector<std::shared_ptr<ResultIterator>> inputs;
std::shared_ptr<facebook::velox::config::ConfigBase> veloxCfg =
std::make_shared<facebook::velox::config::ConfigBase>(std::unordered_map<std::string, std::string>());
std::shared_ptr<facebook::velox::config::ConfigBase> veloxCfg = std::make_shared<facebook::velox::config::ConfigBase>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify to only transfer cudf config here for validation, to avoid other session config causing fallback, we may send the veloxCfg from VeloxRuntime to here in the future

std::unordered_map<std::string, std::string>{{kCudfEnabled, "true"}});
VeloxPlanConverter veloxPlanConverter(
inputs, veloxMemoryPool.get(), veloxCfg.get(), std::nullopt, std::nullopt, true);
auto planNode = veloxPlanConverter.toVeloxPlan(substraitPlan, localFiles);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ object GlutenConfig extends ConfigRegistry {
GlutenCoreConfig.COLUMNAR_TASK_OFFHEAP_SIZE_IN_BYTES.key,
COLUMNAR_MAX_BATCH_SIZE.key,
SHUFFLE_WRITER_BUFFER_SIZE.key,
COLUMNAR_CUDF_ENABLED.key,
SQLConf.LEGACY_SIZE_OF_NULL.key,
SQLConf.LEGACY_STATISTICAL_AGGREGATE.key,
SQLConf.JSON_GENERATOR_IGNORE_NULL_FIELDS.key,
Expand Down