-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an explain only mode to the plugin #4322
Merged
Merged
Changes from 26 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8eb81f6
Add an explain only mode configuration to run plugin on CPU to get wh…
tgravescs 1fca5ef
Updates
tgravescs f043f86
Don't allocate gpu or enable shuffle for explain only mode
tgravescs 431426c
explain only mode check for rapids shuffle internal manager
tgravescs 3541832
update doc
tgravescs 6ec51d0
Change how we check explain with sql enabled
tgravescs 21a79ca
Merge branch 'explainonlymode' of github.com:tgravescs/spark-rapids i…
tgravescs b8e9e26
update not work message:
tgravescs c15b786
Merge remote-tracking branch 'origin/branch-22.02' into explainonlymode
tgravescs ba3b355
fix spacing
tgravescs 42aa80f
Update doc adding explain option
tgravescs 278d96c
update docs
tgravescs 2a3b228
Add explian only mode test to make sure runs on cpu
tgravescs 3bdf4f2
add note about adaptive
tgravescs 4b88718
get rest of broadcast shims
tgravescs 8f9301a
Update logging of enabled and explain only mode
tgravescs d79c9a4
update config docs
tgravescs 6402631
Merge remote-tracking branch 'origin/branch-22.02' into explainonlymode
tgravescs ab49521
Update to use the spark.rapids.sql.mode config
tgravescs ce38223
update config doc and formatting
tgravescs b1dd70e
update docs
tgravescs c94d732
fix typo
tgravescs 0003e4e
update configs.md
tgravescs 77c82a2
Change to check for isSqlEnabled and the mode separately because we may
tgravescs c02dae5
fix spacing
tgravescs 2afeb2b
update auto generated configs doc
tgravescs dae6749
Update docs/get-started/getting-started-workload-qualification.md
tgravescs 0ec5e1f
Update docs/get-started/getting-started-workload-qualification.md
tgravescs 8e84659
update copyrights and change text from plugin to Rapids Accelerator
tgravescs 6aaacf8
Update sql-plugin/src/main/scala/com/nvidia/spark/rapids/RapidsConf.s…
tgravescs f6f9d67
Update sql-plugin/src/main/scala/com/nvidia/spark/rapids/RapidsConf.s…
tgravescs fc5a1c2
Update sql-plugin/src/main/scala/com/nvidia/spark/rapids/RapidsConf.s…
tgravescs a3f1039
update configs doc
tgravescs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
from pyspark.sql.types import * | ||
from asserts import assert_gpu_fallback_collect | ||
from data_gen import * | ||
from marks import ignore_order | ||
|
||
# copied from sort_test and added explainOnly mode | ||
_explain_mode_conf = {'spark.rapids.sql.mode': 'explainOnly', | ||
'spark.sql.join.preferSortMergeJoin': 'True', | ||
'spark.sql.shuffle.partitions': '2', | ||
'spark.sql.legacy.allowNegativeScaleOfDecimal': 'true' | ||
} | ||
|
||
def create_df(spark, data_gen, left_length, right_length): | ||
left = binary_op_df(spark, data_gen, length=left_length) | ||
right = binary_op_df(spark, data_gen, length=right_length).withColumnRenamed("a", "r_a")\ | ||
.withColumnRenamed("b", "r_b") | ||
return left, right | ||
|
||
|
||
# just run with one join type since not testing join itself | ||
all_join_types = ['Left'] | ||
|
||
# use a subset of types just to test explain only mode | ||
all_gen = [StringGen(), ByteGen()] | ||
|
||
# here we use the assert_gpu_fallback_collect to make sure explain only mode runs on the CPU | ||
@ignore_order(local=True) | ||
@pytest.mark.parametrize('data_gen', all_gen, ids=idfn) | ||
@pytest.mark.parametrize('join_type', all_join_types, ids=idfn) | ||
def test_explain_only_sortmerge_join(data_gen, join_type): | ||
def do_join(spark): | ||
left, right = create_df(spark, data_gen, 500, 500) | ||
return left.join(right, left.a == right.r_a, join_type) | ||
assert_gpu_fallback_collect(do_join, 'SortMergeJoinExec', conf=_explain_mode_conf) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Ideally should be using "RAPIDS Accelerator" rather than "plugin" in user docs. Applies to other places in the PR.