From 0a34fa88bc63965697983817f6619339b146cc34 Mon Sep 17 00:00:00 2001 From: Markus Holzer <markus.holzer@fau.de> Date: Thu, 10 Feb 2022 14:26:33 +0100 Subject: [PATCH] Debug checking --- pystencils/cpu/vectorization.py | 2 ++ pystencils_tests/test_vectorization_specific.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pystencils/cpu/vectorization.py b/pystencils/cpu/vectorization.py index 6d59be9b0..9f8e381c3 100644 --- a/pystencils/cpu/vectorization.py +++ b/pystencils/cpu/vectorization.py @@ -77,6 +77,8 @@ class CachelineSize(ast.Node): def vectorize(kernel_ast: ast.KernelFunction, instruction_set: str = 'best', assume_aligned: bool = False, nontemporal: Union[bool, Container[Union[str, Field]]] = False, assume_inner_stride_one: bool = False, assume_sufficient_line_padding: bool = True): + # TODO we first introduce the remainder loop and then check if we can even vectorise. Maybe first copy the ast + # and return the copied version on failure """Explicit vectorization using SIMD vectorization via intrinsics. Args: diff --git a/pystencils_tests/test_vectorization_specific.py b/pystencils_tests/test_vectorization_specific.py index 58a1183d3..c6deb2de5 100644 --- a/pystencils_tests/test_vectorization_specific.py +++ b/pystencils_tests/test_vectorization_specific.py @@ -81,9 +81,10 @@ def test_strided(instruction_set, dtype): ps.show_code(ast) func = ast.compile() - ref_func = ps.create_kernel(update_rule).compile() + ref_config = pystencils.config.CreateKernelConfig(default_number_float=type_string) + ref_func = ps.create_kernel(update_rule, config=ref_config).compile() - arr = np.random.random((23 + 2, 17 + 2)).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) -- GitLab