Code Monkey home page Code Monkey logo

Comments (6)

BobbyRBruce avatar BobbyRBruce commented on May 29, 2024

Why do we have non-determinism anywhere in gem5? To me this isn't a problem with the tests, there shouldn't be anything truely random going on. The "time-based seed" should be replaced with something static.

from gem5.

mkjost0 avatar mkjost0 commented on May 29, 2024

Yeah, I was thinking of just altering the files in the tests directory to use --random-seed= so that we don't have to make more changes to the workflow directory. If that's okay, I can just assign this to myself and get that done.

from gem5.

mattsinc avatar mattsinc commented on May 29, 2024

I had asked @DanKouch to do the same @mkjost0 , but if you want to get to it today, please go ahead.

@abmerop (or really, Brad) will have to comment more on @BobbyRBruce 's original question though, as I was not involved with that work.

from gem5.

powerjg avatar powerjg commented on May 29, 2024

Changing the command line parameter is the best thing to do in the short term (I think).

Longer term, the problem is this line:

We should be using mt_random here instead of srand. We should always use gem5's random number generator so that we have determinism by default.

Then, when we want to have multiple different seeds used, we can use (from python) m5._m5.core.seedRandom(random.randint(0,100000)) (or something like this). We should expose this seedRandom function better, though.

Anyway, the "right" solution is a bit deeper than is worth it at this point. For now, let's just set the command line parameter.

from gem5.

BobbyRBruce avatar BobbyRBruce commented on May 29, 2024

Changing the command line parameter is the best thing to do in the short term (I think).

Longer term, the problem is this line:

We should be using mt_random here instead of srand. We should always use gem5's random number generator so that we have determinism by default.

Then, when we want to have multiple different seeds used, we can use (from python) m5._m5.core.seedRandom(random.randint(0,100000)) (or something like this). We should expose this seedRandom function better, though.

Anyway, the "right" solution is a bit deeper than is worth it at this point. For now, let's just set the command line parameter.

I had a go at this in #140. I'm not an expert on this part of the codebase, but I think my implementation of random_mt works.

from gem5.

powerjg avatar powerjg commented on May 29, 2024

@mkjost0, can you check the status of this since #140 has been merged?

from gem5.

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.