Automatically set and save optimal OpenMP and fusion thresholds#1183
Automatically set and save optimal OpenMP and fusion thresholds#1183hhorii wants to merge 17 commits into
Conversation
682504b to
d2057f8
Compare
d2057f8 to
91450d1
Compare
|
Once Qiskit/qiskit#5943 is merged, optimized parameters will be able to be store in user config around here: qiskit-aer/qiskit/providers/aer/profile.py Lines 68 to 69 in 9f7b832 qiskit-aer/qiskit/providers/aer/profile.py Lines 82 to 84 in 9f7b832 |
a0730fa to
cc00860
Compare
cc00860 to
6c4eb1c
Compare
79886ed to
ae04288
Compare
ef85127 to
12db16f
Compare
chriseclectic
left a comment
There was a problem hiding this comment.
Some changers needed here. I think it might be better to wait until after #1194 is merged and just use profiling for AerSimulator which provides a common interface to all simulation methods and makes it easier to check if using GPU or not since it has a separate device option.
| return 'AerProvider' | ||
|
|
||
| @staticmethod | ||
| def optimize_backend_options(min_qubits=10, max_qubits=20, ntrials=10): |
There was a problem hiding this comment.
Lets remove this method from the provider for now and make it have to be run by importing the profiling functions
| stacklevel=3) | ||
|
|
||
| # Add default OpenMP options | ||
| gpu = backend_options is not None and 'gpu' in backend_options.get('method', '') |
There was a problem hiding this comment.
Backend options is a deprecated argument. Typically the method will already be in the qobj config
|
|
||
| # Add default OpenMP options | ||
| gpu = backend_options is not None and 'gpu' in backend_options.get('method', '') | ||
| profiled_options = get_performance_options(gpu) |
There was a problem hiding this comment.
This should be handled as pat of the format qobj, and only add the profile option to the qobj config if they aren't present in options or run options
| from .aererror import AerError | ||
|
|
||
|
|
||
| def profile_performance_options(min_qubits=10, max_qubits=25, ntrials=5, |
There was a problem hiding this comment.
This profile.py file should probably be moved into aer/utils/ and the user facing functions added to aer/utils/__init__.py
fdb7b4f to
5a7d30d
Compare














Summary
Adds basic profiling code to find suitable threshold values for OpenMP and gate fusion for backend options.
This is a revised version of #956.
Details and comments
This PR will add following into to #956.
settings.conffusion_cost.N