Skip to content

[Kunlunxin] Fix garbled output with CUDA Graph - #368

Open
0songHan wants to merge 1 commit into
flagos-ai:v0.1.0from
0songHan:fix-kunlunxin-cudagraph
Open

[Kunlunxin] Fix garbled output with CUDA Graph#368
0songHan wants to merge 1 commit into
flagos-ai:v0.1.0from
0songHan:fix-kunlunxin-cudagraph

Conversation

@0songHan

Copy link
Copy Markdown

PR Category

PR Type

Description

Fix a garbled output issue when CUDA Graph is enabled in the Kunlunxin attention backend. The issue was caused by uninitialized values in the padded region of the attention output buffer.

Related Issues

None.

Changes

  • Initialize the padding region of the attention output to zero when num_actual_tokens is smaller than the output buffer size.

Testing

  • Tested using the Zhiyuan test dataset.
  • Ran python run_eval_lms.py and verified that the generated results.json contains correct results.

Checklist

  • I have run the existing tests and they pass
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)

@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the core label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants