Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolatendresse committed Dec 16, 2024
1 parent 7898107 commit a577b65
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
6 changes: 1 addition & 5 deletions inference/models/mixtral.cc
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,7 @@ void MIXTRAL::create_mixtral_model(FFModel &ff,
aggregate_inputs[4 + expert_idx] = w2;
}

// TODO uncomment, but is a nice-to-have at this point.. or try normalizing with softmax????
// Tensor topk_values_reduced = ff.reduce_sum(topk_values, {0}, true);
// topk_values = ff.divide(topk_values, topk_values_reduced);

// TODO have 2 fixed inputs instead of 4
// Those two inputs are quick fixes to make aggregate work. They are not used in inference.
Tensor topk_values_DUMMY = ff.softmax(
topk_values,
-1,
Expand Down
4 changes: 0 additions & 4 deletions src/ops/aggregate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ OpMeta *Aggregate::init_task(Task const *task,
}

void Aggregate::forward(FFModel const &ff) {
printf("running Aggregate::forward\n");
printf("\n\n\n\n Aggregate::init is running!!!!!!!!!! \n\n\n\n"); // Don't expect this to run
ArgumentMap argmap;
Context ctx = ff.config.lg_ctx;
Runtime *runtime = ff.config.lg_hlr;
Expand All @@ -344,7 +342,6 @@ void Aggregate::forward(FFModel const &ff) {
0 /*mapper_id*/,
outputs[0]->machine_view.hash());

printf("Entered Aggregate::forward\n");
// gate_preds
launcher.add_region_requirement(RegionRequirement(inputs[0]->part,
0 /*projection id*/,
Expand Down Expand Up @@ -463,7 +460,6 @@ FutureMap Aggregate::inference(FFModel const &ff,
WRITE_ONLY,
EXCLUSIVE,
batch_outputs[0]->region));
// launcher.add_field(n + 2, FID_DATA);
launcher.add_field(n + FIXED_ARG_CNT, FID_DATA);

return runtime->execute_index_space(ctx, launcher);
Expand Down
1 change: 0 additions & 1 deletion src/ops/inc_multihead_self_attention.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ bool IncMultiHeadSelfAttention::get_int_parameter(PMParameter para,
}
}

// Just for benchmarking, don't need that
bool IncMultiHeadSelfAttention::measure_operator_cost(
Simulator *sim, MachineView const &mv, CostMetrics &cost_metrics) const {
return false;
Expand Down
1 change: 0 additions & 1 deletion src/ops/inc_multihead_self_attention.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,6 @@ void IncMultiHeadSelfAttention::inference_kernel_wrapper(
assert(input.data_type == output.data_type);
if (input.data_type == DT_HALF) {
// calling input.get_inc_ptr() below would cause a legion error, "type mismatch get index space domain"
Kernels::IncMultiHeadAttention::inference_kernel(
m, bc, shard_id, input.get_half_ptr(), output.get_half_ptr(), stream);
} else if (input.data_type == DT_FLOAT) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/request_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <nlohmann/json.hpp>
#include <stack>
#include <stdexcept>
#include <cassert> // For assert
#include <cassert>

namespace FlexFlow {

Expand Down

0 comments on commit a577b65

Please sign in to comment.