Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

[XPU] fix device version in unittests

Open houj04 opened this issue 9 months ago • 1 comments

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修复了此问题。

houj04 avatar May 17 '24 09:05 houj04

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

paddle-bot[bot] avatar May 17 '24 09:05 paddle-bot[bot]

您的邮件已收到,我将尽快回信。谢谢您!Your email has been received and I will reply as soon as possible. Thank you!

ZibinGuo avatar May 22 '24 02:05 ZibinGuo