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

[NPU] Add huber_loss op #34826

Merged
merged 4 commits into from
Sep 3, 2021
Merged

Conversation

Ray2020BD
Copy link
Contributor

@Ray2020BD Ray2020BD commented Aug 11, 2021

PR types

New features

PR changes

OPs

Describe

[NPU] Add huber_loss op & unittest

image

image

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

auto fp64_dtype = static_cast<int>(ConvertToNpuDtype(z->type()));
const auto& runner_cast_x =
NpuOpRunner("Cast", {*x}, {x_fp32}, {{"dst_type", fp32_dtype}});
runner_cast_x.Run(stream);
Copy link
Contributor

Choose a reason for hiding this comment

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

SmoothL1Loss 与 SmoothL1LossGrad本身支持float和float16数据类型,对于double数据类型,可以暂时不支持,避免太多Cast OP导致的数据类型转换。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已删除fp64

Copy link
Contributor

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM

@qili93 qili93 merged commit 4e67cd1 into PaddlePaddle:develop Sep 3, 2021
@Ray2020BD Ray2020BD deleted the npu_huber_loss_2 branch September 29, 2021 06:56
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