Skip to content

error when value is a np.array int #2605

Open
@ecilay

Description

@ecilay

(1,) if isinstance(value, (int, float, bool)) else value.shape,

In this line, if the value is a np.array int, eg, a = np.array(50), then a.shape would be empty, and the ctx.net.add_constant function would throw Type error: incompatible function arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: triaged [verified]We can replicate the bugcomponent: dynamoIssues relating to the `torch.compile` or `torch._dynamo.export` paths

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions