mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: Closes https://github.com/caffe2/caffe2/pull/226 Differential Revision: D4793550 Pulled By: JoelMarcey fbshipit-source-id: cc33e58186304fa8dcac2ee9115dcc271d785b1e
15 lines
527 B
Python
15 lines
527 B
Python
## @package extension_loader
|
|
# Module caffe2.python.extension_loader
|
|
from __future__ import absolute_import
|
|
from __future__ import division
|
|
from __future__ import print_function
|
|
from __future__ import unicode_literals
|
|
import contextlib
|
|
|
|
@contextlib.contextmanager
|
|
def DlopenGuard():
|
|
# This is a stub for setting up special tricks around python extensions
|
|
# loading. For example, it might do
|
|
# sys.setdlopenflags(DLFCN.RTLD_GLOBAL | DLFCN.RTLD_NOW)
|
|
# which might be required in some setups of python
|
|
yield
|