Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

add shared storage in windows #8967

Merged
merged 8 commits into from
Dec 18, 2017
Merged

add shared storage in windows #8967

merged 8 commits into from
Dec 18, 2017

Conversation

yajiedesign
Copy link
Contributor

@yajiedesign yajiedesign commented Dec 6, 2017

Description

Checklist

Essentials

  • Passed code style checking (make lint)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage


~~~- [ ] To my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change~~~

### Changes ###


## Comments ##

@@ -52,7 +52,7 @@ class ConnectionWrapper(object):
NDArray via shared memory."""

def __init__(self, conn):
self.conn = conn
self._conn = conn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getattr is dead cycle call. change the name same time.

@@ -91,11 +95,18 @@ class CPUSharedStorageManager final : public StorageManager {
private:
static constexpr size_t alignment_ = 16;

std::mutex mutex_;
std::recursive_mutex mutex_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this slower?

std::unordered_map<void*, Storage::Handle> pool_;
#ifdef _WIN32
std::unordered_map<void*, Storage::Handle> is_free_;
std::unordered_map<void*, HANDLE> map_handle_map_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need two more maps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only use pool_ has the problem of repeated release.

@piiswrong
Copy link
Contributor

Could you rebase?

@piiswrong piiswrong merged commit df25378 into apache:master Dec 18, 2017
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* add shared storage in windows

* fix

* lint

* fix

* fix

* fix

* fix process.h
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* add shared storage in windows

* fix

* lint

* fix

* fix

* fix

* fix process.h
@yajiedesign yajiedesign deleted the shared branch October 31, 2018 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants