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

[XPU] fix device version in unittests #64414

Merged

Conversation

houj04
Copy link
Contributor

@houj04 houj04 commented May 17, 2024

PR Category

Custom Device

PR Types

Bug fixes

Description

在XPU的现有单测中,有一些地方固定了XPU1和XPU2的“二选一”,因此会造成一些诡异的现象。例如,在get_type_white_list函数中,有这样的语句:

version_str = "xpu2" if xpu_version == core.XPUVersion.XPU2 else "xpu1"

它会把所有的非XPU2设备,都认成是XPU1。

同时,xpu_test_device_type_white_list = ['xpu1_float64']这一句,目的是“在XPU1上面不要跑float64类型的单测”。那么在“非XPU2且非XPU1”的设备上会生效,就会把float64给过滤掉。导致的结果是,即使某个算子注册了float64类型,也不会被单测执行,出现漏测。

本PR修复了此问题。

Copy link

paddle-bot bot commented May 17, 2024

你的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.

Copy link
Contributor

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

@ZibinGuo ZibinGuo left a comment

Choose a reason for hiding this comment

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

LGTM

@QingshuChen QingshuChen merged commit c979308 into PaddlePaddle:develop May 22, 2024
31 checks passed
@ZibinGuo
Copy link
Contributor

ZibinGuo commented May 22, 2024 via email

co63oc pushed a commit to co63oc/Paddle that referenced this pull request May 23, 2024
@houj04 houj04 added the XPU label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants