Skip to content
Snippets Groups Projects
Commit cb566966 authored by Michael Zikeli's avatar Michael Zikeli
Browse files

Add some tests for the dot printer.

parent aabc1cd1
Branches
No related tags found
No related merge requests found
......@@ -5,12 +5,13 @@ from pystencils.backend.emission import emit_graph
# FIXME how to automatically check for corectness? Is the test passed if a output is stored?
# TODO setup some functionallity in different precision to test precision coloring.
def test_emit_graph_simple_stencil_code(verbose: bool = False, quiet: bool = True) -> None:
input_arr = np.random.rand(1024, 1024)
output_arr = np.zeros_like(input_arr)
src, dst = ps.fields(src=input_arr, dst=output_arr)
src, dst = ps.fields("src, dst: single[2D]", src=input_arr, dst=output_arr) #FIXME using numpy arrays overrides the submitted type of this field.
symbolic_description = ps.Assignment(dst[0,0],
(src[1, 0] + src[-1, 0] + src[0, 1] + src[0, -1]) / 4)
kernel = ps.create_kernel(symbolic_description)
......@@ -102,5 +103,4 @@ if __name__ == "__main__":
test_emit_graph_Poission_kernel(verbose=False, quiet=False)
test_emit_graph_RedBlack_GaussSeidel(verbose=False, quiet=False)
test_emit_graph_CG(verbose=False, quiet=False)
emit_graph_temperature_transport(verbose=False, quiet=False)
# test_dot_ast_printer_RBGS(verbose=False, quiet=False)
\ No newline at end of file
emit_graph_temperature_transport(verbose=False, quiet=False)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment