Skip to content

Commit

Permalink
legate/driver: fix driver legion_module path (#394)
Browse files Browse the repository at this point in the history
* legate/driver: fix driver legion_module path

Fixes #393.

This commit fixes a bug where the legate driver could not find some
internal modules.

* legate/driver: remove erroneous raise statement
  • Loading branch information
rohany committed Sep 28, 2022
1 parent ca0519c commit ba4dbea
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions legate/driver/util.py
Expand Up @@ -327,26 +327,24 @@ def installed_legion_paths(
if legion_module is None:
legion_lib_dir = legion_dir / "lib"
for f in legion_lib_dir.iterdir():
if legion_lib_dir.joinpath(f / "site-packages").exists():
legion_module = legion_lib_dir / f / "site-packages"
if f.joinpath("site-packages").exists():
legion_module = f / "site-packages"
break

legion_bin_path = legion_dir / "bin"
legion_include_path = legion_dir / "include"

return LegionPaths(
legion_bin_path=legion_bin_path,
legion_lib_path=legion_lib_dir,
realm_defines_h=legion_include_path / "realm_defines.h",
legion_defines_h=legion_include_path / "legion_defines.h",
legion_spy_py=legion_bin_path / "legion_spy.py",
legion_prof_py=legion_bin_path / "legion_prof.py",
legion_python=legion_bin_path / "legion_python",
legion_module=legion_module,
legion_jupyter_module=legion_module,
)
legion_bin_path = legion_dir / "bin"
legion_include_path = legion_dir / "include"

raise RuntimeError("Could not determine legion paths")
return LegionPaths(
legion_bin_path=legion_bin_path,
legion_lib_path=legion_lib_dir,
realm_defines_h=legion_include_path / "realm_defines.h",
legion_defines_h=legion_include_path / "legion_defines.h",
legion_spy_py=legion_bin_path / "legion_spy.py",
legion_prof_py=legion_bin_path / "legion_prof.py",
legion_python=legion_bin_path / "legion_python",
legion_module=legion_module,
legion_jupyter_module=legion_module,
)

if (legate_build_dir := legate_paths.legate_build_dir) is None:
legate_build_dir = get_legate_build_dir(legate_paths.legate_dir)
Expand Down

0 comments on commit ba4dbea

Please sign in to comment.