marin-ma commented on code in PR #12471:
URL: https://github.com/apache/gluten/pull/12471#discussion_r3802533316


##########
backends-velox/src/main/scala/org/apache/spark/sql/execution/AdjustStageExecutionMode.scala:
##########
@@ -82,6 +82,16 @@ object AdjustStageExecutionMode extends Logging {
           if queryStageExec.shuffle.isInstanceOf[ColumnarShuffleExchangeExec] 
=>
         ColumnarAQEShuffleReadExec(queryStageExec, stageExecutionMode)
       case shuffle: ColumnarShuffleExchangeExec =>
+        // Keep the shuffle-input resizer (the exchange's direct child) in CPU 
mode. GPU mode
+        // repurposes VeloxResizeBatchesExec as the GPU-buffer to cudf table 
converter, which
+        // only accepts buffer batches produced by a GPU shuffle read — not 
the CudfVector
+        // batches the stage's transformer emits ahead of a shuffle write.
+        val newChild = shuffle.child match {

Review Comment:
   This change seems redundant with the existing logic.
   
   When `VeloxResizeBatchesExec` wraps shuffle reader, it's handled in 
   ```
   case r: VeloxResizeBatchesExec if 
r.child.isInstanceOf[ShuffleQueryStageExec] ||
               r.child.isInstanceOf[AQEShuffleReadExec]
   ```
   
   When `VeloxResizeBatchesExec` is the child of exchange, it goes to
   
   ```
         case _ =>
           plan.withNewChildren(plan.children.map(adjustExecutionMode(_, 
stageExecutionMode)))
   ```



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