GithubHelp home page GithubHelp logo

Comments (9)

fionser avatar fionser commented on August 17, 2024 2

Because secret sort is non-trivial. I'm also confused about it now, sort algorithm couldn't be parallelized. :(

try bitonic sort which is highly parallelable

from spu.

anakinxc avatar anakinxc commented on August 17, 2024

Hi @BeStrongok,

jnp.median in this example requires secret sort, which is not supported by SPU right now.

But you can expect this feature in the upcoming releases.

Best

from spu.

BeStrongok avatar BeStrongok commented on August 17, 2024

Hi @BeStrongok,

jnp.median in this example requires secret sort, which is not supported by SPU right now.

But you can expect this feature in the upcoming releases.

Best

Thanks, looking for this feature!

from spu.

BeStrongok avatar BeStrongok commented on August 17, 2024

Because secret sort is non-trivial. I'm also confused about it now, sort algorithm couldn't be parallelized. :(

from spu.

anakinxc avatar anakinxc commented on August 17, 2024

Because secret sort is non-trivial. I'm also confused about it now, sort algorithm couldn't be parallelized. :(

Yes, it is non-trivial and hard to optimize, but yes, we are working on it. :D
Stay tuned

from spu.

rivertalk avatar rivertalk commented on August 17, 2024

Because secret sort is non-trivial. I'm also confused about it now, sort algorithm couldn't be parallelized. :(

try bitonic sort which is highly parallelable

Nice suggestion, trying...

from spu.

fionser avatar fionser commented on August 17, 2024

Actually, current spu should be able to implement data structure like, top-k heap.
Then median can be done using top-(N/2) heap.

from spu.

anakinxc avatar anakinxc commented on August 17, 2024

Actually, current spu should be able to implement data structure like, top-k heap. Then median can be done using top-(N/2) heap.

This really depends on how JAX implement median.
Right now they are using quantile(..., 0.5) to compute median, and quantile is using sort with a crazy comparator when input is floating point to handle nonfinite values and negative zero, which we don't really care.

During the compilation pipeline, when we have the semi-optimized IR, it is definitely possible to discover and rewrite this pattern with some efforts.

This kind of specific pattern rewrite is obviously not a unicorn, but still hacky...We are trying to see if this can be solved in a more elegant way.

from spu.

anakinxc avatar anakinxc commented on August 17, 2024

Fixed with #107

from spu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.