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

Add specific test case

parent 4be17e2d
No related branches found
No related tags found
1 merge request!412[FIX] Vector Size for SVE instruction set is in free kernel parameters
Pipeline #69253 passed
...@@ -292,6 +292,22 @@ def test_div_and_unevaluated_expr(dtype, instruction_set): ...@@ -292,6 +292,22 @@ def test_div_and_unevaluated_expr(dtype, instruction_set):
assert 'pow' not in code assert 'pow' not in code
@pytest.mark.parametrize('dtype', ('float32', 'float64'))
@pytest.mark.parametrize('instruction_set', ('sve', 'sve2', 'sme', 'rvv'))
def test_check_ast_parameters(dtype, instruction_set):
f, g = ps.fields(f"f, g: {dtype}[3D]", layout='fzyx')
update_rule = [ps.Assignment(g.center(), 2 * f.center())]
config = pystencils.config.CreateKernelConfig(data_type=dtype,
cpu_vectorize_info={'instruction_set': instruction_set})
ast = ps.create_kernel(update_rule, config=config)
ast_symbols = [p.symbol for p in ast.get_parameters()]
assert ast.instruction_set['width'] not in ast_symbols
assert ast.instruction_set['intwidth'] not in ast_symbols
# TODO this test case needs a complete rework of the vectoriser. The reason is that the vectoriser does not # TODO this test case needs a complete rework of the vectoriser. The reason is that the vectoriser does not
# TODO vectorise symbols at the moment because they could be strides or field sizes, thus involved in pointer arithmetic # TODO vectorise symbols at the moment because they could be strides or field sizes, thus involved in pointer arithmetic
# TODO This means that the vectoriser only works if fields are involved on the rhs. # TODO This means that the vectoriser only works if fields are involved on the rhs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment