mozga-intel commented on a change in pull request #20621:
URL: https://github.com/apache/incubator-mxnet/pull/20621#discussion_r744752804



##########
File path: src/operator/nn/dnnl/dnnl_concat-inl.h
##########
@@ -52,13 +52,18 @@ class DNNLConcatFwd {
 
 static DNNLConcatFwd& GetConcatForward(int concat_dim,
                                        const std::vector<NDArray>& in_data,
-                                       const std::vector<dnnl::memory::desc>& 
data_md) {
+                                       const std::vector<dnnl::memory::desc>& 
data_md,
+                                       int cache_dim = -1) {
 #if DMLC_CXX11_THREAD_LOCAL
   static thread_local std::unordered_map<OpSignature, DNNLConcatFwd, OpHash> 
fwds;
 #else
   static MX_THREAD_LOCAL std::unordered_map<OpSignature, DNNLConcatFwd, 
OpHash> fwds;
 #endif
+  if (cache_dim == -1) {
+    cache_dim = concat_dim;

Review comment:
       What is the advantage of adding the same value here (twofold: cache_dim 
if cache_dim == 1)?




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