Use unsigned integer axis#359
Conversation
It also fixes the batchNorm default axis value.
|
@huningxin : Should we split the |
fdwr
left a comment
There was a problem hiding this comment.
Thanks. Minor proposals, but I'm also content as-is. Rescanning the spec, it appears you got all the "long axis" and "sequence" occurrences. 👍
1. Leave the fix of webmachinelearning#307 to a separate PR 2. Refine MLTransposeOptions.permutation and MLSliceOptions.axes with examples
sgtm. I removed the change of |
|
Thanks for the review and approvals. With that, I am going to merge this PR. |
SHA: 2e302c9 Reason: push, by huningxin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This CL implements the WebNN spec change [1] that changes axis of concat MLOperator to be an unsigned integer. The MLGraphBuilder and MLGraphBuilderTest are also updated according to this IDL change. [1]: webmachinelearning/webnn#359 Bug: 1273291 Change-Id: I519a070e6b2fed78cecc736004895c67bda9c785 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4328150 Commit-Queue: Bin Miao <[email protected]> Reviewed-by: Jiewei Qian <[email protected]> Cr-Commit-Position: refs/heads/main@{#1115579}
This CL implements the WebNN spec change [1] that changes axis of both resample2d MLOperator and transpose MLOperator to be sequence<unsigned long>. The MLGraphBuilderTests are also updated according to this IDL change. [1]: webmachinelearning/webnn#359 Bug: 1273291 Change-Id: I1bfbc431481ee5ee55022b88cf77ba8436d25319 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4331801 Reviewed-by: Jiewei Qian <[email protected]> Commit-Queue: Lisha Guo <[email protected]> Cr-Commit-Position: refs/heads/main@{#1117357}
|
@huningxin : I should have noticed earlier while reviewing, but I just noticed |
|
Thanks @fdwr . This PR focused on the axis/axes, so it just changed However, I agree with you that using I propose to open a separate issue to track it, WDYT? |
|
@huningxin : 👍 Separate issue - thanks.
Yeah, we see that every other
🤔⏳ Not sure, as I want to know what XNNPack does first too (DML_SLICE1_OPERATOR_DESC expects all dimensions to be listed explicitly, and unchanged dimensions just use the full range), but I generally lean the direction of being more explicit for WebNN. |
+1 |
fix #345, #317
This PR makes the axis/axes definitions consistent by using the unsigned integer type and valid value range [0, N-1] where N is the tensor rank across the spec.
@wchao1115 @wacky6 @fdwr @anssiko @pyu10055 @RafaelCintron , PTAL. Thanks!
Preview | Diff