Skip to content

Commit b1163dc

Browse files
authored
Fixes issue #156414: Fixes bug in implementation of _combine_histogram (Follow up) (#2418)
Fixes issue #156414: Fixes bug in implementation of _combine_histograms in torchao/.
1 parent 6f9f969 commit b1163dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchao/quantization/pt2e/observer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ def _combine_histograms(
12481248
# If the orig hist only has one value (i.e., the min and max are the same)
12491249
# we can just add it into new histogram
12501250
if orig_min == orig_max:
1251-
bin_value = torch.sum(update_hist)
1251+
bin_value = torch.sum(orig_hist)
12521252
transformed_orig_hist = (
12531253
torch.histc(orig_min, bins=self.bins, min=update_min, max=update_max) # type: ignore[arg-type]
12541254
* bin_value

0 commit comments

Comments
 (0)