Skip to content

Commit

Permalink
Update explainCatalystSQLPlan to adapt to the change of the default v…
Browse files Browse the repository at this point in the history
…alue of rapids.sql.explain

Signed-off-by: sinkinben <sinkinben@outlook.com>
  • Loading branch information
sinkinben committed Jun 20, 2022
1 parent bb50fd8 commit faf02c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/get-started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ will vary depending on your cluster manager. Here are some example configs:
- `--conf spark.task.resource.gpu.amount=1`
- Specify a GPU discovery script (required on YARN and K8S):
- `--conf spark.executor.resource.gpu.discoveryScript=./getGpusResources.sh`
- Explain why some operations of a query were not placed on a GPU or not:
- `--conf spark.rapids.sql.explain=ALL` will display whether each operation is placed on GPU.
- `--conf spark.rapids.sql.explain=NONE` will disable the log of `rapids.sql.explain`.
- `--conf spark.rapids.sql.explain=NOT_ON_GPU` will display only parts that did not go on the GPU,
and it's the default setting.

See the deployment specific sections for more details and restrictions. Note that
`spark.task.resource.gpu.amount` can be a decimal amount, so if you want multiple tasks to be run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4142,7 +4142,11 @@ object GpuOverrides extends Logging {
* GPUs.
*/
private def explainCatalystSQLPlan(updatedPlan: SparkPlan, conf: RapidsConf): Unit = {
val explainSetting = if (conf.shouldExplain) {
// Since we set "NOT_ON_GPU" as the default value of spark.rapids.sql.explain, here we keep
// "ALL" as default value of "explainSetting", unless spark.rapids.sql.explain is changed
// by the user.
val explainSetting = if (conf.shouldExplain &&
conf.rapidsConfMap.containsKey(RapidsConf.EXPLAIN.key)) {
conf.explain
} else {
"ALL"
Expand Down

0 comments on commit faf02c4

Please sign in to comment.