Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion is triggered when using snax-copy-to-dma #247

Open
JosseVanDelm opened this issue Sep 19, 2024 · 0 comments
Open

assertion is triggered when using snax-copy-to-dma #247

JosseVanDelm opened this issue Sep 19, 2024 · 0 comments

Comments

@JosseVanDelm
Copy link
Contributor

I found that the following code will trigger an assertion when using snax-copy-to-dma

builtin.module {
  builtin.module {
    func.func public @simple_mult(%arg0 : memref<?x?xi8, "L3">, %arg1 : memref<?x?xi8, "L1">) {
      "memref.copy"(%arg0, %arg1) : (memref<?x?xi8, "L3">, memref<?x?xi8, "L1">) -> ()
      func.return
    }
  }
  builtin.module {
    func.func public @simple_mult(%arg0 : memref<?x?xi8, strided<[1, 16]>, "L3">, %arg1 : memref<?x?xi8, strided<[1, 16]>, "L1">) {
      "memref.copy"(%arg0, %arg1) : (memref<?x?xi8, strided<[1, 16]>, "L3">, memref<?x?xi8, strided<[1, 16]>, "L1">) -> ()
      func.return
    }
  }
}

Will give the error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/xdsl/pattern_rewriter.py", line 802, in _process_worklist
    self.pattern.match_and_rewrite(op, rewriter)
  File "/usr/local/lib/python3.10/dist-packages/xdsl/pattern_rewriter.py", line 431, in impl
    func(self, op, rewriter)
  File "/repo/compiler/transforms/snax_copy_to_dma.py", line 369, in match_and_rewrite
    assert lcb[-1].bound is not None
AssertionError

Checked on 75f3193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant