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

[OpenCL][Bugfix] Fix target choose in opencl_kernel_place_correct_pass #6079

Merged
merged 3 commits into from
May 14, 2021

Conversation

zhaoyang-star
Copy link
Collaborator

之前通过宏判断 new_target 不合理,因为编译 opt 时可能对应的宏没有打开。
精确方法是判断 graph 的 valid_places 来判断。

@paddle-bot-old
Copy link

Thanks for your contribution!

Copy link
Collaborator

@DannyIsFunny DannyIsFunny 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
Collaborator

@DannyIsFunny DannyIsFunny left a comment

Choose a reason for hiding this comment

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

  • 问题描述:
    • 错误逻辑: Pass 实现中通过 ifdef 宏判断 获取当前硬件信息 来选择代码块
      • 原因描述: 所有Pass 都是在opt 中执行、通过宏判断获得的是opt 所在环境的硬件信息; 目标硬件信息、应该从valid_targets变量中获取
  • 本PR工作
    • 修复OPENCL pass 中的相关错误实现

@zhaoyang-star zhaoyang-star merged commit ca8aeb9 into PaddlePaddle:develop May 14, 2021
@zhaoyang-star zhaoyang-star deleted the fix_place branch May 14, 2021 01:38
zhaoyang-star added a commit to zhaoyang-star/Paddle-Lite that referenced this pull request Jun 13, 2021
zhaoyang-star added a commit to zhaoyang-star/Paddle-Lite that referenced this pull request Jun 15, 2021
daming5432 pushed a commit that referenced this pull request Jun 16, 2021
* [OpenCL] Fix select fp32 compile crash (#6006)

* [Pass] Add opencl_kernel_place_correct_pass (#6037)

* [OpenCL] Fix invalid arg size in instance_norm (#6064)

* [OpenCL][Kernel] Add concat multi inputs kernel except channel is not aligned (#6075)

* [OpenCL][Bugfix] Fix target choose in opencl_kernel_place_correct_pass  (#6079)

* [OpenCL] fix kernel select of concat (#6158)

* [OpenCL] BindTargets KOpenCL for conv_conv_fuse_pass (#6125)

* test=develop

* [UTest] Loose abs_error for group_norm and instance_norm (#6188)

* loose group_norm abs_err. test=develop
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