Omp/CUDA Utility Accelerations - #813
Open
jwilso39-uc wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenMP/CUDA Utility Accelerations
This PR implements both OpenMP and CUDA versions of the unitary, hermiticity, and CPTP checks in
utilities.cpp(#496):DiagMatrandCompMatrversions of utility checks inutilities.cppgpu_subroutines.cppfor CUDA accelerations of these utilities.gpu_thrust.cuhutilities.hppbased on my own benchmarking (see Benchmarks section below)Benchmarks
I ran benchmarks comparing the timing of the existing serial version of these checks to my new OpenMP and CUDA versions, comparing different numbers of qubits to see at what point an actual speedup was achieved. OpenMP tests were all run across
[2, 4, 8, 16, 32]threads as well.The serial and OpenMP benchmarks were run on a Intel Xeon Silver 4110, and the CUDA benchmarks were run on a NVIDIA L40S (Let me know if there's any other information needed here).
Graphs below show the speedup for each of the accelerations, along with my decision on what to set the threshold at based on these data:
OpenMP Benchmarks
DiagMatr Hermiticity Check - Saw speedup at >= 11 qubits
speedup_cpu_diag_hermiticity.pdf
CompMatr Hermiticity Check - Saw speedup at >= 7 qubits
speedup_cpu_hermiticity.pdf
DiagMatr Unitarity Check - Saw speedup at >= 10 qubits
speedup_cpu_diag_unitarity.pdf
CompMatr Unitarity Check - Saw speedup at >= 4 qubits
speedup_cpu_unitarity.pdf
CPTP Check - Saw speedup at >= 4 qubits
speedup_cpu_cptp.pdf
CUDA Benchmarks
DiagMatr Hermiticity Check - Saw speedup at >= 14 qubits
speedup_gpu_diag_hermitian.pdf
CompMatr Hermiticity Check - Saw speedup at >= 10 qubits
speedup_gpu_dense_hermitian.pdf
DiagMatr Unitarity Check - Saw speedup at >= 12 qubits
speedup_gpu_diag_unitary.pdf
CompMatr Unitarity Check - Saw speedup at >= 7 qubits
speedup_gpu_dense_unitary.pdf
CPTP Check - Saw speedup at >= 7 qubits
speedup_gpu_cptp.pdf
Tests
Ran tests over the
[operations],[calculations],[decoherence]filters (Those looked like the ones with tests that would call these utility checks). Ran those tests in serial, with multithreading enabled, and with GPU acceleration enabled, and had all tests pass in all cases:Let me know what other information or testing will be needed for this change.