diff --git a/padiff/checker/actions.py b/padiff/checker/actions.py index c38bda2..d52ceda 100644 --- a/padiff/checker/actions.py +++ b/padiff/checker/actions.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ..utils import assert_tensor_equal +from ..utils import assert_tensor_equal, log from .checker_utils import load_numpy import warnings @@ -75,4 +75,9 @@ def __call__(self, file_list_0, file_list_1, cfg): raise RuntimeError("size of tensors is not equal") warnings.warn("Found nparray.size == 0, compare skipped!") continue - assert_tensor_equal(tensor_0, tensor_1, cfg) + try: + assert_tensor_equal(tensor_0, tensor_1, cfg) + except Exception as e: + raise RuntimeError( + "Compare Tensor: " + info_0["path"] + ", " + info_1["path"] + "\n" + + str(e)) diff --git a/padiff/checker/check_report.py b/padiff/checker/check_report.py index ca34b79..71b0eff 100644 --- a/padiff/checker/check_report.py +++ b/padiff/checker/check_report.py @@ -82,6 +82,7 @@ def check_forward(nodes, reports, cfg): print_report_info(nodes, reports, e, "Forward") return False + log("Parent Node Forward Check Failed, Analysing Children Nodes !!!") # reorder current level try: if not nodes[1]["reordered"]: @@ -116,6 +117,7 @@ def check_backward(nodes, reports, cfg): print_report_info(nodes, reports, e, "Backward") return False + log("Parent Node Backward Check Failed, Analysing Children Nodes !!!") # reorder current level try: if not nodes[1]["reordered"]: