Giter VIP home page Giter VIP logo

Comments (5)

VictorTaelin avatar VictorTaelin commented on August 16, 2024

normal_join is just a function that waits for a thread to complete its assigned reduction. So, as long as it terminates, normal_join will eventually return too. Note that once normal_join is called, the thread that called it doesn't have any more work to do.

from hvm.

dumblob avatar dumblob commented on August 16, 2024

Yes, that's exactly how I understood it. Sorry I wasn't specific enough in my description.

What I meant is that there is a fixed number of threads (workers) and they get some work "over the time" (but maybe this is another misunderstanding on my side of the source code and all the work is scheduled up-front in a fixed manner without any dependency on "time" unlike e.g. in work stealing scenarios) whether each thread gets to normal_join there is a guarantee there is no more work to schedule.

from hvm.

VictorTaelin avatar VictorTaelin commented on August 16, 2024

The scheduler is very primitive see here. Each thread is only assigned a redex, and then it just waits. A task scheduler is one of the improvements we'd like to make if we manage to scale this project.

from hvm.

dumblob avatar dumblob commented on August 16, 2024

Then I'd recommend a work-stealing scheduler. Ideally one optimized for micro tasks (the state of the art is still Weave - you can easily skip the binary generation and use only the generated C code as Nim is just a clever transpiler).

from hvm.

VictorTaelin avatar VictorTaelin commented on August 16, 2024

Yep, something like that is very high on my dream wishlist!

from hvm.

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.