From b2dabf408bfbeb09dc1dd19acc0da4afbc050ba9 Mon Sep 17 00:00:00 2001 From: Philip Mueller Date: Mon, 3 Feb 2025 11:45:05 +0100 Subject: [PATCH] Let's hope tha this will get us the SDFG, such that we can locally debug. --- tests/numpy/common.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/numpy/common.py b/tests/numpy/common.py index 2784c8a0eb..9a8cc82922 100644 --- a/tests/numpy/common.py +++ b/tests/numpy/common.py @@ -134,13 +134,18 @@ def get_rand_arr(ddesc): if not isinstance(reference_result, (tuple, list)): reference_result = [reference_result] dace_result = [dace_result] + import json + ssdfg = dp.to_sdfg(**dace_input, use_cache=True) + ssdfg_json = ssdfg.to_json() + ssdf_json_str = json.dumps(ssdfg_json, indent=None) + for ref, val in zip(reference_result, dace_result): if ref.dtype == np.float32: - assert np.allclose(ref, val, equal_nan=True, rtol=1e-3, atol=1e-5) + assert np.allclose(ref, val, equal_nan=True, rtol=1e-3, atol=1e-5), f"SDFG: {ssdf_json_str}" else: - assert np.allclose(ref, val, equal_nan=True) + assert np.allclose(ref, val, equal_nan=True), f"SDFG: {ssdf_json_str}" if check_dtype and not validation_func: - assert (ref.dtype == val.dtype) + assert (ref.dtype == val.dtype), f"SDFG: {ssdf_json_str}" return test