-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVC performance with Vunit #1036
Comments
I would suggest that you try first without VUnit to see if the differences are related to VUnit, the design you have, or differences in the simulators. I can't think of any obvious reason for why VUnit would have this impact on performance. There are no special tricks related to how we pass generics. In both cases, we use the Elaboration can take some time. I've noticed with GHDL that some of its advantages in terms of startup performance go away if many contexts are included in a testbench. Generally speaking, I've experienced significant performance differences between simulators but it varies a lot with the design. X can be twice as fast as Y on one design and then Y is twice as fast as X for another. For many (fast) unit tests, the raw simulator performance is irrelevant. It is the startup time of the simulator that dominates. It should also be noted that the simulator interface we have for NVC is a contribution from @nickg so I would assume that there are no major performance-killing issues in that code. |
@Blebowski can you provide some instructions for running the testbench? I found a |
Hi, |
Hi, the steps to run the comparison:
To run with NVC, just change the value of the On my PC I first thought this is due to Vunit reusing single elaboration for GHDL, and When I use only single core at a time (no My results are: ghdl.txt I use NVC from couple of days ago. My GHDL and VUnit installations are from autumn Could this be caused by mutex that is held by NVC on compiled libraries during the |
Can you trying setting the environment variable
Yes that might be an issue too. NVC uses a reader/writer lock on the library which means writing to the library requires there are no concurrent readers (but a library can be read concurrently by multiple processes). I think VUnit passes |
Hi, |
The |
Please also try with the VUnit changes in #1037. |
Hi @nickg, I will give it a try next weekend (currently vacationing) and let you know. I confirm that the GHDL is using LLVM backend. The reference data set packages make sense to compile slowly. These are huge constant arrays. |
Hi, @nickg , I have tested with latest NVC and VUnit commit you referenced. The results are much better: Now the overall runtime of the regression with Also, it makes sense that GHDL emits code for The These long arrays of constants are only used in Do you think it would be possible to emit the code for such long constant arrays only once the constant |
Either way, I will close this issue and thank you for your help. This has actually unblocked me on porting my project also to NVC and finally trying to utilize the |
Have you tried using a smaller number of concurrent jobs like |
Hi, my CPU is 12th Gen intel with Big+Little cores (6 Power + 8 efficient). Power cores have hyperthread, so the rest 6 logical cores are from there. I have 64 GB of RAM, and I even with I re-ran with various As the number of cores grows, the total time spent by the simulation also grows. The differences are somewhat flaky though, nvc_jit_after_fix_p10.txt |
Runtime of a test likely depends on core kind used to execute it. So, Either way, with |
Are you using a build with
Each pair of hyperthreads shares an L1/L2 cache so if one thread is running it can use all of the cache whereas if both is running it's only guaranteed half of it. So you should see a higher rate of cache misses when both are active and VHDL simulations tend to be quite memory bound (i.e. they don't tend to stress the compute resources of the CPU).
At some point I want to implement a cache for the JIT so that it can re-use machine code if the source code hasn't changed. But it's quite complex to get right so I probably won't do it soon. |
No, I configure without
I am looking forward. |
Hi,
I am trying to port my project:
https://github.com/Blebowski/CTU-CAN-FD
that I run with VUnit from GHDL into NVC. I managed to get everything working, and I can run the regression
with the same results in GHDL and in NVC.
The issue I face, is that NVC run-time is almost double the GHDL run-time (when executed via VUnit, I have
not tried to profile "raw" commands typed into the command line).
The analysis time of NVC is much smaller, but since analysis takes fraction of the overal regression, in total
run-time GHDL wins.
I would be curious to find out why does this occur. AFAICT, NVC is faster simulator.
My design contains large constant arrays of large structs that presumably take long time to elaborate.
When I run single test with
-v
, I see that VUnit always elaborates the design with NVC. Therefore,each test requires separate elaboration since NVC does not support run-time setting of generics.
Does VUnit elaborate each test in GHDL too ? Or does Vunit in some smart manner passes the generics
such as test name, seed or other numeric parameters only to GHDL simulation ?
The text was updated successfully, but these errors were encountered: