This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KellenSunderland
force-pushed
the
profiler_memleak
branch
from
September 10, 2018 21:25
0a44f22
to
b1b42c0
Compare
KellenSunderland
changed the title
WIP: Fix memleak in profiler
[MXNET-922] Fix memleak in profiler
Sep 10, 2018
@mxnet-label-bot can please add [pr-awaiting-review] |
KellenSunderland
force-pushed
the
profiler_memleak
branch
from
September 14, 2018 12:33
b1b42c0
to
ac33d92
Compare
lebeg
approved these changes
Sep 17, 2018
src/profiler/profiler.h
Outdated
@@ -455,7 +455,7 @@ class Profiler { | |||
/*! \brief filename to output profile file */ | |||
std::string filename_ = "profile.json"; | |||
/*! \brief profile statistics consist of multiple device statistics */ | |||
DeviceStats* profile_stat; | |||
std::unique_ptr<DeviceStats[], std::default_delete<DeviceStats[]>> profile_stat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::default_delete<DeviceStats[]>
is default and not needed explicitly, I think
Good point Anton, thanks. I'll double check just to be sure it's not
needed.
…On Mon, Sep 17, 2018, 4:44 AM Anton Chernov ***@***.***> wrote:
***@***.**** approved this pull request.
------------------------------
In src/profiler/profiler.h
<#12499 (comment)>
:
> @@ -455,7 +455,7 @@ class Profiler {
/*! \brief filename to output profile file */
std::string filename_ = "profile.json";
/*! \brief profile statistics consist of multiple device statistics */
- DeviceStats* profile_stat;
+ std::unique_ptr<DeviceStats[], std::default_delete<DeviceStats[]>> profile_stat;
std::default_delete<DeviceStats[]> is default and not needed explicitly,
I think
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12499 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHGTEyHAcAMM20gltWP2DUxI2CDpFHPJks5ub2DhgaJpZM4Whorh>
.
|
marcoabreu
added
pr-awaiting-response
PR is reviewed and waiting for contributor to respond
and removed
pr-awaiting-review
PR is waiting for code review
labels
Sep 18, 2018
KellenSunderland
force-pushed
the
profiler_memleak
branch
from
September 19, 2018 14:27
ac33d92
to
b8f7937
Compare
@lebeg Indeed it wasn't needed. I must have read the docs wrong. Simplified the code and rebased. |
@marcoabreu This one should be ready to merge. |
lebeg
approved these changes
Sep 20, 2018
7 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix a memleak reported locally by ASAN during a normal inference test.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.