anko-intel commented on a change in pull request #20624:
URL: https://github.com/apache/incubator-mxnet/pull/20624#discussion_r830946898



##########
File path: include/mxnet/ndarray.h
##########
@@ -771,31 +773,31 @@ class NDArray {
    * This function returns dnnl::memory with the given primitive_desc
    * as long as the array size meets the required size in the given 
primitive_desc.
    */
-  const dnnl::memory* GetDNNLData(const dnnl::memory::desc& md) const;
+  const dnnl::memory* GetDNNLData(const void* md) const;
   /*
    * This function returns dnnl::memory with the given primitive_desc.
    * The returned dnnl::memory will have the same physical layout as
    * the given primitive_desc.
    */
-  const dnnl::memory* GetDNNLDataReorder(const dnnl::memory::desc& md) const;
+  const dnnl::memory* GetDNNLDataReorder(const void* md) const;
 
   /*
    * This function copies data from dnnl memory.
    */
-  void CopyFrom(const dnnl::memory& mem);
+  void CopyFrom(const void* mem);

Review comment:
       ```suggestion
     void CopyFrom(const dnnl::memory* mem);
   ```
   I guess using declared above dnnl::memory should make oneDNN implementation 
not contaminated with many static_cast later (?)

##########
File path: include/mxnet/ndarray.h
##########
@@ -47,6 +44,11 @@
 #error "cxx11 was required for ndarray module"
 #endif
 
+namespace dnnl {
+struct memory;
+struct engine;

Review comment:
       engine is not used in this file. So why it is forward delared here?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to