x10000year opened a new issue #7742: NDArray::WaitToWrite() hangs in custom c++ 
operator. Bug?
URL: https://github.com/apache/incubator-mxnet/issues/7742
 
 
   I'm writing a custom operator in c++. And I try to construct a NDArray 
object from a blob. I use NDArray because it is more dynamic and easier to use 
than mshadow::Tensor. However, I found that a NDAarray object constructed from 
an output blob hangs on call to WaitToWrite(). Is this a bug?
   
   The code is as following:
   
     void Forward(const OpContext &ctx,
         const std::vector<TBlob> &in_data,
         const std::vector<OpReqType> &req,
         const std::vector<TBlob> &out_data,
         const std::vector<TBlob> &aux_args) override {
       CHECK(req[0] == kWriteTo);
       NDArray x(out_data[0], out_data[0].dev_id());
       x.WaitToWrite();  // hangs here
       ...
       x.SyncCopyFromCPU(...);  // which calls WaitToWrite() inside
   }
 
----------------------------------------------------------------
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