Closed canxcao closed 5 years ago
I tried the chromium nightly build 313c1c2, most negative tests passed except for the following case:
Steps:
Run https://brucedai.github.io/nt/testa/index-local.html?backend=nnapi, check the tests in #setOperandValue API
:
This issue was fixed on nightly build 8e6c6d1.
Test Env: Chromium Version : nightly build 65.0.3324.0 (revision f9e1a31) OS : Android 8.1.0;Pixel 2
Expected Result:
Exception should be thrown when operand has the type of INT32 or TENSOR_INT32 and its value isn’t Int32Arrary
Exception should be thrown when operand has the type of FLOAT32 or TENSOR_FLOAT32 and its value isn’t Float32Arrary
Exception should be thrown when operand has the type of UINT32 and its value isn’t Uint32Arrary
Exception should be thrown when operand has the type of TENSOR_QUANT8_ASYMM and its value isn’t Uint8Arrary
Exception should be thrown when operand is scale and the length of its value is greater than 1.
Actual Result: No exception is thrown when an argument passed to setOperandValue() is incompatible with the type expected
How to reproduce: Set the following incompatible value:
Add an operand with a FLOAT32 scalar or TENSOR_FLOAT32 tesnsor, but set its value to a different type(not Float32Arrary):
Add an operand with a INT32 scalar or TENSOR_INT32 tensor, but set its value to a different type(not Int32Arrary):
Add an operand with a UINT32 scalar, but set its value to a different type(not Uint32Arrary):
For example: