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

removed assert for flakey static stride scheduler with multiple threads #10437

Merged
merged 8 commits into from
Jul 31, 2023
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