{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9727","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9727/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9727/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9727/events","html_url":"https://github.com/apache/incubator-mxnet/pull/9727","id":295010814,"number":9727,"title":"Refactored storage handling","user":{"login":"lebeg","id":1753787,"avatar_url":"https://avatars1.githubusercontent.com/u/1753787?v=4","gravatar_id":"","url":"https://api.github.com/users/lebeg","html_url":"https://github.com/lebeg","followers_url":"https://api.github.com/users/lebeg/followers","following_url":"https://api.github.com/users/lebeg/following{/other_user}","gists_url":"https://api.github.com/users/lebeg/gists{/gist_id}","starred_url":"https://api.github.com/users/lebeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lebeg/subscriptions","organizations_url":"https://api.github.com/users/lebeg/orgs","repos_url":"https://api.github.com/users/lebeg/repos","events_url":"https://api.github.com/users/lebeg/events{/privacy}","received_events_url":"https://api.github.com/users/lebeg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-07T05:23:42Z","updated_at":"2018-02-08T20:12:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/9727","html_url":"https://github.com/apache/incubator-mxnet/pull/9727","diff_url":"https://github.com/apache/incubator-mxnet/pull/9727.diff","patch_url":"https://github.com/apache/incubator-mxnet/pull/9727.patch"},"body":"## Description ##\r\n\r\nMade Storage::Handle objects and the memory they are handling be reference counted.\r\n\r\n## Checklist ##\r\n### Essentials ###\r\n- [x] Passed code style checking (`make lint`)\r\n- [x] Changes are complete (i.e. I finished coding on this PR)\r\n- [x] All changes have test coverage:\r\n  - Unit tests are added\r\n  - Added a functional test\r\n- [x] Code is well-documented: \r\n  - Existing docs improved\r\n  - New methods documented\r\n- [x] To the my best knowledge, examples are not affected by this change\r\n\r\n### Changes ###\r\n- Ensured that access to memory pointed by storage::Handles is protected by reference counting\r\n- Introduced a common interface to public Storage class and the underlying internal StorageManagers\r\n- Changed referencing of shared memory to a string key\r\n- Separated platform specific CPUSharedStorageManager implementations\r\n- Introduced a functional C++ test\r\n\r\n- Moved NDArray::Chunk implementation to .cc file for compile time and dependendencies reduction\r\n\r\n## Comments ##\r\n- The change has grown significantly due to a lot of usages in the code.\r\n\r\n## Still to be done in next iterations ##\r\n- Add Android implementation of CPUSharedStorageManager\r\n- Introduce locking for shared memory\r\n- Add coverage and more edge cases to Storage unit testing\r\n- Add functional test to automation"},"comment":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/comments/364234218","html_url":"https://github.com/apache/incubator-mxnet/pull/9727#issuecomment-364234218","issue_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/9727","id":364234218,"user":{"login":"lebeg","id":1753787,"avatar_url":"https://avatars1.githubusercontent.com/u/1753787?v=4","gravatar_id":"","url":"https://api.github.com/users/lebeg","html_url":"https://github.com/lebeg","followers_url":"https://api.github.com/users/lebeg/followers","following_url":"https://api.github.com/users/lebeg/following{/other_user}","gists_url":"https://api.github.com/users/lebeg/gists{/gist_id}","starred_url":"https://api.github.com/users/lebeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lebeg/subscriptions","organizations_url":"https://api.github.com/users/lebeg/orgs","repos_url":"https://api.github.com/users/lebeg/repos","events_url":"https://api.github.com/users/lebeg/events{/privacy}","received_events_url":"https://api.github.com/users/lebeg/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T20:12:59Z","updated_at":"2018-02-08T20:12:59Z","author_association":"CONTRIBUTOR","body":"There might be another not thread safe, but simplified approach. Instead of a shared_ptr we could use a unique_ptr. That does not have a interlocking performance impact, but still provides an appropriate freeing guarantee. What do you think?"}}
{"actor":{"display_login":"lebeg"}}