Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly compare floats in fully-connected-operator-tester (pytorch#8…
…2688) Need to use `ASSERT_FLOAT_EQ` for floats. Right now the test often fails internally like this: ``` xplat/caffe2/aten/src/ATen/native/quantized/cpu/qnnpack/test/fully-connected-operator-tester.h:362 Expected equality of these values: output_dynamic[i * outputChannels() + c] Which is: -601.09 ((float)accumulators[i * outputChannels() + c] * requantization_scales[c]) + float(bias[c]) Which is: -601.09 at 0, 18: reference = -601.0899658203125, optimized = -601.09002685546875 ``` ``` xplat/caffe2/aten/src/ATen/native/quantized/cpu/qnnpack/test/fully-connected-operator-tester.h:362 Expected equality of these values: output_dynamic[i * outputChannels() + c] Which is: -65.6251 ((float)accumulators[i * outputChannels() + c] * requantization_scales[c]) + float(bias[c]) Which is: -65.6251 at 0, 7: reference = -65.625106811523438, optimized = -65.625099182128906 ``` Pull Request resolved: pytorch#82688 Approved by: https://github.com/mehtanirav
- Loading branch information