Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goliaro committed Nov 27, 2024
1 parent 450c98f commit 98e025c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions benchmarking/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ export FF_DEBG_NO_WEIGHTS=1
gdb -ex run --args ./inference/incr_decoding/incr_decoding \
-ll:cpu $NCPUS -ll:gpu $NGPUS -ll:util $NCPUS \
-ll:fsize 20000 -ll:zsize 10000 \
--verbose -lg:prof 1 -lg:prof_logfile prof_%.gz \
-llm-model $MODEL_NAME \
-llm-model $MODEL_NAME --verbose \
-prompt $PROMPT \
-tensor-parallelism-degree $NGPUS \
-log-file ../inference/output/test.out \
-output-file ../inference/output/test.json \
--max-requests-per-batch 1 --max-tokens-per-batch 3000 --max-sequence-length 3000

#--verbose -lg:prof 1 -lg:prof_logfile prof_%.gz \

# ./inference/peft/peft \
# -ll:cpu 4 -ll:gpu $NGPUS -ll:util 2 \
# -ll:fsize 10000 -ll:zsize 10000 \
Expand Down
2 changes: 1 addition & 1 deletion deps/legion
Submodule legion updated from 0d32b3 to c0caf6
2 changes: 1 addition & 1 deletion include/flexflow/request_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class RequestManager {
// std::vector<Legion::PhysicalRegion> const &regions,
// Legion::Context ctx,
// Legion::Runtime *runtime);
static void process_work_from_old_batches_task(
static bool process_work_from_old_batches_task(
Legion::Task const *task,
std::vector<Legion::PhysicalRegion> const &regions,
Legion::Context ctx,
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4690,14 +4690,14 @@ void register_flexflow_internal_tasks(Runtime *runtime,
registrar.add_constraint(ProcessorConstraint(Processor::LOC_PROC));
registrar.set_leaf();
if (pre_register) {
Runtime::preregister_task_variant<
Runtime::preregister_task_variant<bool,
RequestManager::process_work_from_old_batches_task>(
registrar, "RequestManager Process Work from Old Batches Task");
} else {
if (enable_control_replication) {
registrar.global_registration = false;
}
runtime->register_task_variant<
runtime->register_task_variant<bool,
RequestManager::process_work_from_old_batches_task>(registrar);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/request_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -672,15 +672,14 @@ std::pair<BatchConfigFuture, BatchConfigFuture>
launcher3.add_future(std::get<3>(batch_pipeline_entry));
launcher3.add_future(pwfobf);
BatchConfigFuture bcbf = runtime->execute_task(ctx, launcher3);
// return pair of batch futures
return std::make_pair(bcff, bcbf);
}

// future[0]: old_fwd_bc
// future[1]: old_bwd_bc
// future[2]: inference result
// future[3]: wait for bwd to finish
void RequestManager::process_work_from_old_batches_task(
bool RequestManager::process_work_from_old_batches_task(
Task const *task,
std::vector<PhysicalRegion> const &regions,
Context ctx,
Expand All @@ -693,6 +692,7 @@ void RequestManager::process_work_from_old_batches_task(
Future(task->futures[2]).get_result<InferenceResult>();
Future(task->futures[3]).get_void_result(); // wait until bwd is done
rm->process_work_from_old_batches(*old_fwd_bc, *old_bwd_bc, result);
return true;
}

// future[0]: old_fwd_bc
Expand Down

0 comments on commit 98e025c

Please sign in to comment.