Skip to content

Commit

Permalink
(backport v1.57) removed assert statement for static stride scheduler…
Browse files Browse the repository at this point in the history
… with multiple threads (#10438)
  • Loading branch information
tonyjongyoonan committed Jul 31, 2023
1 parent 503883b commit 38e0a0f
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,7 @@ long getSequence() {
* an offset that varies per backend index is also included to the calculation.
*/
int pick() {
int i = 0;
while (true) {
i++;
long sequence = this.nextSequence();
int backendIndex = (int) (sequence % scaledWeights.length);
long generation = sequence / scaledWeights.length;
Expand All @@ -442,7 +440,6 @@ int pick() {
if ((weight * generation + offset) % K_MAX_WEIGHT < K_MAX_WEIGHT - weight) {
continue;
}
assert i <= scaledWeights.length : "scheduler has more than one pass through";
return backendIndex;
}
}
Expand Down

0 comments on commit 38e0a0f

Please sign in to comment.