cjolivier01 commented on a change in pull request #9002: Misc performance 
changes
URL: https://github.com/apache/incubator-mxnet/pull/9002#discussion_r155867731
 
 

 ##########
 File path: src/imperative/imperative_utils.h
 ##########
 @@ -453,7 +453,7 @@ inline void PushOperator(const OpStatePtr& state,
         << "for stateful operator " << op->name;
     CHECK(exec_type == ExecType::kSync || exec_type == ExecType::kAsync);
     Engine::Get()->PushSync(
-      [state, fcompute, inputs, outputs, requested, is_train, exec_type, 
mutate_idx, req](
+      [&state, fcompute, &inputs, &outputs, &requested, is_train, exec_type, 
&mutate_idx, &req](
 
 Review comment:
   That this lambda is executed before this Push() call returns? Now that I 
think about it I probably should have verified that but I just always thought 
this was the case.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to