-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
The existing spec allows to use negative value to define unknown dimension in an MLOperandDescriptor as
dictionary MLOperandDescriptor {
// The operand type.
required MLOperandType type;
// The dimensions field is only required for tensor operands.
// The negative value means an unknown dimension.
sequence<long> dimensions;
};However, according to the investigation of native ML APIs used by WebNN-native implementation, this feature is not supported widely. The following table captures some examples for reference:
| native API | data type of dimension value |
|---|---|
| XNNPACK | size_t |
| DirectML | UINT |
| NNAPI | uint32_t |
| MLAS | size_t |
| OpenVINO | size_t |
| BNNS | size_t |
| MPS | NSUInteger |
Given that, I'd like to propose to remove the support of negative dimension values and use unsigned long data type instead.
/cc @yuhonglin, thanks for raising this issue when reviewing a Chromium WebNN CL.
fdwr
Metadata
Metadata
Assignees
Labels
No labels