-
Notifications
You must be signed in to change notification settings - Fork 83
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
Require PyTorch v1.0 or newer and fix static TLS load error #380
Conversation
f363825
to
e49c455
Compare
This PR should wait for PR #381 to be approved and merged and then should be rebased against |
e49c455
to
089a776
Compare
089a776
to
c3dd459
Compare
In requiring the latest version of PyTorch (v1.0) the loading of it after other imports in tests/conftest.py causes there to be an error during setup of the pytest fixtures ImportError while loading conftest '/home/travis/build/diana-hep/pyhf/tests/conftest.py'. tests/conftest.py:45: in <module> (pyhf.tensor.pytorch_backend(), None), pyhf/tensor/__init__.py:24: in __getattr__ e, E pyhf.exceptions.ImportBackendError: ('There was a problem importing PyTorch. The pytorch backend cannot be used.', ImportError('dlopen: cannot load any more object with static TLS',)) TLS appears to stand for thead local storage * https://stackoverflow.com/questions/19268293/matlab-error-cannot-open-with-static-tls and seems to be a reoccuring issue with PyTorch. The advice for how to deal with it from PyTorch Issue 2083 and 2575 seems to be to simply change the import order so that import torch is always the first import in the files that are causing the issue. The rational for this fix is not understood to me, other then it just makes sure that libraries that (presumably) require a large amount of static TLS are dealt with first.
c3dd459
to
0bc1f64
Compare
We still need to understand why this is failing, don't we? Because of the change to how we run pytest isn't satisfactory... |
Yes, we need to understand what is going on in Issue #385. I made branch |
Description
master
after PR Make extract_error compliant with uproot-methods v0.3.0 API #379 is accepted.v1.0
release of PyTorch is causing issues with memory allocation in Travis resulting in errors or segfault 11.In requiring the latest version of PyTorch (v1.0) the loading of it after other imports in
tests/conftest.py
causes there to be an error during setup of the pytest fixturesTLS appears to stand for thread local storage
and seems to be a reoccurring issue with PyTorch. The advice for how to deal with it from PyTorch Issue 2083 and Issue 2575 seems to be to simply change the import order so that
import torch
is always the first import in the files that are causing the issue. The rational for this fix is not understood to me, other then it just makes sure that libraries that (presumably) require a large amount of static TLS are dealt with first.
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: