Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new remote updater for go pserver #2774

Merged
merged 2 commits into from
Jul 11, 2017

Conversation

typhoonzero
Copy link
Contributor

Fix #2761

Copy link
Contributor

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

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

👍 resolve such a difficult bug! Awesome.

"ConfigSize": len(c),
}).Info("New Optimizer Created with config:")
var cbuffer unsafe.Pointer
cbuffer = C.malloc(C.size_t(len(p.Content)))
C.memcpy(cbuffer, unsafe.Pointer(&p.Content[0]), C.size_t(len(p.Content)))
C.memcpy(cbuffer, unsafe.Pointer(&p.Content[0]), C.size_t(len(p.Content)/C.sizeof_float))
Copy link
Contributor

Choose a reason for hiding this comment

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

it is so strange that we can pass the go test smoothly.
what's more, C.memcpy copy four times longer buffer than the real length, it never core dump(system call libc's memcpy in low level), and set all the data to 0 as normal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wired, maybe the test case is not exposing this problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, no, we malloc four times memory.......
cbuffer = C.malloc(C.size_t(len(p.Content))), it absolutly will run smoothly because I waste the rest buffer.
weird, by the way. : )

@dzhwinter
Copy link
Contributor

LGTM!
seems that we can merge every module together and try the new feature!

@typhoonzero typhoonzero merged commit bcf9f42 into PaddlePaddle:develop Jul 11, 2017
@typhoonzero typhoonzero deleted the fix_newupdater branch August 11, 2017 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants