We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I call memory::Copy in Op Kernel, the code like:
memory::Copy
paddle::memory::Copy<Place, Place>( boost::get<Place>(ctx.GetPlace()), static_cast<void*>(dst), boost::get<Place>(ctx.GetPlace()), static_cast<const void*>(src), num);
How about add an interface in framework::ExecutionContext named Place():
framework::ExecutionContext
Place()
template<typename T> inline const T& Place() { return boost::get<T>(device_context_->GetPlace()); }
So the code will be chaned into:
paddle::memory::Copy<Place, Place>( ctx.Place<Place>(), static_cast<void*>(dst), ctx.Place<Place>(), static_cast<const void*>(src), num);
The text was updated successfully, but these errors were encountered:
reyoung
qingqing01
Successfully merging a pull request may close this issue.
When I call
memory::Copy
in Op Kernel, the code like:How about add an interface in
framework::ExecutionContext
namedPlace()
:So the code will be chaned into:
The text was updated successfully, but these errors were encountered: