Skip to content

Conversation

@sachin-nntrainer
Copy link

Commits:

[LAYER] Add topk layer
[TEST] Add unittest for topk layer

Self evaluation:

  1. Build test: [x] Passed [ ] Failed [ ] Skipped
  2. Run test: [ ] Passed [ ] Failed [x] Skipped

TODO:
For topk op, one of the output tensors is UINT32 (indices). But there is no check to compare UINT32 outputs. Thus Failing in unitest cases. Currently the test is set to skip.

Potential Solutions:

  1. Skip the test for topk now.
  2. Implement comparison for uint32 tensor.
  3. Cast uint32 to fp32.

NOTE: THIS PR IS NOT REBASED ON MAIN

Signed-off-by: Sachin Singh [email protected]

Implemented the topk layer.

**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test:   [ ]Passed [ ]Failed [*]Skipped

Signed-off-by: sachin-nntrainer <[email protected]>
Added unittest for topk layer.

**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test:   [*]Passed [ ]Failed [ ]Skipped

Signed-off-by: sachin-nntrainer <[email protected]>
@sachin-nntrainer sachin-nntrainer changed the title Topk Added topk op, layer implementation and unit tests. Nov 19, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days.

@github-actions github-actions bot added the Stale label Dec 4, 2025
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.

1 participant