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 compile errors in tensor #2706

Merged
merged 6 commits into from
Jul 5, 2017

Conversation

JiayiFeng
Copy link
Collaborator

@JiayiFeng JiayiFeng commented Jul 3, 2017

fix some compile errors in tensor.h and add tensor_test.cc

@JiayiFeng JiayiFeng changed the title add test for tensor fix compile errors in tensor Jul 3, 2017
@JiayiFeng JiayiFeng requested a review from qingqing01 July 4, 2017 03:34
Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

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

LGTM

: ptr_(paddle::memory::Alloc(pl, size), paddle::memory::Deleter(pl)),
place_(pl),
private:
class Deleter {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that Deleter is pretty generally useful -- as long as memory blocks are allocated using paddle::memory::Alloc, Deleter can free it. How about we move Deleter to be paddle::memory::Deleter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it!

@JiayiFeng JiayiFeng merged commit 830877f into PaddlePaddle:develop Jul 5, 2017
@JiayiFeng JiayiFeng deleted the dev_tensor_test branch July 5, 2017 02:38
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.

2 participants