-
Notifications
You must be signed in to change notification settings - Fork 361
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
Automatically set and save optimal OpenMP and fusion thresholds #1183
base: main
Are you sure you want to change the base?
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
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.
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.
@@ -49,3 +50,9 @@ def backends(self, name=None, filters=None, **kwargs): | |||
|
|||
def __str__(self): | |||
return 'AerProvider' | |||
|
|||
@staticmethod | |||
def optimize_backend_options(min_qubits=10, max_qubits=20, ntrials=10): |
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.
Lets remove this method from the provider for now and make it have to be run by importing the profiling functions
@@ -159,9 +160,17 @@ def run(self, | |||
DeprecationWarning, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backend options is a deprecated argument. Typically the method will already be in the qobj config
@@ -159,9 +160,17 @@ def run(self, | |||
DeprecationWarning, | |||
stacklevel=3) | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
qiskit/providers/aer/profile.py
Outdated
from .aererror import AerError | ||
|
||
|
||
def profile_performance_options(min_qubits=10, max_qubits=25, ntrials=5, |
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.
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.conf
fusion_cost.N