ArmageddonKnight commented on a change in pull request #17376: [MXNET-1404]
Implement storage tagging, the first half of the memory profiler
URL: https://github.com/apache/incubator-mxnet/pull/17376#discussion_r368258935
##########
File path: src/resource.cc
##########
@@ -420,27 +422,29 @@ void* Resource::get_host_space_internal(size_t size)
const {
#if MXNET_USE_CUDNN == 1
void Resource::get_cudnn_dropout_desc(
- cudnnDropoutDescriptor_t* dropout_desc,
+ cudnnDropoutDescriptor_t *dropout_desc,
mshadow::Stream<gpu> *stream,
- const float dropout,
- uint64_t seed) const {
+ const float dropout, uint64_t seed,
+ const std::string &name) const {
CHECK_EQ(req.type, ResourceRequest::kCuDNNDropoutDesc);
auto state_space = static_cast<resource::SpaceAllocator*>(ptr_);
CHECK_EQ(state_space->ctx.dev_id, stream->dev_id)
- << "The device id of cudnn dropout state space doesn't match that from
stream.";
+ << "The device id of cuDNN dropout state space doesn't match that from
stream.";
if (!state_space->handle.size) {
// not initialized yet.
size_t dropout_state_size;
CUDNN_CALL(cudnnDropoutGetStatesSize(stream->dnn_handle_,
&dropout_state_size));
// reserve GPU space
Storage::Get()->DirectFree(
- Storage::Get()->Alloc(dropout_state_size, state_space->ctx));
+ Storage::Get()->Alloc(dropout_state_size,
+ state_space->ctx,
+ "ephemeral:", "dropout_reserve",
Review comment:
Storage allocations that belong to the `ephemeral:` profiler scope will be
ignored and not recorded in the memory profiler.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services