[ 
https://issues.apache.org/jira/browse/MXNET-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Naveen Swamy updated MXNET-1171:
--------------------------------
    Description: 
There is an active memory leak in FeedForward.scala's fit method, the public 
fit methods call initSymbolParams which in turn calls initParams, initParams 
allocates NDArrays for _argParams and _auxParams which get overwritten inside 
the private fit method. 

I have added TODO to fix this issue, creating this JIRA to move on to my story. 

Note that since the ND loses references, PhantomRef should pick up and clean 
when GC runs.

// TODO: https://issues.apache.org/jira/browse/MXNET-1171
// this leaks memory, initSymbolParams->initParams is already called which 
allocates
// NDArray in argParams, auxParams and here we are overwriting it by calling 
again.
// PhantomRef should take care of releasing this when GC is called, however we 
have to
// wait for the GC call to happen

 

  was:
There is an active memory leak in FeedForward.scala's fit method, the public 
fit methods call initSymbolParams which in turn calls initParams, initParams 
allocates NDArrays for _argParams and _auxParams which get overwritten inside 
the private fit method. 

I have added TODO to fix this issue, creating this JIRA to move on to my story. 

Note that since the ND loses references, PhantomRef should pick up and clean 
when GC runs.

// TODO: this leaks memory, initSymbolParams->initParams is already called 
which allocates
// NDArray in argParams, auxParams and here we are overwriting it by calling 
again.
val (argNames, paramNames, auxNames) = initSymbolParams(trainData)

 


> Refactor and Fix Memory Leak in FeedForward.scala
> -------------------------------------------------
>
>                 Key: MXNET-1171
>                 URL: https://issues.apache.org/jira/browse/MXNET-1171
>             Project: Apache MXNet
>          Issue Type: Bug
>          Components: Apache MXNet Scala API
>            Reporter: Naveen Swamy
>            Priority: Major
>
> There is an active memory leak in FeedForward.scala's fit method, the public 
> fit methods call initSymbolParams which in turn calls initParams, initParams 
> allocates NDArrays for _argParams and _auxParams which get overwritten inside 
> the private fit method. 
> I have added TODO to fix this issue, creating this JIRA to move on to my 
> story. 
> Note that since the ND loses references, PhantomRef should pick up and clean 
> when GC runs.
> // TODO: https://issues.apache.org/jira/browse/MXNET-1171
> // this leaks memory, initSymbolParams->initParams is already called which 
> allocates
> // NDArray in argParams, auxParams and here we are overwriting it by calling 
> again.
> // PhantomRef should take care of releasing this when GC is called, however 
> we have to
> // wait for the GC call to happen
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to