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 2019/05/24 01:53:06 UTC
[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request
#14973: [MXNET-1404] Added the GPU memory profiler
anirudh2290 commented on a change in pull request #14973: [MXNET-1404] Added the GPU memory profiler
URL: https://github.com/apache/incubator-mxnet/pull/14973#discussion_r287190566
##########
File path: include/mxnet/ndarray.h
##########
@@ -1071,7 +1227,11 @@ class NDArray {
// free storage
Storage::Get()->Free(aux_handles[i]);
// init aux storage
- aux_handles[i] = Storage::Get()->Alloc(aux_bytes, ctx);
+ aux_handles[i] = Storage::Get()->Alloc(aux_bytes, ctx
+#if MXNET_ENABLE_STORAGE_TAGGING
+ , shandle.tag + ":" + AuxIdxToString(i)
+#endif // MXNET_ENABLE_STORAGE_TAGGING
Review comment:
can we avoid this preprocessor directive between a statement. To elaborate, change this to:
```
# if MXNET_ENABLE_STORAGE_TAGGING
aux_handles[i] = Storage::Get()->Alloc(aux_bytes, ctx, shandle.tag + ":" + AuxIdxToString(i));
#else
aux_handles[i] = Storage::Get()->Alloc(aux_bytes, ctx);
#endif
```
----------------------------------------------------------------
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
With regards,
Apache Git Services