Skip to content

Commit

Permalink
Print CPU and GPU output when _assert_equal fails to help debug given…
Browse files Browse the repository at this point in the history
… the failed path

Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
  • Loading branch information
abellina committed Jun 9, 2021
1 parent 8db90e2 commit 9725ff1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,11 @@ 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 Exception as ex:
print("CPU OUTPUT: %s \n\n GPU OUTPUT: %s" % (cpu, gpu))
raise ex

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

0 comments on commit 9725ff1

Please sign in to comment.