yuxihu 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_r233183599
 
 

 ##########
 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:
   Thanks for the suggestion. It can be done but try-catch also gives us more 
flexibility to do more things (like your comment above which we need to do more 
cleanup upon exception). Prefer to keep try-catch here.

----------------------------------------------------------------
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