tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[BUG] TFLite quantized ResNet50 test output mismatch when run on `arm_cpu` target

Open lhutton1 opened this issue 1 year ago • 0 comments
trafficstars

Expected behaviour:

No output mismatch.

Actual behaviour:

When compiled on an arm_cpu target, the model results in an output mismatch:

E       AssertionError:
E       Not equal to tolerance rtol=1e-07, atol=1e-07
E
E       Mismatched elements: 3 / 3 (100%)
E       Max absolute difference: 878
E       Max relative difference: 8.69306931
E        x: array([979, 972, 970])
E        y: array([101, 386, 385])

Environment:

Tested with TVM at https://github.com/apache/tvm/commit/6a3fadc0654ecf9557ffe08d24677684c96e80b0. The issue was found as a result of the changes in https://github.com/apache/tvm/pull/16513, however it can be reproduced without as described below.

Run on a Graviton 3 instance.

How to reproduce:

Run the test pytest tests/python/frontend/tflite/test_forward.py -k test_forward_tflite2_qnn_resnet50 with an arm_cpu target. Note: Reminder to remove any skip condition that exists in the test currently.

lhutton1 avatar Feb 07 '24 10:02 lhutton1