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/05/11 00:00:47 UTC

[GitHub] anirudh2290 commented on a change in pull request #10888: Fix thread local.

anirudh2290 commented on a change in pull request #10888: Fix thread local.
URL: https://github.com/apache/incubator-mxnet/pull/10888#discussion_r187491601
 
 

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_act.cc
 ##########
 @@ -134,7 +134,11 @@ class MKLDNNActForward {
 static MKLDNNActForward &GetActForward(const ActivationParam& param,
                                        const OpContext &ctx, const NDArray &in_data,
                                        const mkldnn::memory &in_mem) {
+#if DMLC_CXX11_THREAD_LOCAL
   static thread_local std::unordered_map<MKLDNNActSignature, MKLDNNActForward, OpHash> fwds;
+#else
+  static MX_THREAD_LOCAL std::unordered_map<MKLDNNActSignature, MKLDNNActForward, OpHash> fwds;
 
 Review comment:
   do we need to make this change here too: https://github.com/apache/incubator-mxnet/blob/35fb9ea1093bd0006a396b5e493e5949b66ca33e/src/c_api/c_api_profile.cc#L115 ?

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