From 51dd00f6acf0ea32569498a131ceebd44f76ccaf Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Fri, 5 Nov 2021 13:29:35 -0700 Subject: [PATCH] Fix import of legion CFFI --- legate/core/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legate/core/__init__.py b/legate/core/__init__.py index 8c607466f7..b3fa32b9cd 100644 --- a/legate/core/__init__.py +++ b/legate/core/__init__.py @@ -19,10 +19,10 @@ # Perform a check to see if we're running inside of Legion Python # If we're not then we should raise an error message try: - from legion_cffi import ffi, lib as legion + from legion_cffi import lib as _legion # Now confirm that we are actually inside of a task - if legion.legion_runtime_has_context(): + if _legion.legion_runtime_has_context(): using_legion_python = True else: using_legion_python = False @@ -115,6 +115,10 @@ ReductionOp, ) +# NOTE: This needs to come after the imports from legate.core.legion, as we +# are overriding that module's name. +from legion_cffi import ffi, lib as legion + # Import the PyArrow type system from pyarrow import ( DataType,