Skip to content

[GLUTEN-11524][VL][DOC] Update gpu documentation - #12752

Open
marin-ma wants to merge 1 commit into
apache:mainfrom
marin-ma:update-gpu-doc
Open

[GLUTEN-11524][VL][DOC] Update gpu documentation#12752
marin-ma wants to merge 1 commit into
apache:mainfrom
marin-ma:update-gpu-doc

Conversation

@marin-ma

@marin-ma marin-ma commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Update gpu documentation regarding dynamic execution, hybrid execution, gpu concurrency and async shuffle read.

Related issue: #11524

Copilot AI lite review requested due to automatic review settings August 11, 2026 18:15
@github-actions github-actions Bot added the DOCS label Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates VeloxGPU.md to expand the GPU documentation around stage-level execution mode selection, hybrid CPU/GPU scheduling concepts, GPU concurrency, and async shuffle read tuning for the Velox backend.

Changes:

  • Reworks “Dynamic Execution” to describe AQE-stage execution-mode adjustment.
  • Adds new sections for “CPU/GPU Hybrid Execution” and performance tuning (GPU concurrency + async shuffle reader).
  • Renumbers downstream sections to account for the new content.
Suppressed comments (2)

docs/get-started/VeloxGPU.md:114

  • The properties snippet uses spark.gluten.sql.columnar.hybridExecution.* settings that do not exist in the codebase (they only appear in this doc). This will fail for users who copy/paste the config.
spark.gluten.auto.adjustStageResource.enabled = true
spark.gluten.sql.columnar.hybridExecution.enabled = true

# Step 3 – tell Spark about the GPU resource on each executor
spark.gluten.sql.columnar.hybridExecution.gpuResource.amountPerTask = 0.1 # fractional: 10 concurrent GPU tasks/executor

docs/get-started/VeloxGPU.md:127

  • These table rows document spark.gluten.sql.columnar.hybridExecution.* and spark.gluten.sql.columnar.gpu.onlyOffloadJoinStage, but neither key exists anywhere in the codebase (only in this markdown). The table should avoid listing non-existent configuration keys.
| `spark.gluten.sql.columnar.hybridExecution.enabled` | `true` | Enable CPU/GPU hybrid execution. Stages are scheduled to CPU or GPU nodes based on their execution mode. Requires AQE (`spark.sql.adaptive.enabled=true`). |
| `spark.gluten.sql.columnar.hybridExecution.gpuResource.name` | `gpu` | The Spark custom-resource name for GPU. Must match `spark.executor.resource.<name>.*` and `spark.task.resource.<name>.*`. |
| `spark.gluten.sql.columnar.hybridExecution.cpuResource.name` | `cpu` | The Spark custom-resource name for CPU. Must match `spark.executor.resource.<name>.*` and `spark.task.resource.<name>.*` for CPU-stage scheduling to take effect. |
| `spark.gluten.sql.columnar.hybridExecution.gpuResource.amountPerTask` | `0.1` | Fractional GPU resource amount per task. Controls how many GPU tasks can run concurrently on a single executor (e.g. `0.1` → 10 tasks share 1 GPU). |
| `spark.gluten.sql.columnar.gpu.onlyOffloadJoinStage` | `true` | When `true`, only stages that contain a join operator are offloaded to GPU. All other stages execute on CPU. Useful for workloads where only join-heavy stages benefit from GPU acceleration. |

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +88 to +90
By default, any fully CUDF-offloaded stage is routed to GPU. Setting
`spark.gluten.sql.columnar.gpu.onlyOffloadJoinStage = true` restricts GPU offload to
stages that contain a join operator. All other stages stay on CPU regardless of whether their operators support CUDF.
Comment on lines +96 to +99
With hybrid execution enabled, GPU stages identified in §7 are assigned a dedicated GPU
resource profile via `GlutenAutoAdjustStageResourceProfile`. Spark then schedules those
tasks only on executors that advertise a GPU resource. Scan stages and other non-GPU stages
continue to run on regular CPU executors.
`A = min(spark.executor.cores / spark.task.cpus, floor(1 / amountPerTask))`

It is a scheduling hint, not a hard GPU limit. Set it to a small value (e.g. `0.1`)
so that CPU work within a GPU stage(such as shuffle read) is not throttled by the task slot limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants