-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
qualityImprove code quality: maintainability, cleanup, code reorganization.Improve code quality: maintainability, cleanup, code reorganization.questionFurther information is requestedFurther information is requestedtriagedThis has been looked at and triagedThis has been looked at and triaged
Description
Hello there,
I noticed that when I pass in a list of object FIFO when creating workers, like the code below, it cauese error: 'NoneType' object has no attribute 'tile'.
def core_func(in_fifos, in_fifos):
in_item = in_fifos[0].acquire(1)
out_item = out_fifos[0].acquire(1)
...
in_fifos[0].release(1)
out_fifos[0].release(1)
in_fifos = []
out_fifos = []
in_fifos.append(of_in_L2L1.cons())
out_fifos.append(of_out_L1L2.prod())
Worker(
core_func,
[in_fifos, out_fifos],
)
To avoid this error, I have to explicitly write out the input, like the code below.
def core_func(in_fifo, in_fifo):
in_item = in_fifo.acquire(1)
out_item = out_fifo.acquire(1)
...
in_fifo.release(1)
out_fifo.release(1)
Worker(
core_func,
[of_in_L2L1.cons(), of_out_L1L2.prod()],
)
OR
def core_func(*fifos):
in_item = fifos[0].acquire(1)
out_item = fifos[1].acquire(1)
...
fifos[0].release(1)
fifos[1].release(1)
in_fifos = []
out_fifos = []
in_fifos.append(of_in_L2L1.cons())
out_fifos.append(of_out_L1L2.prod())
Worker(
core_func,
[*in_fifos, *out_fifos],
)
Is this intentional?
Regards,
Ron
Metadata
Metadata
Assignees
Labels
qualityImprove code quality: maintainability, cleanup, code reorganization.Improve code quality: maintainability, cleanup, code reorganization.questionFurther information is requestedFurther information is requestedtriagedThis has been looked at and triagedThis has been looked at and triaged