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

Add specific test case

parent 4be17e2d
1 merge request!412[FIX] Vector Size for SVE instruction set is in free kernel parameters
Pipeline #69253 passed with stages
in 24 minutes and 17 seconds
...@@ -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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment