Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in mxnet layerNorm(). #1993

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

pdradx
Copy link
Contributor

@pdradx pdradx commented Sep 6, 2022

Memory leaks in mxnet NDArrays when using layerNorm() because of reshaping parameters right in the model NDManager.

@zachgk
Copy link
Contributor

zachgk commented Sep 6, 2022

The PR is failing the format check. Can you reformat it?

> File not formatted: /home/runner/work/djl/djl/engines/mxnet/mxnet-engine/src/main/java/ai/djl/mxnet/engine/MxNDArrayEx.java
  In order to reformat your code, run './gradlew formatJava' (or './gradlew fJ' for short)
  See https:/deepjavalibrary/djl/blob/master/docs/development/development_guideline.md#coding-conventions for more details

Change-Id: I039742bf3cde66eafa958aade99bae9e5aca72dd
@codecov-commenter
Copy link

Codecov Report

Merging #1993 (5408b26) into master (bb5073f) will decrease coverage by 2.23%.
The diff coverage is 69.47%.

@@             Coverage Diff              @@
##             master    #1993      +/-   ##
============================================
- Coverage     72.08%   69.85%   -2.24%     
- Complexity     5126     5912     +786     
============================================
  Files           473      586     +113     
  Lines         21970    26219    +4249     
  Branches       2351     2846     +495     
============================================
+ Hits          15838    18314    +2476     
- Misses         4925     6525    +1600     
- Partials       1207     1380     +173     
Impacted Files Coverage Δ
api/src/main/java/ai/djl/modality/cv/Image.java 69.23% <ø> (-4.11%) ⬇️
...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java 76.00% <ø> (ø)
...rc/main/java/ai/djl/modality/cv/output/Joints.java 71.42% <ø> (ø)
.../main/java/ai/djl/modality/cv/output/Landmark.java 100.00% <ø> (ø)
...main/java/ai/djl/modality/cv/output/Rectangle.java 72.41% <0.00%> (ø)
...i/djl/modality/cv/translator/BigGANTranslator.java 21.42% <0.00%> (-5.24%) ⬇️
...odality/cv/translator/BigGANTranslatorFactory.java 33.33% <0.00%> (+8.33%) ⬆️
.../cv/translator/InstanceSegmentationTranslator.java 0.00% <0.00%> (-86.59%) ⬇️
...nslator/InstanceSegmentationTranslatorFactory.java 7.14% <0.00%> (-11.04%) ⬇️
.../cv/translator/SemanticSegmentationTranslator.java 0.00% <0.00%> (ø)
... and 508 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lanking520 lanking520 merged commit 8f0fd53 into deepjavalibrary:master Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants