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

[Paddle Inference] Add float_to_half_pass to support inference with mixed precision #47993

Merged
merged 29 commits into from
Dec 6, 2022

Conversation

yuanlehome
Copy link
Contributor

@yuanlehome yuanlehome commented Nov 15, 2022

PR types

Others

PR changes

Others

Describe

文档API更新PR1PR2PR3PR4

PR工作:

  • 添加 float_to_half_pass,在所有 gpu ir pass 之后执行;
  • 扩展原 enable_use_gpu 接口,可指定 gpu 推理精度;
  • 增加 gpu half 单测;
  • 将原 c++ 接口 Exp_SetBlackListOpsForMixedModel 更改为 Exp_DisableMixedPrecisionOps;
  • 移除某单测文件中不需要的头文件;

使用方式:
python ---> config.enable_use_gpu(512, 0, PrecisionType::kHalf);
c++ ---> config.EnableUseGpu(512, 0, PrecisionType::kHalf);

TODO:

  1. 兼容Paddle-TRT fp16推理
  2. 切换convert_to_mixed_precision接口的底层实现

@paddle-bot
Copy link

paddle-bot bot commented Nov 15, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@yuanlehome yuanlehome changed the title [WIP][Paddle Inference] Add float_to_mixed_pass to support mixed precision inference [WIP][Paddle Inference] Add float_to_mixed_pass to support inference with mixed precision Nov 15, 2022
@yuanlehome yuanlehome changed the title [WIP][Paddle Inference] Add float_to_mixed_pass to support inference with mixed precision [Paddle Inference] Add float_to_mixed_pass to support inference with mixed precision Nov 18, 2022
@yuanlehome yuanlehome changed the title [Paddle Inference] Add float_to_mixed_pass to support inference with mixed precision [Paddle Inference] Add float_to_half_pass to support inference with mixed precision Dec 1, 2022
Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM for
set_tests_properties(gpu_ernie_half_test PROPERTIES TIMEOUT 40)

Copy link
Contributor

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@From00 From00 left a comment

Choose a reason for hiding this comment

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

LGTM for mutable_data in float_to_half_pass

@yuanlehome yuanlehome closed this Dec 6, 2022
@yuanlehome yuanlehome reopened this Dec 6, 2022
@jiweibo jiweibo merged commit c5a45cc into PaddlePaddle:develop Dec 6, 2022
yuanlehome added a commit to yuanlehome/Paddle that referenced this pull request Dec 14, 2022
lxsbupt pushed a commit to lxsbupt/Paddle that referenced this pull request Dec 17, 2022
XiaoguangHu01 pushed a commit that referenced this pull request Dec 19, 2022
* [Release2.4] Revert python link prs (#48573)

* Revert "Fix mac link python (#48017)"

This reverts commit 3fa7a73.

* Revert "[Cherry-pick] Fix python link error (#47811)"

This reverts commit ff642c6.

* Update config.go

* [Paddle Inference] Add float_to_half_pass to support  inference with mixed precision (#47993)

* [Inference] optimize some code and fix some bug (#48780)

* clean ir_pass_manager and fix map_depthwise_conv_to_conv_pass

* fix unitest timeout

* [Paddle Inference] clean unused code  (#48392)

* fix

* update

* update

Co-authored-by: Chen Weihang <chenweihang@baidu.com>
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.

8 participants