Skip to content

Bug in handling Multiply with broadcasted channels #510

@AvrahamRaviv

Description

@AvrahamRaviv

In my forward pass I have:

y = mask * x
# mask.shape: [B, 1, H, W]
# x.shape: [B, 32, H, W]

When I try to prune, the dependency builder forces the output channels of mask (1 channel) to match the output channels of x (32 channels), even though broadcasting should allow different channel counts.

This causes unintended coupling between the two branches and prevents pruning only the x path. I believe the dependency analysis for element-wise multiplication should handle broadcasted channel dimensions without forcing channel equality.

Any idea or solution?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions