Skip to content

Commit

Permalink
dlopen() earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed May 6, 2024
1 parent 2b4b6e3 commit f7098fe
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ucp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
logger.debug("Setting env UCX_MEMTYPE_CACHE=n, which is required by UCX")
os.environ["UCX_MEMTYPE_CACHE"] = "n"

from .core import * # noqa
from .core import get_ucx_version # noqa
from .utils import get_ucxpy_logger # noqa
from ._libs.utils import get_address # noqa
from ._version import __git_commit__, __version__

try:
import pynvml
except ImportError:
pynvml = None

# If libucx was installed as a wheel, we must request it to load the library symbols.
# Otherwise, we assume that the library was installed in a system path that ld can find.
Expand All @@ -38,6 +28,17 @@
del libucx


from .core import * # noqa
from .core import get_ucx_version # noqa
from .utils import get_ucxpy_logger # noqa
from ._libs.utils import get_address # noqa
from ._version import __git_commit__, __version__

try:
import pynvml
except ImportError:
pynvml = None

# Setup UCX-Py logger
logger = get_ucxpy_logger()

Expand Down

0 comments on commit f7098fe

Please sign in to comment.