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 4
    • Merge requests 4
  • 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
  • #38
Closed
Open
Issue created Oct 05, 2021 by Markus Holzer@holzerOwner

Bug in vectorisation

from pystencils.session import *

vectorization_options = {'instruction_set': "neon",
                         'assume_aligned': True,
                         'nontemporal': True,
                         'assume_inner_stride_one': True,
                         'assume_sufficient_line_padding': True}


g = ps.Field.create_generic("g", spatial_dimensions=2,
                     index_shape=(1,), layout="fzyx", dtype="double")
h = g.new_field_with_different_name("h")

config = ps.CreateKernelConfig(cpu_vectorize_info=vectorization_options)
up = ps.Assignment(g.center, h.center)

ast = ps.create_kernel(up, config=config)
ast.compile()

gives:

clang: warning: /opt/local/lib/libomp/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
/Users/holzer/Library/Caches/pystencils/objectcache/mod_71309076e2e843a225a7d8121d22b552f6c3a9eba5755088cdcc2d92cbd92e4a.cpp:22:74: error: use of undeclared identifier '_stride_g_0'; did you mean '_stride_g_1'?
         if (((uintptr_t) &_data_g_20_10[ctr_0] & _clsize_mask) == 0 && (_stride_g_0*ctr_0 + _stride_g_1*ctr_1 + _clsize/8) < _size_g_0*_size_g_1) {
                                                                         ^~~~~~~~~~~
                                                                         _stride_g_1
/Users/holzer/Library/Caches/pystencils/objectcache/mod_71309076e2e843a225a7d8121d22b552f6c3a9eba5755088cdcc2d92cbd92e4a.cpp:8:156: note: '_stride_g_1' declared here
FUNC_PREFIX void kernel_kernel(double * RESTRICT _data_g, double * RESTRICT const _data_h, int64_t const _size_g_0, int64_t const _size_g_1, int64_t const _stride_g_1, int64_t const _stride_h_1)
                                                                                                                                                           ^
1 error generated.

Vectorisation with a field of undefined size does not work properly at the moment.

Edited Oct 15, 2021 by Markus Holzer
Assignee
Assign to
Time tracking