Skip to content

sort output in evaluation for streamindex_topk - #116

Merged
NinaCai merged 4 commits into
mainfrom
nina-eval-sort
Oct 9, 2026
Merged

NinaCai merged 4 commits into
mainfrom
nina-eval-sort

Conversation

@NinaCai

@NinaCai NinaCai commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

For streamindex-topk, add sorting for both reference and optimized code so that it will pass numerical check if the numbers are right but in different orders.

@NinaCai
NinaCai requested a review from shangkunwang01 October 7, 2026 00:15

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a sort_before_compare configuration option to KernelTask, allowing the evaluation harness to sort output leaves along their last axis before comparing reference and optimized outputs. This is particularly useful for outputs where order is not part of the contract, such as top-k index sets. The feedback suggests minor cleanups to remove redundant bool() type casts when parsing and serializing this new option, as well as removing unnecessary np.asarray calls before sorting, since the inputs are already NumPy arrays.

Comment thread maxkernel/adk/evaluation/harness_code.py Outdated
Comment thread maxkernel/adk/evaluation/harness_code.py Outdated
Comment thread maxkernel/adk/evaluation/evaluation_utils.py
Comment thread maxkernel/adk/evaluation/jax_kernel_evaluator.py Outdated
NinaCai and others added 3 commits October 6, 2026 20:52
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@NinaCai
NinaCai requested a review from YuxuanChen October 7, 2026 19:14
@NinaCai
NinaCai merged commit 9d46d79 into main Oct 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants