Skip to content

test(dsa): compare only the effective top-k slice - #672

Merged
hwanseoc merged 1 commit into
NVIDIA:developfrom
hwanseoc:hwanseoc/fix-dsa-topk-ref-padding
Aug 20, 2026
Merged

test(dsa): compare only the effective top-k slice#672
hwanseoc merged 1 commit into
NVIDIA:developfrom
hwanseoc:hwanseoc/fix-dsa-topk-ref-padding

Conversation

@hwanseoc

Copy link
Copy Markdown
Member

OSS CI fix.

check_ref_indexer_top_k compared whole output rows. When top_k exceeds a row's sequence length, only min(top_k, seq_len) entries are actually picked — past that the reference pads with zeros while the kernel leaves its sentinel init, so the comparison was between two different paddings:

AssertionError: Tensor-likes are not equal!
Mismatched elements: 431 / 705 (61.1%)
Greatest absolute difference: inf at index (0,)

Caps both sides at the effective k, which is what the surrounding comment already described but the code did not do.

@coderabbitai ignore

When top_k exceeds a row's sequence length, the reference pads the rest of the
row with zeros while the kernel leaves the slots at their sentinel init, so
comparing whole rows compared two different paddings and failed with inf
differences. Cap both sides at min(top_k, seq_len), which is what the
surrounding comment already described.
@hwanseoc hwanseoc added cat-ci CI failures, test flakiness, workflow breakage, or automation issues. mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. orig-nv-eng Reported or requested by NVIDIA engineering. labels Aug 19, 2026
@hwanseoc

Copy link
Copy Markdown
Member Author

@cudnn-ci-bot run oss

@cudnn-ci-bot

Copy link
Copy Markdown

🚀 Running mirror pipeline

Branch: cudnn-gh/pr-672-9a78675
Pipeline: 63569451
Targets: oss

@hwanseoc
hwanseoc merged commit 94e1b61 into NVIDIA:develop Aug 20, 2026
1 check passed
@Anerudhan Anerudhan mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat-ci CI failures, test flakiness, workflow breakage, or automation issues. mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. orig-nv-eng Reported or requested by NVIDIA engineering.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants