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

[BUG] Memref Operation Undefined #296

Open
edzieza opened this issue Feb 9, 2025 · 0 comments
Open

[BUG] Memref Operation Undefined #296

edzieza opened this issue Feb 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@edzieza
Copy link

edzieza commented Feb 9, 2025

Describe the bug

When attempting to run the GPT2 example code, the 'memref' operation is not recognized. More specifically, this is in the context of the 'reshape' function. This was done after trying to generate the hls code for the example in gpt2.py.

To Reproduce

The following lines were added to the bottom of the gpt2.py example code to generate the hls code. Once these were added, the error appeared in the terminal. Note that these lines were compatible with the toy.py example code.

mod = allo.frontend.from_pytorch(module, example_inputs=example_inputs, target="vhls")
print(mod.hls_code)

The complete error log can be seen in the next section.

Buggy output

The output of the bug can be seen below:

error.txt

Expected behavior

I expected the output to be the hls code generated in the terminal, like in toy.py, but this is not what happened. We believe that the "reshape" function may have been renamed to memref.reshape in newer versions of torch/mlir (after allo code was written), so now it can no longer be recognized by allo.

Additional context

All of the necessary extensions/versions were properly installed via the docker on the website. Additionally, the GPT2 code aborts without the addition of these two lines.

@edzieza edzieza added the bug Something isn't working label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant