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 2018/08/21 18:29:58 UTC

[GitHub] andrewfayres commented on issue #11885: Fix JNI custom op code from deregistering the operator fixes #10438

andrewfayres commented on issue #11885: Fix JNI custom op code from deregistering the operator fixes #10438
URL: https://github.com/apache/incubator-mxnet/pull/11885#issuecomment-414776136
 
 
   [Issue](https://issues.apache.org/jira/browse/MXNET-852) to add testing to JNI code.
   
   I'll expand on what I said earlier for testing:
   Reproducing the issue was fairly straight forward. Using the existing custom operator as a template, I trained and saved a model with a custom operator. Then I attempted to load the model multiple times. On the 3rd attempt a fatal "Operator not found error" was thrown. I then trained another model with 3 of the same custom operators, saved it, then attempted to load it and received the same error.
   
   In both cases, the error was being thrown whenever the upgrade model process called the opPropDel for the 3rd time. The best that I can tell the opPropDel method is only called by the upgradeJSON method when loading a model trained on an older version of MXNet. In this case, there was a counter in the JNI code that on the 3rd time opPropDel was called the custom operator would be deregistered in the native code making all instances of the custom operator unusable and producing a fatal error on the next attempt.
   
   My change was to remove the code that did the deregister and make opPropDel method simply return success (which is what it was already doing up until it hit the counter threshold).
   
   After making this change I loaded the same models that I had trained previously and this time they loaded without issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services