Skip to content

Make MLOperandDescriptor.shape a required dictionary member #758

Description

@a-sully

Follow-up to #669. Proposed diff:

dictionary MLOperandDescriptor {
  required MLOperandDataType dataType;
-  sequence<[EnforceRange] unsigned long> shape = [];
+  required sequence<[EnforceRange] unsigned long> shape;
};

MLOperandDescriptor.shape is currently optional and defaults to a scalar. This may lead to hard-to-track-down bugs, which I've been personally bitten by!

From @reillyeon on this comment:

[Requiring this member will] make declaring scalars more verbose but I think on the whole it seems like a good idea to help developers avoid mistakes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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