From b4c812f9f81dca4cc96cc9000d46af9c6ca09fe4 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Fri, 3 May 2024 17:27:25 -0700 Subject: [PATCH] Write expected_C to a binary file --- tests/kernel/tensor/check_correctness.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/kernel/tensor/check_correctness.py b/tests/kernel/tensor/check_correctness.py index c81212d0..de0c976a 100644 --- a/tests/kernel/tensor/check_correctness.py +++ b/tests/kernel/tensor/check_correctness.py @@ -86,10 +86,15 @@ expected_A = expected['A_array'] expected_B = expected['B_array'] expected_C = expected['C_array'] expected_C = expected_C + expected_A @ expected_B +print('expected C:') print(expected_C[0:8, 0:8]) +print('got C:') print(C_array[0:8, 0:8]) +print('diff C:') print((expected_C - C_array)[0:8, 0:8]) +expected_C.astype('float32').tofile("c_expected.bin") + assert np.allclose(expected_A, A_array) assert np.allclose(expected_B, B_array) -assert np.allclose(expected_C, C_array) \ No newline at end of file +assert np.allclose(expected_C, C_array)