add Topk to tensor (#9343)

* terrible but somewhat working impl

* linux behaves differently than macos?

* slightly better impl

* small clean up; haven't figured this out yet

* better

* torch has different behavior on linux and macos for duplicated values

* add sum docs

* fix test

* add torch return_type test

* add an exception test

* wrap_fxn instead, and move op lower in order

* better repeated values test

* rerun ci
This commit is contained in:
geohotstan
2025-03-10 08:01:42 +08:00
committed by GitHub
parent a1f41fadf6
commit 1d64c12f2b
7 changed files with 69 additions and 9 deletions

View File

@@ -34,6 +34,7 @@
::: tinygrad.Tensor.interpolate
::: tinygrad.Tensor.scatter
::: tinygrad.Tensor.scatter_reduce
::: tinygrad.Tensor.topk
## Neural Network (functional)