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

[ARM] calib op change kInt32/kInt64 to kFloat #10128

Merged
merged 9 commits into from
Apr 2, 2023
Merged

[ARM] calib op change kInt32/kInt64 to kFloat #10128

merged 9 commits into from
Apr 2, 2023

Conversation

mjp9527
Copy link
Collaborator

@mjp9527 mjp9527 commented Mar 23, 2023

PR devices

Arm

PR types

Bug fixes

PR changes

OP

Description

calib 作为ARM通用算子,应该支持INT8/FP32/FP16 所有精度,而不是根据数据类型设置精度。比如一个int8模型也有从FP32转为int的需求。

@paddle-bot
Copy link

paddle-bot bot commented Mar 23, 2023

Thanks for your contribution!

@@ -37,7 +37,8 @@ std::shared_ptr<std::mt19937_64> GetCPURandomEngine(uint64_t seed) {
} else {
VLOG(4) << "Use default random engine with fixed random seed = " << seed;
}
engine->seed(seed);
std::seed_seq seq({seed});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

此处是为了和paddle_cpu对齐

Copy link
Collaborator

Choose a reason for hiding this comment

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

paddle_cpu是只在seed=0的情况下是这样处理的吧?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

paddle_cpu是只在seed=0的情况下是这样处理的吧?

应该是不为0也这么处理,之前测试过,固定seed=2023可以精度对齐

@mjp9527 mjp9527 changed the title [ARM] calib && elementwise should support int8/FP32/FP16-precision kernel [ARM] calib should support int8/FP32/FP16-precision kernel Mar 27, 2023
@yt605155624
Copy link

这个 pr 仅能转 arm 模型无法转 x86 模型(但是没关系,仅是提醒下)
image

@mjp9527 mjp9527 changed the title [ARM] calib should support int8/FP32/FP16-precision kernel [ARM] calib op change kInt32/kInt64 to kFloat Mar 28, 2023
@mjp9527
Copy link
Collaborator Author

mjp9527 commented Mar 28, 2023

这个 pr 仅能转 arm 模型无法转 x86 模型(但是没关系,仅是提醒下) image

移除fill_constant_op临时修改,等待pass方案解决

Copy link
Collaborator

@zhupengyang zhupengyang left a comment

Choose a reason for hiding this comment

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

LGTM

@mjp9527 mjp9527 merged commit 8f79dcc into PaddlePaddle:develop Apr 2, 2023
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.

3 participants