-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[xpu] add dropout & amp ops in xpu place #33891
Conversation
Thanks for your contribution! |
is_finite.data<bool>()), | ||
is_finite.data<bool>(), x->numel()); | ||
PADDLE_ENFORCE_EQ(r, XPU_SUCCESS, platform::errors::External( | ||
"XPU API(isfinite) return wrong " |
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.
logical_not
is_nan.data<bool>(), is_finite.data<bool>(), | ||
x->numel()); | ||
PADDLE_ENFORCE_EQ(r, XPU_SUCCESS, platform::errors::External( | ||
"XPU API(any) return wrong " |
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.
logical_or
PADDLE_ENFORCE_EQ(r, XPU_SUCCESS, platform::errors::External( | ||
"XPU API(cast_v2) return wrong " | ||
"value[%d %s]", | ||
r, XPUAPIErrorMsg[r])); |
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.
加xpu_wait
reinterpret_cast<XPUTyp*>(out_data), num, | ||
XPUTyp(0.0)); | ||
PADDLE_ENFORCE_EQ(r == xpu::Error_t::SUCCESS, true, | ||
platform::errors::External( |
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.
这个错误提示改下,参考check_finite_and_unscale_op_xpu.cc
PADDLE_ENFORCE_EQ( | ||
r, xpu::Error_t::SUCCESS, | ||
platform::errors::External( | ||
"XPU dropout return wrong value[%d], please check whether " |
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.
错误提示改一下
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 for xpu.cmake
PR types
Others
PR changes
OPs
Describe
test=kunlun