Skip to content
Snippets Groups Projects
Commit 2eafcc6c authored by Markus Holzer's avatar Markus Holzer
Browse files

Everything is good now

parent 0a34fa88
No related branches found
No related tags found
1 merge request!275WIP: Revamp the type system
...@@ -85,20 +85,12 @@ def test_strided(instruction_set, dtype): ...@@ -85,20 +85,12 @@ def test_strided(instruction_set, dtype):
ref_func = ps.create_kernel(update_rule, config=ref_config).compile() ref_func = ps.create_kernel(update_rule, config=ref_config).compile()
arr = np.full((23 + 2, 17 + 2), 0.13).astype(npdtype) arr = np.full((23 + 2, 17 + 2), 0.13).astype(npdtype)
print("sum arr: ", np.sum(arr))
# print("arr type: ", arr.dtype)
dst = np.zeros_like(arr, dtype=npdtype) dst = np.zeros_like(arr, dtype=npdtype)
ref = np.zeros_like(arr, dtype=npdtype) ref = np.zeros_like(arr, dtype=npdtype)
func(g=dst, f=arr) func(g=dst, f=arr)
ref_func(g=ref, f=arr) ref_func(g=ref, f=arr)
# print(dst)
# print(ref)
print("dst sum: ", np.sum(dst))
print("reference sum: ", np.sum(ref))
np.testing.assert_almost_equal(dst, ref, 13 if dtype == 'double' else 5) np.testing.assert_almost_equal(dst, ref, 13 if dtype == 'double' else 5)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment