Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pycodegen
  • pystencilspystencils
  • Issues
  • #20
Closed
Open
Issue created May 01, 2020 by Michael Kuron@kuronMaintainer

Revamp the type system

@bauer had planned to do that before he left, but ran out of time. He has some pretty clear ideas of how the type system should be. It should probably be done relatively quickly as it would make quite a few things a lot easier, e.g. the SIMD stuff. It is also necessary before things like #12 (closed) can be done properly.

The following test (for test_vectorization.py) does not work currently:

def test_vectorized_loop_counter():
    arr = np.zeros((4, 4))
    
    @ps.kernel
    def kernel_equal(s):
        f = ps.fields(f=arr)
        f[0, 0] @= ps.astnodes.LoopOverCoordinate.get_loop_counter_symbol(1)
    ast = ps.create_kernel(kernel_equal).compile()(f=arr)
    arr_ref = arr.copy()
    
    arr = np.zeros((4, 4))
    vectorize(ast, instruction_set=instruction_set)
    ps.show_code(ast)
    ast.compile()(f=arr)
    
    assert np.allclose(arr_ref, arr)

Another problem can be found in the attached jupyter notebook, where in the absence of type_all_numbers floating-point comparisons are used for integers in a conditional.

Finally, automatic conversion of arguments to the type expected by the signature of the SIMD intrinsics is not supported, which made walberla/walberla!414 (diffs) necessary.

Edited Feb 19, 2021 by Michael Kuron
Assignee
Assign to
Time tracking