-
Notifications
You must be signed in to change notification settings - Fork 147
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
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
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.
aes is not actually an issue I guess, as we fallback to a software implementation
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
I don't known what todo with that PR... Here we check for aes instruction, but that should not be a issue, actually I'm not sure what instructions is actually needed and if it is actually needed to check all of them.. |
I think we already decided to close this one, but I haven't done it yet |
No description provided.