[GLUTEN-11524][VL][DOC] Update gpu documentation - #12752
Open
marin-ma wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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.*andspark.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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update gpu documentation regarding dynamic execution, hybrid execution, gpu concurrency and async shuffle read.
Related issue: #11524