-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Refactor Numba enhancing performance and add parallelism caveat #42439
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
Conversation
mroeschke
commented
Jul 7, 2021
•
edited
Loading
edited
- Ensure all linting tests pass, see here for how to run them
|
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.
linting issue
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.
Thanks for updating these docs. I've a query (inline) relating to SIGSEGV
. If you are (or indeed anyone is!) finding segmentation faults arising in the use of Numba then please report them. Numba tries to ensure it will:
- not segfault on legal code.
- catch illegal code at compile time (i.e. before executing and segfaulting/corrupting etc)!
- catch illegal states in the threading layers and abort before corruption occurs.
Thanks again!
troubleshooting Numba modes, see the `Numba troubleshooting page | ||
<https://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#the-compiled-code-is-too-slow>`__. | ||
|
||
Read more in the `Numba docs <https://numba.pydata.org/>`__. | ||
Using ``parallel=True`` (e.g. ``@jit(parallel=True)``) may use an unsafe threading layer to execute parallelism, potentially | ||
leading to segfaults. You may need to first `specify a safe threading layer <https://numba.readthedocs.io/en/stable/user/threading-layer.html#selecting-a-threading-layer-for-safe-parallel-execution>`__ |
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.
Numba should not end up causing a SIGSEGV
, if this happens, it's probably a bug, please report it!
Numba might print a message to STDERR
saying it's detected unsafe behaviour and then signal with SIGABRT
to protect users from corruption that would occur in the case of user defined code violating the assumptions of certain threading layers.
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.
Thanks for the clarification in behavior. I've clarified in this section that SIGSEGV
are bugs that should be reported instead.
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.
Thank you, much appreciated.
thanks @mroeschke |
…ce and add parallelism caveat
@meeseeksdev backport 1.3.x |
Something went wrong ... Please have a look at my logs. |
… parallelism caveat (#42490) Co-authored-by: Matthew Roeschke <[email protected]>