Skip to content

Replace usage of nvFuser's broadcast_in_dim in executor with broadcast+expand ops #2765

@IvanYashchuk

Description

@IvanYashchuk

🚀 Feature

Replace usage of nvFuser's broadcast_in_dim in the executor with broadcast + expand operations.

Motivation

Currently, the Thunder executor uses nvFuser's broadcast_in_dim for broadcasting, as seen here.

Jacob suggested (in this PR review) that using explicit broadcast and expand ops would be preferable. This change would improve the developer experience by creating a closer match between Python-defined fusions and nvFuser's "math/kernel" representation.

Pitch

Update the executor logic to replace the direct usage of broadcast_in_dim with a combination of broadcast and expand operations where applicable.

Alternatives

Continue using broadcast_in_dim as it is currently implemented.

Additional context

cc @mruberry

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