You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/06/14 09:34:55 UTC

[GitHub] [incubator-mxnet] mozga-intel commented on issue #20196: Decouple oneDNN data structures in MXNet C++ API

mozga-intel commented on issue #20196:
URL: https://github.com/apache/incubator-mxnet/issues/20196#issuecomment-860544111


   Thanks, @szha, @leezu for this issue.
   
   Currently, there are a lot of places, where it is needed. I got a few ideas to discuss. Since we can't define a variable/objects in a header file as an explicitly defined object `const mkldnn::memory::desc &md` and if this type is used by multiple functions: (i.e `Reorder2DefaultAsync` ), then the object might be passed by using a void pointer `const void *md`.  In the same way, each time you call oneDNN function, the `static_cast` is needed to create a particular object.
   ```
   const mkldnn::memory *mem = static_cast<const mkldnn::memory *>(GetMKLDNNData());
   ```
   
   Therefore, a header might be placed in *cc file. 
   Please have a look: #20349
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org