Skip to content

Consider supporting shape schemes for tensor functions #404

@lukstafi

Description

@lukstafi

This is conceptually very simple but adds code complexity. It would work automatically for functions under syntax extensions. We would apply the function to a "tracing tensor" and would store the inferred shape constraints (not shapes since we don't know what the function returns, it could be more than just a single tensor). Application would then freshen the constraint and include it with equalities for the correspondence between the tracing tensor and applied tensor shapes.

The two big benefits are: earlier shape error catching -- although some errors still delayed to "finish inference" passes; and improvement to shape inference efficiency (with a downstream benefit to shape inference debugging).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions