Skip to content

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Jul 23, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

copy from #73324

排查发现是 matmul kernel 中整数类型在运算时先cast为float32进行计算再cast回整数类型(底层使用的是 blas 等库的接口),大整数相乘会产生溢出,而 Tensor.multiply 可以正确计算,所以在 python 端进行修改。

torch 和 numpy 的实现都是使用的 multiply,直接修改应该没有问题,旧 IR 没有去修改,CI 上看看 api 监控能不能过
https://github.com/pytorch/pytorch/blob/be72bcf828b536e0d81359a37c0f150b69fce5d4/aten/src/ATen/native/LinearAlgebra.cpp#L1327-L1341

@paddle-bot
Copy link

paddle-bot bot commented Jul 23, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Jul 23, 2025
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jul 23, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@0f3860d). Learn more about missing BASE report.

Additional details and impacted files
@@ Coverage Diff @@ ## develop #74182 +/- ## =========================================== Coverage ? 100.00% =========================================== Files ? 1 Lines ? 2 Branches ? 0 =========================================== Hits ? 2 Misses ? 0 Partials ? 0 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

1 similar comment
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@lshpku lshpku merged commit 746eeff into PaddlePaddle:develop Jul 29, 2025
86 of 91 checks passed
@ooooo-create ooooo-create deleted the fix_outer branch September 29, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

5 participants