Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

[XPU] fix amp autocast typo

Open dynamicheart opened this issue 1 year ago • 1 comments

PR Category

Custom Device

PR Types

Bug fixes

Description

  • Fix amp autocast typo
  • The xpu_version from get_xpu_device_version() starts from 0(XPU1)
  • Now if the XPU device does not support AMP, it will print the following log:
/root/miniconda/lib/python3.8/site-packages/paddle/amp/auto_cast.py:541: UserWarning: XPUVersion.XPU2 does not support bfloat16 amp.

dynamicheart avatar Jun 27 '24 13:06 dynamicheart

你的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 Jun 27 '24 13:06 paddle-bot[bot]