Skip to content
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

Print CPU and GPU output when _assert_equal fails to help debug given… #2657

Merged
merged 2 commits into from
Jun 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion integration_tests/src/main/python/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ def _assert_equal(cpu, gpu, float_check, path):

def assert_equal(cpu, gpu):
"""Verify that the result from the CPU and the GPU are equal"""
_assert_equal(cpu, gpu, float_check=get_float_check(), path=[])
try:
_assert_equal(cpu, gpu, float_check=get_float_check(), path=[])
except:
print("CPU OUTPUT: %s" % cpu)
print("GPU OUTPUT: %s" % gpu)
gerashegalov marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: technically this is not guaranteed to be the output for the GPU or the CPU because we could have sorted it locally first, but I think everyone will understand and I think this is the right place to print out the info.

raise

def _has_incompat_conf(conf):
return ('spark.rapids.sql.incompatibleOps.enabled' in conf and
Expand Down