Skip to content

Make zeros_like work with shapeless compile / export. #2599

Description

@josharian

Hi! Thanks very much for mlx.

I'm trying to use shapeless exports and I'm hitting "cannot infer output shapes" for a few ops that seem like they should support shapeless use.

The first one I hit was Conv. I tried adding Conv::output_shape, and it appears to work. Should I send a PR with this, or is there some reason it isn't implemented?

The next was zeros_like. It uses Full, which doesn't implement output_shape. But zeros_like seems naively like it should be sufficiently shapeless. Should there be a FullLike? Or some other more direct way to do zeros_like and ones_like in a shapeless manner? Or am I missing something here?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions