Skip to content

Klx/scaled softmax fix - #5061

Open
llaboon wants to merge 10 commits into
flagos-ai:masterfrom
llaboon:klx/scaled-softmax-fix
Open

Klx/scaled softmax fix#5061
llaboon wants to merge 10 commits into
flagos-ai:masterfrom
llaboon:klx/scaled-softmax-fix

Conversation

@llaboon

@llaboon llaboon commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

PR Category

Type of Change

Description

Issue

Progress

  • Change is properly reviewed (1 reviewer required, 2 recommended).
  • Change is responded to an issue.
  • Change is fully covered by a UT.

Performance

llaboon and others added 9 commits July 13, 2026 15:21
- Add diff operator with Triton kernel for kunlunxin backend
- Add square/square_ operators for kunlunxin backend
- Add string padding ('same'/'valid') support for conv3d
- Add cumprod/cumprod_ import to kunlunxin __init__.py
- Remove skipIf for conv1d_padding (Issue flagos-ai#3022 resolved)
- Remove skipIf for conv3d_padding (Issue flagos-ai#3023 resolved)
- Remove skip for softmax_backward dim=1 (Issue flagos-ai#2851 resolved)
Kunlunxin's version of transformer_engine (transformer_engine_klx) exposes
a different signature for the GLU family primitives than upstream NVIDIA TE:

- tex.geglu/reglu/swiglu require positional args (inp, fp8_meta_tensor,
  fp8_tensor, otype) instead of the (inp, quantizer=None) form the tests use
- tex.dgeglu requires an otype argument; tex.dswiglu has no 'quantizer' kwarg

In addition, the FlagGems Triton kernels for these ops currently fail to
compile on XPU (xpu3-elfconv returns non-zero exit status 1), so the
FlagGems side would need work as well.

Skip these test files on Kunlunxin XPU. These ops are not registered via
ATen dispatch, so no runtime crash is expected from user code - only the
accuracy tests were failing.
…x-fix

# Conflicts:
#	pyproject.toml
#	src/flag_gems/runtime/backend/_kunlunxin/ops/diff.py
#	src/flag_gems/runtime/backend/_kunlunxin/ops/softmax.py
#	src/flag_gems/runtime/backend/_kunlunxin/ops/square.py
Signed-off-by: binliu <87918526+llaboon@users.noreply.github.com>
@github-actions github-actions Bot removed the core label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant