File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -235,10 +235,13 @@ WorkerImpl::estimate_kv_cache_capacity_async() {
235
235
236
236
void WorkerImpl::update_last_step_output (
237
237
const std::optional<ForwardOutput>& output) {
238
- if (output.value ().sample_output .next_tokens .defined () || FLAGS_enable_eplb ) {
238
+ if (output.value ().sample_output .next_tokens .defined ()) {
239
239
last_step_output_ = std::move (output.value ());
240
240
last_step_output_valid_ = true ;
241
241
} else {
242
+ if (FLAGS_enable_eplb) {
243
+ last_step_output_ = std::move (output.value ());
244
+ }
242
245
last_step_output_valid_ = false ;
243
246
}
244
247
}
@@ -281,7 +284,7 @@ void WorkerImpl::prepare_work_before_execute(const ForwardInput& inputs,
281
284
is_prefill);
282
285
processed_inputs.input_params .dp_ep_padding_data = dp_ep_padding.build ();
283
286
if (FLAGS_enable_eplb) {
284
- expert_load_data_.fill_ (0 );
287
+ // expert_load_data_.fill_(0);
285
288
processed_inputs.input_params .expert_load_data = expert_load_data_;
286
289
}
287
290
}
@@ -339,7 +342,7 @@ ForwardOutput WorkerImpl::get_last_step_result() {
339
342
ForwardOutput output;
340
343
std::unique_lock<std::mutex> lock (mtx_);
341
344
cv_.wait (lock, [this ] { return is_recorded_; });
342
- if (last_step_output_valid_) {
345
+ if (last_step_output_valid_ || FLAGS_enable_eplb ) {
343
346
output = last_step_output_;
344
347
}
345
348
is_recorded_ = false ;
You can’t perform that action at this time.
0 commit comments