Skip to content

Conversation

@dzhwinter
Copy link
Contributor

@dzhwinter dzhwinter commented Jan 21, 2018


void CopyFromCUDA();

void CopyToPeer();
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be a flag for data has been at GPU memory, and do not copy it again.

We should overload all method of std::vector and maintain this flag.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

CI failed at PyCUDATensorSetFromArray when calling set from python.

#include "paddle/framework/lod_tensor.h"
#include "paddle/platform/assert.h"

#include <glog/logging.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

glog seems not used in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

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

LGTM! Can merge this now. The file name mixed_vector.h can be renamed to other more meaningful name as we discussed offline.

@dzhwinter dzhwinter merged commit ae7d1c1 into PaddlePaddle:develop Jan 31, 2018
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.

LoD implement hurt performance The LoD is pretty slow since it uses malloc/free/memcpy

3 participants