-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat(frontend): warn if aes cpu flag isn't available #770
base: main
Are you sure you want to change the base?
Conversation
from cpuinfo import get_cpu_info | ||
|
||
def _is_cpu_compatible() -> bool: | ||
"""Check if CPU can run Concrete |
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.
maybe
CPU has AES instruction
they can still run compilation ?
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.
Still not sure to check for aes only
bool: if the CPU does support required features to run Concrete | ||
""" | ||
flags = get_cpu_info()["flags"] | ||
if "aes" in flags: |
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.
return "aes" in flags
return False | ||
|
||
# Print a warning if the CPU can't run Concrete | ||
if not _is_cpu_compatible(): |
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.
why at top level ?
can't they at least compile but not run ?
if the case, maybe the warning should be an error when calling a circuit execution.
and onluy a warning when calling compilation
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.
The idea is to show a warning whenever you import concrete. It take some time to run so I'm not sure about adding it as part of the execution call
No description provided.