[BUG] KeyError: 'attempt to access a non-existent attribute'
Opened this issue · 0 comments
chhzh123 commented
An error in the buffer generation pass.
import allo
from allo.ir.types import int32
def func(A: int32[8]) -> int32[8]:
return A
def top(A: int32[8]) -> int32[8]:
return func(A)
s = allo.customize(top)
print(s.module)
s.build(target="vitis_hls", mode="csim")
This will lead to the following error:
Traceback (most recent call last):
File "/scratch/users/hc676/allo/test.py", line 12, in <module>
s.build(target="vitis_hls", mode="csim")
File "/scratch/users/hc676/allo/allo/customize.py", line 685, in build
return HLSModule(
^^^^^^^^^^
File "/scratch/users/hc676/allo/allo/backend/hls.py", line 175, in __init__
buffers = generate_input_output_buffers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/users/hc676/allo/allo/passes.py", line 159, in generate_input_output_buffers
MockBuffer(top_func_name, arg.owner.attributes["name"].value)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'attempt to access a non-existent attribute'