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/05/04 19:00:22 UTC

[GitHub] zheng-da opened a new pull request #10812: Fix a mem error.

zheng-da opened a new pull request #10812: Fix a mem error.
URL: https://github.com/apache/incubator-mxnet/pull/10812
 
 
   ## Description ##
   This memory error has been discussed in the dev mailing list and this error can be reproduced with the following commands.
   
   ```
   export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
   export MXNET_TEST_SEED=11
   export MXNET_MODULE_SEED=812478194
   export MXNET_TEST_COUNT=10000
   nosetests-2.7 -v tests/python/unittest/test_module.py:test_forward_reshape
   ```
   
   This is a temporary fix. The error is caused by a race condition that the MKLDNN memory in an output NDArray is removed when some MKLDNN operator tries to read the MKLDNN memory from its input arrays.
   
   However, the race condition shouldn't happen. The execution engine schedules the execution of computation based on the data dependency. When an operator is scheduled to write data to an output NDArray, any operator that reads data from the NDArray shouldn't be scheduled for execution. But we actually observe that the input array of an operator is modified when the operator is running, which suggests that the race condition can mess up data in the input NDArray even without MKLDNN.
   
   So we need a fundamental fix for this bug.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage:
   - Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
   - Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
   - Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
   - [ ] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments are documented. 
   - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
   - Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   

----------------------------------------------------------------
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