Skip to content

When creating workers, passing lists of object FIFOs causes error: 'NoneType' object has no attribute 'tile'. Is this intentional? #2547

@RonZ13

Description

@RonZ13

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

No one assigned

    Labels

    qualityImprove code quality: maintainability, cleanup, code reorganization.questionFurther information is requestedtriagedThis has been looked at and triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions