Giter Club home page Giter Club logo

Comments (8)

jbush001 avatar jbush001 commented on September 27, 2024

Are you running this in Verilog simulation? Could you attach the command line you used and perhaps the diffs of what you changed to increase the core count, just so I can be sure I understand your configuration correctly? Thanks!

from nyuziprocessor.

Jeremy-Jia avatar Jeremy-Jia commented on September 27, 2024

Yes, I'm using verilog simulation.
I just change the NUM_CORES to 8, no other changes,
and run ./run_vcs in benchmarks/hash/ folder

from nyuziprocessor.

jbush001 avatar jbush001 commented on September 27, 2024

Got it. It's been a while since I worked on this project, so I need to refresh my memory, but I'm afraid I can't think of a reason this should be off the top of my head. I'll need to look into this.

from nyuziprocessor.

jbush001 avatar jbush001 commented on September 27, 2024

Maybe a quick experiment: what happens with 2 cores? What are the corresponding cycle counts in each case (like is it close to a clean integer multiple)?

My first question would be whether this is some artifact of the test configuration that is not synchronizing correctly (and thus misreporting the count), or if you are actually running into some kind of memory saturation issue where the performance is decreasing because of cache thrashing.

from nyuziprocessor.

Jeremy-Jia avatar Jeremy-Jia commented on September 27, 2024
  1. I tried 1, 2, 4, and 8, but the performance dropped once.
  2. Is it related to this problem? I don’t know the reason: assert failed during simulation: refesh_delay should < MAX_REFESH_INTERNAL

from nyuziprocessor.

jbush001 avatar jbush001 commented on September 27, 2024

Can you clarify what you mean by "performance dropped once"? (One time? Once you were above a certain number of cores?)
The refresh_delay assertion is probably not related (but kind of interesting, as I haven't seen that one).

from nyuziprocessor.

Jeremy-Jia avatar Jeremy-Jia commented on September 27, 2024

Sorry, performance dropped once means The more cores used, the greater the performance degradation(cycles per hash is high)

from nyuziprocessor.

jbush001 avatar jbush001 commented on September 27, 2024

Oops, I see the problem :)
The total number of hashes performed is hard coded here (256):

printf("%g cycles per hash\n", (float) endTime / 256);

Because there are 16 vector lanes, four threads, and each thread does four hashes = 16 * 4 * 4 = 256. When you increase the number of cores, the total hashes that are being done increases, but this is still assuming it is fixed. The latency for each thread is going to increase because there's more memory contention, but this calculation is not accounting for the fact that the throughput has increased.

One each fix might be to add another global variable gTotalThreads and do a __sync_fetch_and_add at the top:

    __sync_fetch_and_add(&gActiveThreadCount, 1);
+    __sync_fetch_and_add(&gTotalThreads, 1);

Then use that to compute the total number of operations done:

 printf("%g cycles per hash\n", (float) endTime / (4 * gTotalThreads * 16));

(looking at this now, it should probably use constant variables for the number of iterations each thread takes and number of vector lanes for clarity instead of hard coding the numbers). I hope that helps.

from nyuziprocessor.

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.