Skip to content

[GLUTEN-8851][VL] cuDF: Validate the plan before execution#10889

Merged
jinchengchenghh merged 7 commits intoapache:mainfrom
jinchengchenghh:validation
Oct 20, 2025
Merged

[GLUTEN-8851][VL] cuDF: Validate the plan before execution#10889
jinchengchenghh merged 7 commits intoapache:mainfrom
jinchengchenghh:validation

Conversation

@jinchengchenghh
Copy link
Copy Markdown
Contributor

@jinchengchenghh jinchengchenghh commented Oct 14, 2025

Initializing task in Task constructor has been merged, so we can get the operator information from task, if validate successfully, set the whole stage transformer cudf tag to true to enable session config kCudfEnabled to true, and set the children operator CUDF tag to true to update the name in Spark UI with "Cudf".

Related issue: #8851

@github-actions github-actions Bot added the VELOX label Oct 14, 2025
@zhztheplayer zhztheplayer changed the title [GLUTEN-8851] Validate the plan before execution [GLUTEN-8851][VL] cuDF: Validate the plan before execution Oct 20, 2025
Comment on lines +41 to +56
if (!hasLeaf && VeloxConfig.get.cudfEnableValidation) {
if (
VeloxCudfPlanValidatorJniWrapper.validate(
transformer.substraitPlan.toProtobuf.toByteArray)
) {
transformer.foreach {
case _: LeafTransformSupport =>
case t: TransformSupport =>
t.setTagValue(CudfTag.CudfTag, true)
case _ =>
}
transformer.setTagValue(CudfTag.CudfTag, true)
}
} else {
transformer.setTagValue(CudfTag.CudfTag, !hasLeaf)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A dumb question, after this PR, what happens if user sets spark.gluten.sql.columnar.backend.velox.cudf.enableValidation=false but the plan is actually invalid for cuDF?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will not check if the pan is fully offloaded to GPU, may introduce extra cudf to velox format conversion. This is not a suggested behavior.

@jinchengchenghh jinchengchenghh merged commit fbe5350 into apache:main Oct 20, 2025
100 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants