Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

youben11
Copy link
Member

@youben11 youben11 commented Apr 2, 2024

No description provided.

@cla-bot cla-bot bot added the cla-signed label Apr 2, 2024
from cpuinfo import get_cpu_info

def _is_cpu_compatible() -> bool:
"""Check if CPU can run Concrete
Copy link
Contributor

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 ?

Copy link
Member Author

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

Copy link
Member

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:
Copy link
Contributor

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():
Copy link
Contributor

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

Copy link
Member Author

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

@BourgerieQuentin
Copy link
Member

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..
wdyt?

@youben11
Copy link
Member Author

I think we already decided to close this one, but I haven't done it yet

@youben11 youben11 closed this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants