-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add dropout and log_loss for kunlun #27790
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help to merge
#ifdef PADDLE_WITH_XPU | ||
static std::map<int, float*> mask_data_tables; | ||
static const int max_data_size = 32 * 1024 * 1024; | ||
static std::mutex s_mask_data_table_lock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个mutex是这个op特有的吗?
|
||
#ifdef PADDLE_WITH_XPU | ||
static std::map<int, float*> mask_data_tables; | ||
static const int max_data_size = 32 * 1024 * 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
命名不符合google c++ code style
int index = (dev_id << 16) + (prop << 8) + is_upscale; | ||
std::lock_guard<std::mutex> lock(s_mask_data_table_lock); | ||
if (mask_data_tables.find(index) == mask_data_tables.end()) { | ||
float* mask_data_host = new float[max_data_size]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种new可以用Paddle底层的统一内存管理
* add dropout,log_loss, test=kunlun * fix dropout, test=kunlun * polish error message, test=kunlun * change boost::get to BOOST_GET_CONST, test=kunlun * fix copyright, test=kunlun
PR types
New features
PR changes
OPs
Describe
Add dropout log_loss for kunlun