修复 fused SwiGLU clamp 自定义算子绑定与 dtype 转换 - #719
Merged
feixi139 merged 3 commits intoAug 27, 2026
Merged
Conversation
feixi139
force-pushed
the
fix-fused-swiglu-clamp-binding-dtype
branch
3 times, most recently
from
August 27, 2026 09:19
ffa3b3c to
034f7be
Compare
feixi139
force-pushed
the
fix-fused-swiglu-clamp-binding-dtype
branch
from
August 27, 2026 09:21
034f7be to
f28f399
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
paddle._C_ops._run_custom_op的手工参数契约只覆盖到arg4,导致带 5 个以上参数的 fused 算子绑定失败;同时paddle.Tensor.view的shape_or_dtype会把 Python 整数误判为 dtype。修改内容
_run_custom_op参数槽位和默认值扩展到arg9。fuse_weighted_swiglu_fp8_quant_clamp补充 clamp 语义,并新增fused_swiglu_weighted_clamp_bwdTorch 参考实现。view([1, 4096, -1])等形状参数。验证
python -m py_compile tester/api_config/parameter_binding.py tester/paddle_to_torch/arguments.py tester/paddle_to_torch/rules.py:通过。git diff --check:通过。tools/regression/regression_runner.sh:paddle_only438/438 通过;accuracy427 通过、6 跳过、2 超时、3torch_error,回归 gate 因非 bitwise 问题未通过。3 个错误均为环境缺少transformer_engine,2 个超时为超大paddle.assign/dropout案例,未命中本次修改路径。pre-commit run --files ...:首次初始化拉取pre-commit-hooks时网络超时,未完成。