Skip to content

[Relay] Enhance OpFusion for Tuple #2183

Description

@masahi

The current fusion implementation cannot fuse concat with anything before it. For example, upsampling + concat, which is common in image segmentation networks, cannot be fused into a single op. The NNVM v1 fusion algorithm has no problem fusing them.

The problem is that the concat op takes a single TupleNode as input, but the current fusion implementation will not fuse two ops if there is a tuple node between them (code here). I tried to tweak the fusion algorithm by unpacking a tuple node etc, but so far I have no success.

Ideally I want to get rid off TupleNode and let Concat op take a variable number of arguments, just like NNVM v1 concat op does. Is it a good idea? Can Relay handle a op with a variable number of arguments?

cc @tqchen @junrushao1994 @jroesch @vinx13

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions