Skip to content

Conversation

@Enigmatisms
Copy link
Contributor

@Enigmatisms Enigmatisms commented Aug 18, 2025

PR Category

Operator Mechanism

PR Types

Improvements

Description

在 gpu_primitives 中增加了 uint8/int16 两种类型的 CUDA atomic functions,针对如下三种操作:

  • min
  • max
  • multiply

对应的单测通过 put_along_axis 相关的单测实现并进行。同时兼容升级了 put_along_axis 以及 take_along_axis,增加了 int16/uint8 的支持(除了上述三种op,add也增加了支持,只不过add的atomic uint8 int16操作原本就存在),删除了某些文件中 SFINAE 实现的 uint8/int16 绕过。除此之外,这些 atomic primitives 本身由于无法导出单测,本人在 Enigmatisms/atomic_playground 中导出了 Python 接口,与 host 端 std::accumulation 结果进行了大量对比测试。

Pcard-89620

@paddle-bot
Copy link

paddle-bot bot commented Aug 18, 2025

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

@Enigmatisms
Copy link
Contributor Author

/re-run all-failed

@zhangbo9674 zhangbo9674 merged commit a412420 into PaddlePaddle:develop Aug 19, 2025
72 of 73 checks passed
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
…long_axis (input types) (PaddlePaddle#74693)

* [PHI] Aligned uint8 and int16 atomic funcs

* [PHI] Removed some of the GPU only constraints.

* [PHI] Fixed put_along_axis CPU end test error
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