Skip to content

Commit 21bcba5

Browse files
philloooochromium-wpt-export-bot
authored andcommitted
webnn: fix int32 quantizeLinear on CoreML and add test
Change-Id: I8c9f7d8098205d1f1772fcc75a18bd74a121ad5b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6431631 Reviewed-by: Reilly Grant <[email protected]> Commit-Queue: Phillis Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1442792}
1 parent a908afb commit 21bcba5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

webnn/conformance_tests/quantizeLinear.https.any.js

+38
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,44 @@ const quantizeLinearTests = [
574574
}
575575
}
576576
}
577+
},
578+
579+
{
580+
'name': 'quantizeLinear int32 1D tensor with float32 scalar scale',
581+
'graph': {
582+
'inputs': {
583+
'quantizeLinearInput': {
584+
'data': [-22405.495643615723, 7391418.921366602],
585+
'descriptor': {shape: [2], dataType: 'float32'},
586+
'constant': false
587+
},
588+
'quantizeLinearScale': {
589+
'data': [1.1202747821807861, 0.2800687253475189],
590+
'descriptor': {shape: [2], dataType: 'float32'},
591+
'constant': true
592+
},
593+
'quantizeLinearZeroPoint': {
594+
'data': [32345, -2445234],
595+
'descriptor': {shape: [2], dataType: 'int32'},
596+
'constant': true
597+
}
598+
},
599+
'operators': [{
600+
'name': 'quantizeLinear',
601+
'arguments': [
602+
{'input': 'quantizeLinearInput'},
603+
{'scale': 'quantizeLinearScale'},
604+
{'zeroPoint': 'quantizeLinearZeroPoint'}
605+
],
606+
'outputs': 'quantizeLinearOutput'
607+
}],
608+
'expectedOutputs': {
609+
'quantizeLinearOutput': {
610+
'data': [12345, 23946213],
611+
'descriptor': {shape: [2], dataType: 'int32'}
612+
}
613+
}
614+
}
577615
}
578616
];
579617

0 commit comments

Comments
 (0)