apeforest commented on a change in pull request #13043: Fix test failure due to 
hybridize call in test_gluon_rnn.test_layer_fill_shape
URL: https://github.com/apache/incubator-mxnet/pull/13043#discussion_r233178847
 
 

 ##########
 File path: src/imperative/cached_op.cc
 ##########
 @@ -855,10 +855,15 @@ OpStatePtr CachedOp::Forward(
   int prev_bulk_size = Engine::Get()->set_bulk_size(config_.forward_bulk_size);
 
   OpStatePtr op_state;
-  if (config_.static_alloc) {
-    op_state = StaticForward(default_ctx, inputs, outputs);
-  } else {
-    op_state = DynamicForward(default_ctx, inputs, outputs);
+  try {
 
 Review comment:
   This change looks good to me. One nit suggestion would be: is it cleaner by 
using a RAII class object to manage the bulk_size value instead of a local 
variable? Doing that we may also get rid of the try block. Not something 
necessary, but I would love to hear some comments on this.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to