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] Support layout type: kImageFolder #7143

Merged

Conversation

zhaoyang-star
Copy link
Collaborator

@zhaoyang-star zhaoyang-star commented Oct 8, 2021

  • OpenCL backend 中新增对 Data Layout:kImageFolder的支持
  • 新增[ImageDefault] -> [ImageFolder]、[ImageFolder] -> [ImageDefault]、[ImageFolder] -> [NCHW] 的 layout 转换

kImageFolderkImageDefault的区别:

  • 当 tensor 维度小于等于 2 时,二者在计算 image shape 时不同
  • 当 tensor 维度大于 2 时,二者无差异

当前,FC, Softmax_1x1 的实现中,其 Input/Out tensor 均是kImageFolder的 Layout。

  • 安卓端 mali/adreno 验证 lens_mnasnet 和其他模型 fp16/fp32 精度 passed
  • 验证AI-RANK所有模型精度 passed
  • 验证FC、softmax单测 passed

应用本PR后,lens_mnasnet 的模型结构截图:
image

@paddle-bot-old
Copy link

paddle-bot-old bot commented Oct 8, 2021

Thanks for your contribution!

daming5432
daming5432 previously approved these changes Oct 9, 2021
Copy link
Collaborator

@daming5432 daming5432 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

@zhenlin-work zhenlin-work left a comment

Choose a reason for hiding this comment

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

Done.

@zhaoyang-star zhaoyang-star merged commit bbfdd62 into PaddlePaddle:develop Oct 11, 2021
@zhaoyang-star zhaoyang-star deleted the update_fc_softmax1x1 branch October 11, 2021 07:13
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