Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overflow in collectors #2337

Conversation

AlexanderDokuchaev
Copy link
Collaborator

Changes

Cast float16 and float32 to float64 for mean and median.

Reason for changes

Error on calculation parameters of FQ for large scale.

Tests

test_reducers_and_aggregators.py::test_overflow

@AlexanderDokuchaev AlexanderDokuchaev requested a review from a team as a code owner December 26, 2023 21:55
@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF ONNX Pull requests that updates NNCF ONNX labels Dec 26, 2023
Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (6d17662) 90.88% compared to head (06981fa) 85.91%.
Report is 13 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2337      +/-   ##
===========================================
- Coverage    90.88%   85.91%   -4.97%     
===========================================
  Files          492      492              
  Lines        45115    44674     -441     
===========================================
- Hits         41001    38380    -2621     
- Misses        4114     6294    +2180     
Files Coverage Δ
nncf/common/graph/layer_attributes.py 96.26% <100.00%> (+0.03%) ⬆️
nncf/common/tensor_statistics/collectors.py 88.97% <100.00%> (-6.25%) ⬇️
nncf/openvino/statistics/collectors.py 95.32% <100.00%> (+0.71%) ⬆️
nncf/tensorflow/tensor_statistics/collectors.py 89.86% <100.00%> (ø)
nncf/torch/tensor_statistics/collectors.py 96.04% <95.83%> (+0.17%) ⬆️
nncf/onnx/statistics/collectors.py 0.00% <0.00%> (-80.92%) ⬇️

... and 49 files with indirect coverage changes

Flag Coverage Δ
COMMON 44.83% <100.00%> (+0.36%) ⬆️
ONNX ?
OPENVINO 39.16% <32.05%> (-0.72%) ⬇️
TENSORFLOW 29.60% <5.12%> (+0.24%) ⬆️
TORCH 62.41% <32.05%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
common 93.15% <100.00%> (-0.43%) ⬇️
torch 93.28% <95.83%> (ø)
tensorflow 94.01% <100.00%> (ø)
onnx 0.00% <0.00%> (-97.01%) ⬇️
openvino 90.64% <100.00%> (-1.24%) ⬇️
ptq 82.18% <ø> (-7.59%) ⬇️

@AlexanderDokuchaev AlexanderDokuchaev force-pushed the ad/fix_overflow_in_reducer branch 2 times, most recently from 6272c31 to d857e7f Compare December 27, 2023 02:08
@github-actions github-actions bot added the NNCF TF Pull requests that updates NNCF TensorFlow label Dec 27, 2023
@AlexanderDokuchaev AlexanderDokuchaev merged commit 22b6e58 into openvinotoolkit:develop Jan 8, 2024
7 checks passed
MaximProshin added a commit that referenced this pull request Jan 10, 2024
AlexanderDokuchaev pushed a commit that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF Common Pull request that updates NNCF Common NNCF ONNX Pull requests that updates NNCF ONNX NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PT Pull requests that updates NNCF PyTorch NNCF TF Pull requests that updates NNCF TensorFlow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants