Skip to content
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

Remove --install-dir option #656

Merged
merged 6 commits into from
Oct 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 12 additions & 51 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ def install_cunumeric(
gasnet_dir,
networks,
hdf,
install_dir,
legate_branch,
legate_dir,
legate_url,
llvm,
march,
maxdim,
Expand Down Expand Up @@ -187,10 +183,6 @@ def install_cunumeric(
print("gasnet_dir: ", gasnet_dir)
print("networks: ", networks)
print("hdf: ", hdf)
print("install_dir: ", install_dir)
print("legate_branch: ", legate_branch)
print("legate_dir: ", legate_dir)
print("legate_url: ", legate_url)
print("llvm: ", llvm)
print("march: ", march)
print("maxdim: ", maxdim)
Expand Down Expand Up @@ -226,20 +218,21 @@ def validate_path(path):
cuda_dir = validate_path(cuda_dir)
nccl_dir = validate_path(nccl_dir)
tblis_dir = validate_path(tblis_dir)
legate_dir = validate_path(legate_dir)
thrust_dir = validate_path(thrust_dir)
curand_dir = validate_path(curand_dir)
gasnet_dir = validate_path(gasnet_dir)
cutensor_dir = validate_path(cutensor_dir)
openblas_dir = validate_path(openblas_dir)

if legate_dir is None:
try:
import legate.install_info as lg_install_info
try:
import legate.install_info as lg_install_info
except ImportError:
raise RuntimeError(
"Cannot determine Legate install directory. Please make sure "
"legate.core is installed in the current Python environment."
)

legate_dir = dirname(lg_install_info.libpath)
except Exception:
pass
legate_dir = dirname(lg_install_info.libpath)

if verbose:
print("cuda_dir: ", cuda_dir)
Expand Down Expand Up @@ -274,6 +267,8 @@ def validate_path(path):
pip_install_cmd = [sys.executable, "-m", "pip", "install"]
cmd_env = dict(os.environ.items())

install_dir = None

if unknown is not None:
try:
prefix_loc = unknown.index("--prefix")
Expand Down Expand Up @@ -350,12 +345,8 @@ def validate_path(path):
# A custom path to cuRAND is ignored when CUDA support is available
if cuda and curand_dir is not None:
cmake_flags += ["-Dcunumeric_cuRAND_INCLUDE_DIR=%s" % curand_dir]
if legate_dir:
cmake_flags += ["-Dlegate_core_ROOT=%s" % legate_dir]
if legate_url:
cmake_flags += ["-Dcunumeric_LEGATE_CORE_REPOSITORY=%s" % legate_url]
if legate_branch:
cmake_flags += ["-Dcunumeric_LEGATE_CORE_BRANCH=%s" % legate_branch]

cmake_flags += ["-Dlegate_core_ROOT=%s" % legate_dir]

cmake_flags += extra_flags
cmd_env.update(
Expand All @@ -370,14 +361,6 @@ def validate_path(path):

def driver():
parser = argparse.ArgumentParser(description="Install cuNumeric.")
parser.add_argument(
"--install-dir",
dest="install_dir",
metavar="DIR",
required=False,
default=None,
help="Path to install cuNumeric software",
)
parser.add_argument(
"--debug",
dest="debug",
Expand Down Expand Up @@ -434,28 +417,6 @@ def driver():
default=os.environ.get("GASNET"),
help="Path to GASNet installation directory.",
)
parser.add_argument(
"--with-core",
dest="legate_dir",
metavar="DIR",
required=False,
default=os.environ.get("LEGATE_DIR"),
help="Path to Legate Core installation directory.",
)
parser.add_argument(
"--legate-url",
dest="legate_url",
required=False,
default="https://github.com/nv-legate/legate.core.git",
help="Legate git URL to build cuNumeric with.",
)
parser.add_argument(
"--legate-branch",
dest="legate_branch",
required=False,
default="branch-22.10",
help="Legate branch to build cuNumeric with.",
)
parser.add_argument(
"--with-openblas",
dest="openblas_dir",
Expand Down