Skip to content

Commit

Permalink
Fix some for loops with bad iterator types. Reorder heads. (pytorch#628)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#628

Fixes a loop with an incorrect iterator type

Reviewed By: jianyuh

Differential Revision: D29073173

fbshipit-source-id: 32c7065c7ef1935bcedf3498293f577eec28f842
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jun 14, 2021
1 parent ae8ad8f commit a2257d9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/fbgemm/QuantUtils.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#pragma once

#include "./FbgemmBuild.h"
#include "./QuantUtilsAvx2.h"
#include "./Types.h"
#include "./Utils.h"

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <limits>
#include "./FbgemmBuild.h"
#include "./QuantUtilsAvx2.h"
#include "./Types.h"
#include "./Utils.h"

namespace fbgemm {

Expand Down Expand Up @@ -149,7 +150,7 @@ void Dequantize(
int num_threads = 1) {
int i_begin, i_end;
fbgemmPartition1D(thread_id, num_threads, len, i_begin, i_end);
for (std::size_t i = i_begin; i < i_end; i++) {
for (auto i = i_begin; i < i_end; i++) {
dst[i] = Dequantize(src[i], qparams);
}
}
Expand Down

0 comments on commit a2257d9

Please sign in to comment.