yikf commented on code in PR #13368:
URL: https://github.com/apache/gluten/pull/13368#discussion_r4313986101


##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala:
##########
@@ -312,6 +312,22 @@ object VeloxListenerApi {
 
     var parsed: Map[String, String] = 
GlutenConfigUtil.parseConfig(conf.getAll.toMap)
 
+    val broadcastBuildThreadsKey = 
COLUMNAR_VELOX_BROADCAST_HASH_TABLE_BUILD_THREADS.key
+    if (!parsed.contains(broadcastBuildThreadsKey)) {
+      val defaultThreads = if (isDriver) {
+        if (inLocalMode(conf)) {
+          SparkResourceUtil.getExecutorCores(conf)
+        } else {
+          conf.getInt("spark.driver.cores", 1)
+        }
+      } else {
+        conf.getInt(GlutenCoreConfig.NUM_TASK_SLOTS_PER_EXECUTOR.key, 1)
+      }
+      // Resolve defaults per process without writing the driver's value back 
to SparkConf,
+      // which is also propagated to executors. Local mode shares the driver's 
thread pool.

Review Comment:
   Using NUM_TASK_SLOTS_PER_EXECUTOR in local mode is also reasonable.



-- 
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]

Reply via email to