You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: