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 2021/04/14 18:49:30 UTC

[GitHub] [incubator-mxnet] samskalicky commented on a change in pull request #20043: [WIP]C API Enhancement

samskalicky commented on a change in pull request #20043:
URL: https://github.com/apache/incubator-mxnet/pull/20043#discussion_r613506332



##########
File path: src/storage/pooled_storage_manager.h
##########
@@ -69,6 +70,11 @@ class GPUPooledStorageManager final : public StorageManager {
       LOG(FATAL) << "MXNET_GPU_MEM_POOL_PAGE_SIZE cannot be set to a value smaller than " << NDEV \
                  << ". Got " << page_size_ << ".";
     }
+    memory_limit_percentage_ = dmlc::GetEnv<double>("MXNET_GPU_MEM_LIMIT", 100.0);
+    if (memory_limit_percentage_ <= 0 || memory_limit_percentage_ > 100) {
+      LOG(FATAL) << "Invalid memory limit percentage given: " << memory_limit_percentage_
+                 << std::endl;
+    }

Review comment:
       according to https://mxnet-bing.readthedocs.io/en/latest/how_to/env_var.html
   
   > MXNET_GPU_MEM_POOL_RESERVE (default=5) is The percentage of GPU memory to reserve for things other than the GPU array, such as kernel launch or cudnn handle space.
   
   So its more like the inverse. Instead of saying how much you want to "leave for other things", `MXNET_GPU_MEM_LIMIT` is for how much memory you want to "give" MXNet in particular. 
   
   




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