diff --git a/src/ops/attention.cc b/src/ops/attention.cc index 9c9c87bd56..584a84f503 100644 --- a/src/ops/attention.cc +++ b/src/ops/attention.cc @@ -824,7 +824,7 @@ bool MultiHeadAttention::measure_operator_cost( cost_metrics.outputs_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, query_ptr, query_grad_ptr, diff --git a/src/ops/batch_norm.cc b/src/ops/batch_norm.cc index 4027313a20..03ef486e5f 100644 --- a/src/ops/batch_norm.cc +++ b/src/ops/batch_norm.cc @@ -286,7 +286,7 @@ bool BatchNorm::measure_operator_cost(Simulator *sim, cost_metrics.weights_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel(m, input_ptr, output_grad_ptr, diff --git a/src/ops/concat.cc b/src/ops/concat.cc index 2c86b80cb7..8014d1e145 100644 --- a/src/ops/concat.cc +++ b/src/ops/concat.cc @@ -426,7 +426,7 @@ bool Concat::measure_operator_cost(Simulator *sim, cost_metrics.backward_time = Simulator::MAXIMUM_TASK_RUN_TIME; return true; } - backward = [&] { + backward = [=] { backward_kernel_wrapper( m, output_grad_acc, input_grad_accs, numInputs, legion_axis); }; diff --git a/src/ops/dropout.cc b/src/ops/dropout.cc index 55f6730827..e4021a404e 100644 --- a/src/ops/dropout.cc +++ b/src/ops/dropout.cc @@ -326,7 +326,7 @@ bool Dropout::measure_operator_cost(Simulator *sim, cost_metrics.outputs_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, output_grad_ptr, input_grad_ptr); }; } diff --git a/src/ops/element_binary.cc b/src/ops/element_binary.cc index b90e85588b..dfe60fcee8 100644 --- a/src/ops/element_binary.cc +++ b/src/ops/element_binary.cc @@ -764,7 +764,7 @@ bool ElementBinary::measure_operator_cost(Simulator *sim, cost_metrics.outputs_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, output_grad_ptr, input1_ptr, diff --git a/src/ops/element_unary.cc b/src/ops/element_unary.cc index f99d9f7496..252f66b7e8 100644 --- a/src/ops/element_unary.cc +++ b/src/ops/element_unary.cc @@ -638,7 +638,7 @@ bool ElementUnary::measure_operator_cost(Simulator *sim, cost_metrics.outputs_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, input_ptr, input_grad_ptr, diff --git a/src/ops/flat.cc b/src/ops/flat.cc index b5490ddc99..669c457709 100644 --- a/src/ops/flat.cc +++ b/src/ops/flat.cc @@ -357,7 +357,7 @@ bool Flat::measure_operator_cost(Simulator *sim, assert(output_grad_ptr != NULL); assert(input_grad_ptr != NULL); - backward = [&] { + backward = [=] { backward_kernel_wrapper(input_grad_ptr, output_grad_ptr, num_elements); }; } diff --git a/src/ops/layer_norm.cc b/src/ops/layer_norm.cc index a6928e7d17..4ad7fb4447 100644 --- a/src/ops/layer_norm.cc +++ b/src/ops/layer_norm.cc @@ -505,7 +505,7 @@ bool LayerNorm::measure_operator_cost(Simulator *sim, return true; } - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, out_grad_ptr, in_ptr, diff --git a/src/ops/linear.cc b/src/ops/linear.cc index 75c51b41b9..4c9bb8dc51 100644 --- a/src/ops/linear.cc +++ b/src/ops/linear.cc @@ -875,7 +875,7 @@ bool Linear::measure_operator_cost(Simulator *sim, cost_metrics.backward_time = Simulator::MAXIMUM_TASK_RUN_TIME; return true; } - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, input_ptr, input_grad_ptr, diff --git a/src/ops/reduce.cc b/src/ops/reduce.cc index 5761281686..e25d810c6c 100644 --- a/src/ops/reduce.cc +++ b/src/ops/reduce.cc @@ -344,7 +344,7 @@ bool Reduce::measure_operator_cost(Simulator *sim, GenericTensorAccessorR output_grad_acc( outputs[0]->data_type, sub_output.get_domain(), output_grad_ptr); - backward = [&] { + backward = [=] { backward_kernel_wrapper(m, output_grad_acc, input_grad_acc); }; } diff --git a/src/ops/reverse.cc b/src/ops/reverse.cc index e78962f697..04c744f774 100644 --- a/src/ops/reverse.cc +++ b/src/ops/reverse.cc @@ -282,7 +282,7 @@ bool Reverse::measure_operator_cost(Simulator *sim, cost_metrics.outputs_memory += cost_metrics.total_mem_diff_from(sim->offset); - backward = [&] { + backward = [=] { backward_kernel_wrapper(output_grad_ptr, input_grad_ptr, num_out_blks,