marin-ma commented on code in PR #13067:
URL: https://github.com/apache/gluten/pull/13067#discussion_r4198668162
##########
cpp/velox/operators/plannodes/CudfVectorStream.h:
##########
@@ -115,11 +116,30 @@ class CudfVectorStream : public CudfVectorStreamBase {
VELOX_DCHECK(vp != nullptr);
auto cudfVector =
std::dynamic_pointer_cast<facebook::velox::cudf_velox::CudfVector>(vp);
if (cudfVector == nullptr) {
- // The vector may comes from BroadcastExchange, in this case, it's not a
CudfVector.
- vp->setType(outputType_);
- return vp;
+ // BroadcastExchange may return a host RowVector; upload it for GPU
operators.
+ auto stream =
facebook::velox::cudf_velox::cudfGlobalStreamPool().get_stream();
+ if (vp->childrenSize() == 0 || outputType_->size() == 0) {
+ // Preserve row count because zero-column cuDF tables cannot store it.
+ return std::make_shared<facebook::velox::cudf_velox::CudfVector>(
+ vp->pool(), outputType_, vp->size(),
std::make_unique<cudf::table>(), stream);
+ }
+ // Drop extra trailing columns added by broadcast exchange.
Review Comment:
@ReemaAlzaid Have you run into issue with trailing columns being added by
broadcast exchange? Seems the projection for the extra column is added by
`spark.gluten.velox.buildHashTableOncePerExecutor.enabled=true`, but the option
is not supported with cudf.
--
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]