jinchengchenghh commented on code in PR #11830:
URL: https://github.com/apache/gluten/pull/11830#discussion_r2996295367
##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -105,7 +123,15 @@ void VeloxBackend::init(
// Register factories.
MemoryManager::registerFactory(kVeloxBackendKind, veloxMemoryManagerFactory,
veloxMemoryManagerReleaser);
- Runtime::registerFactory(kVeloxBackendKind, veloxRuntimeFactory,
veloxRuntimeReleaser);
+
+ // Set immutable configurations from backend conf.
+ const bool enableCudf = backendConf_->get<bool>(kCudfEnabled,
kCudfEnabledDefault) && hasCudaRuntimeAndDevice();
+ const bool enableCudfTableScan =
+ enableCudf && backendConf_->get<bool>(kCudfEnableTableScan,
kCudfEnableTableScanDefault);
+ std::unordered_map<std::string, std::string> immutableConf = {
Review Comment:
We add it here, if detects it is cpu node, we should not set the enable cudf
to true, could we add a jni call to detect it?
```
val extraConfMap = mutable.Map(GlutenConfig.COLUMNAR_CUDF_ENABLED.key ->
enableCudf.toString)
if (!supportsValueStreamDynamicFilter) {
extraConfMap(VeloxConfig.VALUE_STREAM_DYNAMIC_FILTER_ENABLED.key) =
"false"
}
val extraConf = extraConfMap.asJava
val transKernel =
NativePlanEvaluator.create(BackendsApiManager.getBackendName, extraConf)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]