Skip to content

Out-of-bounds array access (?) #788

Answered by inducer
nicknytko asked this question in Q&A
Discussion options

You must be logged in to vote

As it stands, loopy isn't aware that ny is supposed to be a domain size parameter, which prevents assumptions on it from working. This:

import loopy

kernel = loopy.make_kernel(
    "[nx,ny] -> { [i] : 0 <= i < nx }",
    """
    q[i, 0] = q[i, ny - 2] {id=insn0}
    q[i, ny - 1] = q[i, 1] {id=insn1}
    """,
    assumptions="ny>=3")

does work.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nicknytko
Comment options

@inducer
Comment options

Answer selected by nicknytko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants