You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/14 16:07:44 UTC

[GitHub] junrushao1994 edited a comment on issue #12154: the cond operator doesn't support a function that doesn't require inputs.

junrushao1994 edited a comment on issue #12154: the cond operator doesn't support a function that doesn't require inputs.
URL: https://github.com/apache/incubator-mxnet/issues/12154#issuecomment-412925662
 
 
   @zheng-da Thank you so much for providing this example and very detailed explanation!
   
   To be clear, please allow me to summarize the problem as follows: currently, the implementation of three control flow operators, `foreach`, `cond` and `while_loop`, requires every subgraph to have at least one input.
   
   To my understanding, this is actually a restriction of `CachedOp`: our implementation simply creates a `CachedOp` for each subgraph, but `CachedOp` refuses to create because it requires at least one input.  This is reflected in the stack trace information you provide:
   ```
   [bt] (2) 2   libmxnet.so                         0x000000010673209c mxnet::CachedOp::CachedOp(nnvm::Symbol const&, std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&) + 3164
   [bt] (3) 3   libmxnet.so                         0x00000001068d6865 mxnet::op::LoopState::MakeSharedOp(nnvm::Symbol const&) + 453
   [bt] (4) 4   libmxnet.so                         0x0000000106cbdb74 mxnet::op::LoopState::LoopState(nnvm::Symbol const&) + 164
   ```
   
   I guess it will be great if it could be fixed in ongoing work #11641.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services