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

zsh: illegal hardware instruction lit_nlp.examples.glue_demo #487

Open
tkngoutham opened this issue Oct 16, 2021 · 3 comments
Open

zsh: illegal hardware instruction lit_nlp.examples.glue_demo #487

tkngoutham opened this issue Oct 16, 2021 · 3 comments

Comments

@tkngoutham
Copy link

zsh: illegal hardware instruction python -m lit_nlp.examples.glue_demo --port=5432 --quickstart

running code: python -m lit_nlp.examples.glue_demo --port=5432 --quickstart
Machine : MacBook Pro M1

Kindly help with fixing the issue.

@jameswex
Copy link
Collaborator

Hi @tkngoutham thanks for the report. Can you paste the complete logs when running that command and also what set-up instructions you went about (pip install, or github clone, etc...)?

@tkngoutham
Copy link
Author

installation : pip install lit-nlp

I am just running 'python -m lit_nlp.examples.glue_demo --port=5432 --quickstart'

I did not get any log message, just error 'zsh: illegal hardware instruction python -m lit_nlp.examples.glue_demo --port=5432 --quickstart'

after that execution got terminated

@iftenney
Copy link
Collaborator

iftenney commented Oct 19, 2021

This seems like an issue specific to the M1 chip; IIUC the standard Python ML stack is only partially supported and you may need to recompile some packages. https://www.anaconda.com/blog/apple-silicon-transition has a bit more background, and this might be the underlying cause here:

The problem is that Rosetta2 does not support any of the AVX family of instructions and will produce an illegal instruction error if your binary tries to use them.

https://twitter.com/HamelHusain/status/1449881725929082886 is a bit more recent and has some useful pointers you could try - if you can get NumPy and TensorFlow working you should be able to use LIT. Numba is used for UMAP, but you can disable that (just comment out the UMAP lines in app.py) if that causes issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants