-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update main benchmark script #375
Conversation
Codecov Report
@@ Coverage Diff @@
## master #375 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 78 78
Lines 12733 12733
=========================================
Hits 12733 12733
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Example: ``--device /GPU:0`` or ``--device /CPU:0``. | ||
|
||
* ``--accelerators``: Devices to use for distributed execution of the circuit. | ||
* ``--accelerators`` (``str``): Devices to use for distributed execution of the circuit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mention that the number in the front corresponds to the reuse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stavros11 thanks for this, looks good.
Let me know if pytest-benchmarks works for you, if so, we can write the "script" directly there, otherwise we can push a bash script with some basic setup for the dgx.
Thanks for the review. I fixed the documentation point and pushed an example bash script with the DGX specs in mind. The script contains benchmarks for CPU, GPU and multi-GPU for QFT and variational circuit in single and double precision but different configurations can be tested by adding/removing the corresponding lines. I am checking pytest-benchmark. I like that it has a default mechanism that logs everything (even machine specs) and that if I understand correctly it executes repeated benchmarks and averages to get the final time, so it should be a bit more accurate. I am just not sure if it can have the flexibility of measuring circuit creation, execution and measurement time seperately like I do in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks good to me. I have tested successfully the script here in system running Qibo 0.1.3.
Makes the following changes to the script that runs the main Qibo benchmarks (QFT, variational circuit, etc.):
nqubits
lists. Now each run for differentnqubits
has to be executed seperately. This is clearer in terms of memory usage.json
. It is also possible to update an existing text file of logs with new logs.I think this script is sufficient to run QFT and variational circuit benchmarks using single device or multi-GPU configurations. We may want to extend the list of available benchmark circuits with more options.
Example bash script for CPU and GPU benchmarks:
Example bash script for multi-GPU configurations:
Optimal accelerator configurations for each nqubits depend on the GPU memory. It is also possible to switch to single precision using
--precision single
.I will try to add an additional benchmark script based on
pytest-benchmarks
to check if the code is simpler and easier to use.