-
Notifications
You must be signed in to change notification settings - Fork 232
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
Implement way for python integration tests to validate Exec is in GPU plan #1668
Conversation
Signed-off-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: Thomas Graves <tgraves@apache.org>
Signed-off-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: Thomas Graves <tgraves@nvidia.com>
build |
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuTransitionOverrides.scala
Outdated
Show resolved
Hide resolved
tests/src/test/scala/com/nvidia/spark/rapids/BroadcastHashJoinSuite.scala
Show resolved
Hide resolved
tests/src/test/scala/com/nvidia/spark/rapids/BroadcastNestedLoopJoinSuite.scala
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuTransitionOverrides.scala
Show resolved
Hide resolved
build |
looking at failures |
build |
if (execsNotFound.nonEmpty) { | ||
throw new IllegalArgumentException( | ||
s"Plan ${plan.toString()} does not contain the following execs: $execsNotFound") | ||
} |
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: we can use the syntax sugar require
to produce this IllegalArgumentException
if (execsNotFound.nonEmpty) { | |
throw new IllegalArgumentException( | |
s"Plan ${plan.toString()} does not contain the following execs: $execsNotFound") | |
} | |
require(execsNotFound.nonEmpty, s"Plan ${plan.toString()} does not contain the following execs: $execsNotFound") |
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.
updated
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuTransitionOverrides.scala
Show resolved
Hide resolved
build failing due to changes in 3.0.1 for ShuffleLike, working on changes |
between spark versions Signed-off-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: Thomas Graves <tgraves@nvidia.com>
build |
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.
LGTM, 🚀
… plan (NVIDIA#1668) * Add Data source v2 test classes Signed-off-by: Thomas Graves <tgraves@nvidia.com> * update v2 source testing * fix batch num rows and logging * update the numberin batch * Fix issue with reading booleans from ArrowColumnVectors and add more tests * move test file so pytest regex pick it up * add comments * Validate that the plan actually contains the exec Signed-off-by: Thomas Graves <tgraves@apache.org> * fix getting class name Signed-off-by: Thomas Graves <tgraves@nvidia.com> * change to use findOperators * fix calls to findOperators * turn on for all tests * add a mark for validating execs in gpu plan * fix name * cleanup * fix line length * update comment Signed-off-by: Thomas Graves <tgraves@nvidia.com> * Update copyrights to have 2021 * Move findOperators into shim layer due to changes in ShuffleExchangeExec between spark versions Signed-off-by: Thomas Graves <tgraves@nvidia.com> * add comments to Shim and change to use require Signed-off-by: Thomas Graves <tgraves@nvidia.com>
… plan (NVIDIA#1668) * Add Data source v2 test classes Signed-off-by: Thomas Graves <tgraves@nvidia.com> * update v2 source testing * fix batch num rows and logging * update the numberin batch * Fix issue with reading booleans from ArrowColumnVectors and add more tests * move test file so pytest regex pick it up * add comments * Validate that the plan actually contains the exec Signed-off-by: Thomas Graves <tgraves@apache.org> * fix getting class name Signed-off-by: Thomas Graves <tgraves@nvidia.com> * change to use findOperators * fix calls to findOperators * turn on for all tests * add a mark for validating execs in gpu plan * fix name * cleanup * fix line length * update comment Signed-off-by: Thomas Graves <tgraves@nvidia.com> * Update copyrights to have 2021 * Move findOperators into shim layer due to changes in ShuffleExchangeExec between spark versions Signed-off-by: Thomas Graves <tgraves@nvidia.com> * add comments to Shim and change to use require Signed-off-by: Thomas Graves <tgraves@nvidia.com>
I've been wanting this for a while. It allows us to verify that certain GPU execs are actually in the plan for the tests we run. Spark has so many optimizations and such that sometimes you think your testing one thing but it gets changed to something else. So this allows us to make sure the gpu execs are in the plan.
It is intended for testing purposes only and is pretty basic. We could easily make it smarter later if needed. Like if you need to verify it was in plan multiple times, etc.
You simple tag the test with:
@validate_execs_in_gpu_plan('HostColumnarToGpu')
It allows multiple like:
@validate_execs_in_gpu_plan('HostColumnarToGpu', "fooExec")
If the execs not found it throws an exception and fails the test. The failure looks like: