-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGILL from libtorch_cpu.so at import with a CPU without AVX #37577
Comments
Thanks for the bug report. Can you try running |
Never mind -- I see the problem. Seems like a recent change because it's not present in slightly older versions.
|
Yes, that's about the same assembler code I get. I don't get this with v1.5.0, but I get another error with |
@ezyang these lines look suspicious to me:
and similar in other files (e.g. complex). We should stop accepting patches that declare data in Vec256 files. There isn't a good reason for these "1" constants and they cause trouble -- use |
Also cc @xuhdev in case you want to take a look at it. To get the assembly I ran |
@jasaarim can you please try to run |
@malfet the bug triggers before We need to avoid non-trivial global data in these architecture specific files because there's no way to guard the global initializers with CPU capability detection. |
Fixes #37577 Needs tests, and maybe a lint. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
Fixes #37577 Needs tests, and maybe a lint. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
Fixes #37577 Needs tests, and maybe a lint. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
can someone confirm this isn't present in 1.5? I know @jasaarim mentioned they didn't see it, but did we check the actual patch that introduced this problem isn't in 1.5? |
@colesbury while trying to verify that my fixed work, I realized that we setup other static initializers inside these files (e.g., to do registrations). This seems like another hazard for SIGILL, if the compiler decides that it can start autovectorizing this code. Not sure if there's a good way around it :/ |
Fixes #37577 Needs tests, and maybe a lint. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
@ezyang yeah, if someone is feeling ambitious maybe they can figure out an alternative implementation instead of |
Fixes #37577 Needs tests, and maybe a lint. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D21386704](https://our.internmc.facebook.com/intern/diff/D21386704) [ghstack-poisoned]
馃悰 Bug
I'm unable to import PyTorch due to a SIGILL presumably related to the lack of AVX in my CPU. This happens with the nightly build and also building from source.
To Reproduce
gdb -ex r --args python -c "import torch"
givesAnd a backtrace
Expected behavior
No error
Environment
conda
and sourcepython setup.py develop
Additional context
I have also tried to use
march=native
in building and the environment variableATEN_CPU_CAPABILITY=default
in building and running.cc @ezyang @gchanan @zou3519
The text was updated successfully, but these errors were encountered: